Closed jkugler closed 3 years ago
Seems like caching https://github.com/frapposelli/vagrant-vcenter/blob/master/lib/vagrant-vcenter/action/read_ssh_info.rb#L29 or here https://github.com/frapposelli/vagrant-vcenter/blob/master/lib/vagrant-vcenter/provider.rb#L19 would be a good course of action.
Oh, snap. I'm using vagrant-vsphere, not vagrant-center. Siiiigh. Sorry for the noise.
I have a very odd case. I'm using vagrant with vCenter, and using rsync folders. Most of the time it works, but some times the VM will boot, properly report its IPv4 address, swap out the ssh keys, but when it goes to connect for the rsync, it tries to use the VM's link-local address, and fails. Like so (please forgive the Jenkins copy/paste)
It had the "good" IPv4 address, and it worked. Then it got the IPv6 link-local address from somewhere, which did not work. Can we cache the first-reported address? Or ignore link-local addresses, and ask again? I guess some environments do use link local addresses, so discarding may not be the best course of action. But caching the address first acquired seems like a sane thing to do.