I'm trying to set up a Vagrant VM using VMware Fusion that has a static IP. The machine could be down for a long period of time, but when I bring it up, other machines will need to connect to it so I want to keep it static.
I have the following in my Vagrantfile:
config.vm.network "private_network", ip: "192.168.245.5"
This almost gets me there, but the VM has two ethernet interfaces now: eth0
and eth1
. eth0
has an IP from VMware's DHCP server and eth1
has the statically assigned IP from my Vagrantfile.
I tried adding auto_config: false
to the Vagrant file but that didn't do anything.
I tried having the Vagrant file assign a MAC address following the information on this StackOverflow question: How to set eth0 MAC address in Vagrant with the VMware provisioner?
Unfortunately, it looks like VMware changed something in Fusion 10 that overwrites the custom configuration to the dhcp.conf
file. See here: https://communities.vmware.com/thread/574309
I guess I could make what's happening work, but I don't like having the two interfaces up and am wondering why Vagrant/VMware is doing that.
Vagrant version - 2.1.1
VMware Fusion version - Professional Version 10.1.2