I noticed that if I choose a different host network in my Vagrantfile, the virtual machine will use it correctly, but vagrant will not honor it when subsequently creating the port forwarding rule.
I stumbled on this issue (https://github.com/hashicorp/vagrant/issues/10575) which revealed some files that vagrant uses. Apparently it defaults to vmnet8, and if I hand edit it and restart the mentioned process I can get it to work, but since that issue wasn’t directly related to what I’m trying to do, I just wanted to reach out to see if there’s an automated way to do this since it’s not unusual to use multiple networks within vmware.
In the vagrant file, I have these two lines:
v.vmx["ethernet0.vnet"] = "vmnet2" v.vmx["ethernet0.connectionType"] = "custom"
Is there another way to tell Vagrant which host virtual network I want the virtual machine connected to so that it will create the port forward rule for that network?