Can't SSH Connect to Packer or Vagrant
Unable to connect over SSH?
vagrant boxes with
packer last week, I had an odd problem with
packer being totally unable to connect to the new VMWare image over SSH.
When a new VM comes up in VMWare, it's given two network interfaces by default - a NAT (
vmnet8) and a host-only connection (
vmnet1). DHCP leases are set for these and added to a couple of local files;
vagrant then query these files to determine where to connect when the VM starts.
The solution was to just delete these lease files, and then restart VMWare. You'll want to make sure that no VMs are running at the time! This will probably also fix any other "unable to connect" problems with
sudo rm -f /var/db/vmware/vmnet-dhcpd-vmnet*
Configuring the vmnet subnet addresses yourself
Ever wondered why some machines will feature
vmnet1 in the 192.168.x.x range, and some in the 172.16.x.x range? I did. You can configure the subnets for VMWare DHCP yourself.
/Library/Preferences/VMware Fusion/networking, and modify