Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware -- 5.0.1+ ssh_info #9151

Closed
bdwyertech opened this issue Nov 8, 2017 · 5 comments
Closed

VMware -- 5.0.1+ ssh_info #9151

bdwyertech opened this issue Nov 8, 2017 · 5 comments

Comments

@bdwyertech
Copy link
Contributor

Looks like the VMware plugin 5.0.1+ has a change that broke some plugin functionality, e.g. vagrant-hostmanager and some others... ssh_info is used to derive the IP address.

core: Use local port forward for SSH connect

Plugin 5.0.0

BD-MBPro:osq_fleet bdwyer$ vagrant ssh-config
Host default
  HostName 10.11.1.230
  User vagrant
  Port 22
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/bdwy/blahhh/.vagrant/machines/default/vmware_fusion/private_key
  IdentitiesOnly yes
  LogLevel FATAL

Plugin 5.0.3

BD-MBPro:osq_fleet bdwyer$ vagrant ssh-config
Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/bdwy/blahhh/.vagrant/machines/default/vmware_fusion/private_key
  IdentitiesOnly yes
  LogLevel FATAL

Downstream plugins could probably be modified, but I can't seem to find anywhere else in the machine's hash where an address other than 127.0.0.1 is exposed.

@tcataldo
Copy link

This command seems to return the right ip for me:

vmrun -T fusion getGuestIPAddress .vagrant/machines/xenial/vmware_fusion/088349f7-3a8d-4fda-bb1c-f156d9d5b776/ubuntu1604.vmx

@scottslowe
Copy link

scottslowe commented Jan 24, 2018

@tcataldo I believe that command only works if VMware Tools (or open-vm-tools) is running in the guest, which is not the case for a number of Vagrant-supported Linux distributions (CoreOS being one example).

I discovered this today and after repeated testing have found the behavior to be erratic: sometimes Vagrant will report/show "127.0.0.1:2222" in response to vagrant ssh-config, and sometimes (this is using VMware Fusion 10.1.1 and version 5.0.4 of the VMware plugin) it will report "192.168.70.x:22" (the default IP range for Fusion's NAT network, IIRC). The inconsistency is the biggest issue for me. If we're going to switch to 127.0.0.1:2222 (which is the way VirtualBox behaves, AIUI), that's fine, but it needs to consistently do one or the other.

@AntonioMeireles
Copy link

@briancain any news on this ? the big mess here isn't the behaviour change is as @lowescott mentioned the non determinism of it. Thanks in advance.

@chrisroberts
Copy link
Member

Hi there,

A new VMware plugin has been released today. You can read more about it here:

https://www.hashicorp.com/blog/introducing-the-vagrant-vmware-desktop-plugin

By default the VMware plugin should use the port forward to connect to the VM (much like it does when using the VirtualBox provider) and can be forced to use the public address using the ssh_info_public configuration option:

https://www.vagrantup.com/docs/vmware/configuration.html#ssh_info_public

If you are still encountering this behavior after upgrading, please open a new issue and I will investigate further.

Cheers!

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants