hashicorp / vagrant-vmware-desktop

Official provider for VMware desktop products: Fusion, Player, and Workstation.
Mozilla Public License 2.0
270 stars 39 forks source link

Vagrant VMWare Utility: Multi-entry lease handling fix breaks box communication on macOS #129

Open artlogic opened 2 weeks ago

artlogic commented 2 weeks ago

https://github.com/hashicorp/vagrant-vmware-desktop/pull/120

Vagrant version

2.4.1

Vagrant VMware plugin version

3.0.4

Vagrant VMware utility version

1.0.23 (versions less than this work properly for me)

Host operating system

macOS 14.7

Guest operating system

macOS 14.5

Vagrantfile

Using essentially the default file, but with the vmxnet3 adapter.

Expected behavior

I expect command like vagrant ssh to work reliably! :)

Actual behavior

It appears as if when the machine is renewing the lease for DHCP under VMWare Fusion 13.6, multiple entries for the same MAC address end up in /var/db/vmware/vmnet-dhcpd-vmnet8.leases like so:

lease 192.168.215.131 {
    starts 3 2024/09/25 00:44:14;
    ends 3 2024/09/25 01:14:14;
    hardware ethernet 00:0c:29:f5:a4:74;
    uid 01:00:0c:29:f5:a4:74;
    client-hostname "agent-base-mac";
}
lease 192.168.215.131 {
    starts 3 2024/09/25 00:59:13;
    ends 3 2024/09/25 02:59:13;
    hardware ethernet 00:0c:29:f5:a4:74;
    uid 01:00:0c:29:f5:a4:74;
    client-hostname "agent-base-mac";
}

I'm not sure why this is happening, but I believe the correct response is to choose the most recent lease, rather than to fail. I'm unable to use the most recent version of the vagrant utility because of the linked PR below.

References

electropolis commented 1 week ago

1.0.23 (versions less than this work properly for me)

But lower version doesn't have ARM64 support. Only AMD. You have macOS on Apple Silicon ?

artlogic commented 1 week ago

Right now I do not, but I would prefer to move to Apple Silicon soon, thus why I opened this issue.