Last Updated: February 25, 2016
·
3.028K
· in2rd

Dual NICs with Vagrant and VMware Fusion Provider

After fighting with Vagrant and the VMware Fusion provider for a couple of weekends in a row, it's easy enough to provide the correct NAT settings and allow for bridged access. If you define two NICs and remove the virtual MAC addresses from them in the box, and let VMware do the rest, it works out pretty well in the end.

config.vm.provider "vmware_fusion" do |vmware|
    vmware.vmx["memsize"] = "1024"
    vmware.vmx["numvcpus"] = "2"  
    vmware.vmx["ethernet0.present"] = "TRUE"
    vmware.vmx["ethernet0.connectionType"] = "nat"
    vmware.vmx["ethernet1.generatedAddress"] = nil
    vmware.vmx["ethernet1.addressType"] = "static"
    vmware.vmx["ethernet1.present"] = "TRUE"
    vmware.vmx["ethernet1.connectionType"] = "bridged"
    vmware.vmx["ethernet1.address"] = "00:0C:29:DB:08:02"
end