1

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

frob1719
  • 11
  • 2
  • what is your issue ? eth0 is used by vagrant internally to communicate using SSH and then it will configure the other network interfaces. but still the other machines can access your VM with the static IP (as long as they are on the same network) – Frederic Henri Jun 01 '18 at 07:44
  • @FrédéricHenri - you're 100% right. I was thinking about this all wrong. There isn't an issue - the web server running should be listening on both interfaces so I can use the static IP address. – frob1719 Jun 01 '18 at 12:58

0 Answers0