SSH Fails on OSX Big Sur when upgraded from Earlier Mac/Fusion Versions
Overview of the Issue
Packer was unable to ssh into the vm due to its looking at an old DHCP leases file.
https://github.com/hashicorp/packer/issues/10177
The PR code checks first the old location of the VMware leases file. For users who upgrade from Fusion 11 and Macos Catalina, for example, the old vmware leases file will exist and the code currently process that file first. In my case i had used the same vm in my previous configuration and there was a MAC address match in the old file, preventing the processing of the new apple leases file. Perhaps it should check the version of macos to determine which file to check
I was able to resolve by doing the following
sudo rm /var/db/vmware/*.leases
sudo rm /var/db/vmware/*.leases~
Packer version
Packer: 1.7.4
Operating system and Environment details
MacOS 11.4 VMware Fusion: 12.1.2
VMware has added back the lease file in its traditional location per my and a few other requests.
https://communities.vmware.com/t5/VMware-Fusion-Discussions/Big-Sur-hosts-with-Fusion-Is-vmnet-dhcpd-vmnet8-leases-file/m-p/2872314/highlight/true#M175804
The current version of macOS 12.1, fusion 12.2.1 & packer 1.7.8 is functional but searching for the correct IP can take 5+ minutes in some cases.
cc @nywilken @lbajolet-hashicorp for transfer
Closing per https://github.com/hashicorp/packer-plugin-vmware/issues/185#issuecomment-2082826718.
If this is still an issues, please test on the latest version of the following and open a new issue.
- macOS
- VMware Fusion
- Packer
- Packer Plugin for VMware
I have tested on the following:
- macOS: Sonoma 14.5
- VMware Fusion: 13.5.2
- Packer: 1.11.0
- Packer Plugin for VMware: 1.0.11