vagrant 2.0.0 and hyperv

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

vagrant 2.0.0 and hyperv

Paul Baxter
Having problems with connecting to my VM and possibly initial insecure key ssh exchange for my first box.

Can ping the VM from host but not SSH.

VM (centos/7) is created and I can log in via hyperv console but not via ssh.

Anyone point me to recent documentation that is pertinent to setting up the ssh, or the hyper v network

(e.g. I've seen some web blogs suggest you must run vagrant as an administrator in powershell)
I've tried both as <user> and run as admin but no real difference. Both seem to create and start the VM and neither let me ssh in!


I followed https://followkman.com/2016/07/27/vagrant-up-on-windows-10-with-hyper-v/amp/ with some fixes

my <user> .ssh dir has
vagrant insecure public key (from github.. hashicorp/keys/vagrant.pub) copied as <user>\.ssh\authorized_keys
Also locally generated a public/private key using ssh-keygen
Files are <user>\.ssh\rsa_id and rsa_id.pub
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

Using openssh v7.5p1 (latest) or putty

Getting a connection refused with ssh or putty but don't know why and how to debug this.


Other info:

hyperV external switch shared with the host win 10 pro machine
ipconfig on host reports the vExternal switch IP as 192.168.1.X
Connecting into the VM via hyper V with password. ip a also shows eth0 with IP 192.168.1.X (same IP as virtual switch) - expected?

Tried changing the VM machine to use a legacy network adapter instead. No difference.

Initial trials were unsuccessful. However in the middle of trying lots of things, I did have this working earlier, but having destroyed the VM and recreated I have failed to repeat the success.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Alvaro Miranda Aguilera
what about permissions?

from the console as your user try

chown -R vagrant: ~/.ssh
chmod -R 0600 ~/.ssh
chmod 0700 ~/.ssh

first command set owner
second set all file and dir as RW
third (no -R) set dir to RWX

then you can try vagrant ssh



On Sun, Oct 1, 2017 at 1:56 AM, 'Paul Baxter' via Vagrant <[hidden email]> wrote:
Having problems with connecting to my VM and possibly initial insecure key ssh exchange for my first box.

Can ping the VM from host but not SSH.

VM (centos/7) is created and I can log in via hyperv console but not via ssh.

Anyone point me to recent documentation that is pertinent to setting up the ssh, or the hyper v network

(e.g. I've seen some web blogs suggest you must run vagrant as an administrator in powershell)
I've tried both as <user> and run as admin but no real difference. Both seem to create and start the VM and neither let me ssh in!



my <user> .ssh dir has
vagrant insecure public key (from github.. hashicorp/keys/vagrant.pub) copied as <user>\.ssh\authorized_keys
Also locally generated a public/private key using ssh-keygen
Files are <user>\.ssh\rsa_id and rsa_id.pub
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

Using openssh v7.5p1 (latest) or putty

Getting a connection refused with ssh or putty but don't know why and how to debug this.


Other info:

hyperV external switch shared with the host win 10 pro machine
ipconfig on host reports the vExternal switch IP as 192.168.1.X
Connecting into the VM via hyper V with password. ip a also shows eth0 with IP 192.168.1.X (same IP as virtual switch) - expected?

Tried changing the VM machine to use a legacy network adapter instead. No difference.

Initial trials were unsuccessful. However in the middle of trying lots of things, I did have this working earlier, but having destroyed the VM and recreated I have failed to repeat the success.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ey09X41T-6J6ae-guBO1F6nctuBQE6fcRDS2pxhPazGPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Paul Baxter
In reply to this post by Paul Baxter
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

BTW this seemed strange since the default VM still has the vagrant.pub insecure public key, so surely the insecure private key shouldn't be overwritten?

Tried without this step to no effect, which makes me think this is more a basic network thing than an ssh one?

PS My external connection is over wifi in case that matters! 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b5037d9c-4290-40d3-bee3-25386abbd702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Alvaro Miranda Aguilera
can you share a debug log of vagrant ssh

ie

set VAGRANT_LOG=debug
vagrant ssh

and from the vm an

ls -al ~/.ssh

screenshot is fine if you are over the console


On Sun, Oct 1, 2017 at 2:24 AM, 'Paul Baxter' via Vagrant <[hidden email]> wrote:
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

BTW this seemed strange since the default VM still has the vagrant.pub insecure public key, so surely the insecure private key shouldn't be overwritten?

Tried without this step to no effect, which makes me think this is more a basic network thing than an ssh one?

PS My external connection is over wifi in case that matters! 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b5037d9c-4290-40d3-bee3-25386abbd702%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezWgXe5C17%2BpfDD7FaSh2he0OY9Wyx1Sj%3DM_PCL4UmCfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Paul Baxter
In reply to this post by Alvaro Miranda Aguilera
I'm running this from windows powershell, so there isn't a vagrant user here. Just my user account??

I have my user\.ssh dir set as read only and all it's files rsa_id, rsa_id.pub and authorized_keys (copy of vagrant.pub) are read only

On Sunday, 1 October 2017 01:17:25 UTC+1, Alvaro Miranda Aguilera wrote:
what about permissions?

from the console as your user try

chown -R vagrant: ~/.ssh
chmod -R 0600 ~/.ssh
chmod 0700 ~/.ssh

first command set owner
second set all file and dir as RW
third (no -R) set dir to RWX

then you can try vagrant ssh



On Sun, Oct 1, 2017 at 1:56 AM, 'Paul Baxter' via Vagrant <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="-3YzATAcCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagra...@...> wrote:
Having problems with connecting to my VM and possibly initial insecure key ssh exchange for my first box.

Can ping the VM from host but not SSH.

VM (centos/7) is created and I can log in via hyperv console but not via ssh.

Anyone point me to recent documentation that is pertinent to setting up the ssh, or the hyper v network

(e.g. I've seen some web blogs suggest you must run vagrant as an administrator in powershell)
I've tried both as <user> and run as admin but no real difference. Both seem to create and start the VM and neither let me ssh in!


I followed <a href="https://followkman.com/2016/07/27/vagrant-up-on-windows-10-with-hyper-v/amp/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffollowkman.com%2F2016%2F07%2F27%2Fvagrant-up-on-windows-10-with-hyper-v%2Famp%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGF0Zamz_NdrLg5lgkMpN_kn3dapg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffollowkman.com%2F2016%2F07%2F27%2Fvagrant-up-on-windows-10-with-hyper-v%2Famp%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGF0Zamz_NdrLg5lgkMpN_kn3dapg&#39;;return true;">https://followkman.com/2016/07/27/vagrant-up-on-windows-10-with-hyper-v/amp/ with some fixes

my <user> .ssh dir has
vagrant insecure public key (from github.. hashicorp/keys/vagrant.pub) copied as <user>\.ssh\authorized_keys
Also locally generated a public/private key using ssh-keygen
Files are <user>\.ssh\rsa_id and rsa_id.pub
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

Using openssh v7.5p1 (latest) or putty

Getting a connection refused with ssh or putty but don't know why and how to debug this.


Other info:

hyperV external switch shared with the host win 10 pro machine
ipconfig on host reports the vExternal switch IP as 192.168.1.X
Connecting into the VM via hyper V with password. ip a also shows eth0 with IP 192.168.1.X (same IP as virtual switch) - expected?

Tried changing the VM machine to use a legacy network adapter instead. No difference.

Initial trials were unsuccessful. However in the middle of trying lots of things, I did have this working earlier, but having destroyed the VM and recreated I have failed to repeat the success.


--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="-3YzATAcCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Alvaro Miranda Aguilera
hello

my bad

those were meant to the vagrant user inside the guest vm.

On Sun, Oct 1, 2017 at 2:31 AM, 'Paul Baxter' via Vagrant <[hidden email]> wrote:
I'm running this from windows powershell, so there isn't a vagrant user here. Just my user account??

I have my user\.ssh dir set as read only and all it's files rsa_id, rsa_id.pub and authorized_keys (copy of vagrant.pub) are read only

On Sunday, 1 October 2017 01:17:25 UTC+1, Alvaro Miranda Aguilera wrote:
what about permissions?

from the console as your user try

chown -R vagrant: ~/.ssh
chmod -R 0600 ~/.ssh
chmod 0700 ~/.ssh

first command set owner
second set all file and dir as RW
third (no -R) set dir to RWX

then you can try vagrant ssh



On Sun, Oct 1, 2017 at 1:56 AM, 'Paul Baxter' via Vagrant <[hidden email]> wrote:
Having problems with connecting to my VM and possibly initial insecure key ssh exchange for my first box.

Can ping the VM from host but not SSH.

VM (centos/7) is created and I can log in via hyperv console but not via ssh.

Anyone point me to recent documentation that is pertinent to setting up the ssh, or the hyper v network

(e.g. I've seen some web blogs suggest you must run vagrant as an administrator in powershell)
I've tried both as <user> and run as admin but no real difference. Both seem to create and start the VM and neither let me ssh in!



my <user> .ssh dir has
vagrant insecure public key (from github.. hashicorp/keys/vagrant.pub) copied as <user>\.ssh\authorized_keys
Also locally generated a public/private key using ssh-keygen
Files are <user>\.ssh\rsa_id and rsa_id.pub
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

Using openssh v7.5p1 (latest) or putty

Getting a connection refused with ssh or putty but don't know why and how to debug this.


Other info:

hyperV external switch shared with the host win 10 pro machine
ipconfig on host reports the vExternal switch IP as 192.168.1.X
Connecting into the VM via hyper V with password. ip a also shows eth0 with IP 192.168.1.X (same IP as virtual switch) - expected?

Tried changing the VM machine to use a legacy network adapter instead. No difference.

Initial trials were unsuccessful. However in the middle of trying lots of things, I did have this working earlier, but having destroyed the VM and recreated I have failed to repeat the success.


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewnpgPuT-_%3DgK32TMHwXCN1h3XoVEVd2JUhHPEMoEvr7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Paul Baxter
Thanks for the replies.

Problem was solved by
a) Removing and then adding appropriate vExternal hyperV switch
b) Removing openssh (vagrant normally relies on its own ssh client)
c) Removing my own .ssh keys and using default insecure_private_key in my .vagrant.d dir
(Basically reinstalling and ignoring the article I previously posted).

Now I see the insecure key replaced by a secure key as part of the first vagrant up and stored in the same dir structure as the Vagrantfile (so don't check in the whole tree!)

One minute later I'm in my bright shiny new Centos 7 dev environment :)

Now on to packer and ansible...

On Monday, 2 October 2017 08:15:42 UTC+1, Alvaro Miranda Aguilera wrote:
hello

my bad

those were meant to the vagrant user inside the guest vm.

On Sun, Oct 1, 2017 at 2:31 AM, 'Paul Baxter' via Vagrant <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="xA1T9l1MAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagra...@...> wrote:
I'm running this from windows powershell, so there isn't a vagrant user here. Just my user account??

I have my user\.ssh dir set as read only and all it's files rsa_id, rsa_id.pub and authorized_keys (copy of vagrant.pub) are read only

On Sunday, 1 October 2017 01:17:25 UTC+1, Alvaro Miranda Aguilera wrote:
what about permissions?

from the console as your user try

chown -R vagrant: ~/.ssh
chmod -R 0600 ~/.ssh
chmod 0700 ~/.ssh

first command set owner
second set all file and dir as RW
third (no -R) set dir to RWX

then you can try vagrant ssh



On Sun, Oct 1, 2017 at 1:56 AM, 'Paul Baxter' via Vagrant <[hidden email]> wrote:
Having problems with connecting to my VM and possibly initial insecure key ssh exchange for my first box.

Can ping the VM from host but not SSH.

VM (centos/7) is created and I can log in via hyperv console but not via ssh.

Anyone point me to recent documentation that is pertinent to setting up the ssh, or the hyper v network

(e.g. I've seen some web blogs suggest you must run vagrant as an administrator in powershell)
I've tried both as <user> and run as admin but no real difference. Both seem to create and start the VM and neither let me ssh in!


I followed <a href="https://followkman.com/2016/07/27/vagrant-up-on-windows-10-with-hyper-v/amp/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffollowkman.com%2F2016%2F07%2F27%2Fvagrant-up-on-windows-10-with-hyper-v%2Famp%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGF0Zamz_NdrLg5lgkMpN_kn3dapg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ffollowkman.com%2F2016%2F07%2F27%2Fvagrant-up-on-windows-10-with-hyper-v%2Famp%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGF0Zamz_NdrLg5lgkMpN_kn3dapg&#39;;return true;">https://followkman.com/2016/07/27/vagrant-up-on-windows-10-with-hyper-v/amp/ with some fixes

my <user> .ssh dir has
vagrant insecure public key (from github.. hashicorp/keys/vagrant.pub) copied as <user>\.ssh\authorized_keys
Also locally generated a public/private key using ssh-keygen
Files are <user>\.ssh\rsa_id and rsa_id.pub
Overwrote <user>\.vagrant.d\insecure_private_key with the contents of my rsa_id (private key)

Using openssh v7.5p1 (latest) or putty

Getting a connection refused with ssh or putty but don't know why and how to debug this.


Other info:

hyperV external switch shared with the host win 10 pro machine
ipconfig on host reports the vExternal switch IP as 192.168.1.X
Connecting into the VM via hyper V with password. ip a also shows eth0 with IP 192.168.1.X (same IP as virtual switch) - expected?

Tried changing the VM machine to use a legacy network adapter instead. No difference.

Initial trials were unsuccessful. However in the middle of trying lots of things, I did have this working earlier, but having destroyed the VM and recreated I have failed to repeat the success.


--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/c6c1348f-d1ee-4f7f-a29b-7f2b08b7bbba%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="xA1T9l1MAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/49a690f5-9710-453d-bfd8-d34821162858%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/661631e3-5a92-43f0-99f2-99e1bf62a07d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant 2.0.0 and hyperv

Paul Baxter
In reply to this post by Alvaro Miranda Aguilera
Thanks for the replies.

Problem was solved by
a) Removing and then adding appropriate vExternal hyperV switch
b) Removing openssh (vagrant normally relies on its own ssh client)
c) Removing my own .ssh keys and using default insecure_private_key in my .vagrant.d dir
(Basically reinstalling and ignoring the article I previously posted).

Now I see the insecure key replaced by a secure key as part of the first vagrant up and stored in the same dir structure as the Vagrantfile (so don't check in the whole tree!)

One minute later I'm in my bright shiny new Centos 7 dev environment :)

Now on to packer and ansible...

PS Your tip about --debug was very helpful in identifying my ssh connection timeout

PS My network config is wifi adapter 'wifi' into network bridge and network bridge properties set to connect to just 'wifi' for local resources (untick vExternal and vInternal). network bridge has the hyperv switch extension ticked.
Note, my machine is wifi only, no external ethernet port. Internet connection sharing is NOT selected. Internet from vExternal VMs achieved via the bridge direct to wifi.

Still not 100% on this network connection. I'd prefer if the VMs were on an internal connection with an explicit share on the host to allow the internet on the wifi connection to be shared by nodes on the internal network. (currently my VMs pick up IPs via DHCP in my router's subnet.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c23cd39c-a5b8-4fd0-8c6c-989098088599%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.