Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save binarytemple/efc2b729c6f07563f75a to your computer and use it in GitHub Desktop.
Save binarytemple/efc2b729c6f07563f75a to your computer and use it in GitHub Desktop.
setup vmware with non-routed private network (172.27.209.0)

Set the configuration file:

cat <<END | sudo tee "/Library/Preferences/VMware Fusion/networking" > /dev/null
VERSION=1,0
answer VNET_2_HOSTONLY_NETMASK 255.255.255.0
answer VNET_2_HOSTONLY_SUBNET 172.27.209.0
answer VNET_2_NAT no
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH FD413D017A490613AC50C40F3F22BAAE1B726F8D
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 192.168.103.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes
END

Restart Vmware fusion networking -

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --status

Verify that vmnet8 is the only routed subnet:

netstat -nr | grep vmn

You should see something like the following:

192.168.103        link#12            UC              3        0  vmnet8
192.168.103.255    link#12            UHLWbI          1       23  vmnet8
  • Create your machines using Vagrant.
  • Verify that the machines can ping one another using the IP addresses specified for the eth1 interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment