Closed harmjanblok closed 1 month ago
Following can be used as workaround:
sudo truncate --size=0 /var/db/vmware/vmnet-dhcpd-vmnet8.leases
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure
Hi there,
Inspecting the box it appears that it is defining a value for the base_mac
of the guest. The reuse of the mac is what ends up causing this issue. One option is to disable the value in your local Vagrantfile:
Vagrant.configure("2") do |config|
...
config.vm.base_mac = nil
end
I'm working through some approaches for how to deal with multiple matches (instead of the simple return on first match currently in place).
I ran into the same problem because the official Ubuntu cloud image made two DHCP leases with different client-id (by dhclient
and systemd-networkd
) with each boot. The config.vm.base_mac = nil
workaround hence didn't work.
While a different approach of dealing with multiple matches is needed (maybe to return all IP of matched leases and query each for the current MAC address?), this fix/workaround has solved the issue for me.
If the leases file contains multiple leases (probably due to multiple times
vagrant up
), the utility cannot determine correct lease.The
vagrant up --debug
shows following output:The machine isn't reachable on
172.16.104.134
(first) but on172.16.104.137
(last).Vagrant version
Vagrant 2.2.19
Vagrant VMware plugin version
vagrant-vmware-desktop (3.0.1, global)
Vagrant VMware utility version
1.0.21
Host operating system
macOS Monterey 12.2
Guest operating system
FlatCar Linux
Vagrantfile
Expected behavior
Expected
vagrant up
to work as usual.Actual behavior
Hangs at