Fusion suddenly changed the way it creates ssh config...

19 views
Skip to first unread message

Joe Bloe

unread,
Nov 16, 2017, 2:18:38 PM11/16/17
to Vagrant
I am running the following:
  - Vagrant 2.0.1
  - VMware Fusion 8.5.8
  - vagrant-vmware-fusion 5.0.4
  - macOS 10.12.6 (Sierra)

The other day I upgraded Vagrant and the vmware-fusion plugin to the latest version. Now, I'm getting a really weird behavior that I have not seen before. I have a single Vagrantfile with five (5) machines defined (centos7, centos6, rhel6, rhel7 and sles11).

Before upgrading, Vagrant would configure ssh with the DHCP IP and forward ssh to the port I had specified in my Vagrantfile. 

Example:

==> rhel7: Waiting for the VM to receive an address...
==> rhel7: Forwarding ports...
       rhel7: -- 22 => 2230
==> rhel7: Waiting for machine to boot. This may take a few minutes...
       rhel7: SSH address: 172.31.1.147:2230

After upgrading, Vagrant now configures ssh to use the localhost IP and forwards that to the port I have specified.

Example:

==> rhel7: Waiting for the VM to receive an address...
==> rhel7: Forwarding ports...
       rhel7: -- 22 => 2230
==> rhel7: Waiting for machine to boot. This may take a few minutes...
       rhel7: SSH address: 127.0.0.1:2230

If I bring up a single machine it configures ssh and I can login to the machine with no problem using "vagrant ssh <host>". Running "vagrant ssh-config <host> display looks like the following:

Host rhel7
  HostName 127.0.0.1
  User vagrant
  Port 2224
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/svick/Vagrant/.vagrant/machines/centos7/vmware_fusion/private_key
  IdentitiesOnly yes
  LogLevel FATAL

However, if I bring up a second machine, Vagrant will configure the new host with the localhost IP, and I'm assuming it bounces the Fusion networking because my connection to the previously booted VM is disconnected. Now when I do the "vagrant ssh-config <host>" command for the previously booted server, I see the following:

Host rhel7
  HostName 172.31.1.147
  User vagrant
  Port 2224
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/svick/Vagrant/.vagrant/machines/centos7/vmware_fusion/private_key
  IdentitiesOnly yes
  LogLevel FATAL

When I execute the same command on the newly booted VM, it shows the localhost IP configured.

I've been pulling my hair out for three days trying to figure out a solution or workaround but I have not been able to find any solution. How can I either a) get Vagrant to use the old method of configuring the port forwarding or b) get Vagrant to "reconfigure" ssh to us the DHCP address after it finishes bringing up the VM?
Reply all
Reply to author
Forward
0 new messages