Manually Add and Remove VMware Fusion Virtual Adapters

• Updated May 13, 2017


VMware Fusion exposes command line options that make it easy to add or remove virtual adapters manually.

In this post, I will be adding and removing virtual adapter vmnet7. A fresh install of VMware Fusion does not include this virtual adapter.

Manually Add VMware Fusion Virtual Adapter

The following commands will create vmnet7, a VMware Fusion host only virtual adapter assigned to network 192.168.240.0/24:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgadd VNET_7_DHCP no
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgadd VNET_7_HOSTONLY_SUBNET 192.168.240.0
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgadd VNET_7_HOSTONLY_NETMASK 255.255.255.0
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgadd VNET_7_VIRTUAL_ADAPTER yes

Restart VMware Fusion networking to apply the changes:

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

Perhaps you also want that network to route out to the internet via NAT. No problem, simply run the following command or include it with the other commands above:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgadd VNET_7_NAT yes

Once again, to apply the change, restart VMware Fusion networking with the three vmnet-cli commands above.

The vmnet-cfgcli command will modify entries in /Library/Preferences/VMware\ Fusion/networking. This file can also be edited by hand and any changes can be applied by restarting VMware Fusion networking with the three vmnet-cli commands above.

Manually Remove VMware Fusion Virtual Adapter

To remove the vmnet7 VMware Fusion virtual adapter, you can edit /Library/Preferences/VMware\ Fusion/networking, remove all lines containing VNET_7, and restart VMware Fusion networking, or you can use the following commands and then restart VMware Fusion networking:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgremove VNET_7_DHCP
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgremove VNET_7_HOSTONLY_SUBNET
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgremove VNET_7_HOSTONLY_NETMASK
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgremove VNET_7_VIRTUAL_ADAPTER

If you configured vmnet7 to use NAT, also run the following command and then restart VMware Fusion networking:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli vnetcfgremove VNET_7_NAT

References

If you found this post useful and would like to help support this site - and get something for yourself - sign up for any of the services listed below through the provided links.

The following links are part of affiliate programs, and I will receive a referral payment from any of the services you sign-up for.

  • Get Faster Shipping: About to order some stuff on Amazon but want to get more value out of the money you would normally pay for shipping? Sign-up for a free, 30-day trial of Amazon Prime to get free two-day shipping, access to thousands of movies and TV shows, and more.
  • Start Investing Now: Looking to start investing some of your saved income? Get started by opening an account with Webull, where upon sign-up and opening a brokerage account with an initial deposit of $100 or more you will receive free stock(s). The promotions are always changing, so be sure to click the link to see the latest.

Thanks for reading and take care.