VMware Fusion 11.5: Creating multiple custom virtual networks
Disclosure. This post contains links to products (marked with *) that may earn us a small commission at no extra cost to you, should you click on them and make a purchase.
This guide will show you how to create virtual networks so that you can test various network infrastructure configurations on a single Mac with VMware Fusion (standard and pro).
Virtual networks are useful for testing the network architecture of a solution before putting it into production. For example, you might want to test routing between subnets to simulate splitting up your network, as the following diagram demonstrates.
As you can see in the diagram above, we’re using a single MacBook Pro running VMware Fusion 11.5* to host three virtual machines with three virtual switches.
The two custom virtual switches (which we’ll find out how to create soon) are used to separate public facing web servers from database servers, so if a web server gets compromised, it’s harder for an attacker to gain full access to the database server or machines on the LAN.
In this example, we’ve used a pfSense firewall virtual machine to route the traffic between the zones by adding three virtual NICs that are connected to each virtual switch.
How to create custom virtual switches with the standard version of VMware Fusion
It’s easier to create virtual switches with the Pro version of VMware Fusion because there’s a user interface for editing the networks. It’s possible with the standard version by editing config files.
The directory containing the network config files is:
We’re going to add two new virtual switches (vmnet9 and vmnet10 in the diagram above) by opening the
networking config file.
sudo vim /Library/Preferences/VMware\ Fusion/networking
Adding the following to the networking file will create two new virtual switches named
answer VNET_9_DHCP no answer VNET_9_HOSTONLY_NETMASK 255.255.255.0 answer VNET_9_HOSTONLY_SUBNET 10.1.2.0 answer VNET_9_NAT no answer VNET_9_VIRTUAL_ADAPTER yes answer VNET_10_DHCP no answer VNET_10_HOSTONLY_NETMASK 255.255.255.0 answer VNET_10_HOSTONLY_SUBNET 10.1.3.0 answer VNET_10_NAT no answer VNET_10_VIRTUAL_ADAPTER yes
Restart VMware Fusion and then check the networks have been added by modifying the network adapter of a virtual machine.
As you can see in the screenshot above. The custom virtual switches have been created and you can see the network IP address they have been given on the right.
Creating custom virtual switches with VMware Fusion Pro
VMware Fusion Pro 11.5 has a user interface for creating/modifying virtual networks. Here is a link to the official documentation showing how to edit virtual networks with the pro version.
This guide demonstrated a scenario where you might want to create multiple custom virtual switches when using VMware Fusion 11.5*, and how to do it by modifying the config files.
P.S. Are you new to VMware? Or do you have experience and want to expand your knowledge? We've put together a list of The Best VMware Books, which help you learn their data center products fast.