If you use VMware Workstation for your home lab or daily DevOps and other purposes, you may want to have the ability to have different VMware Workstation VMs reside on different VLANs. This functionality allows placing different VMs on different virtual networks and having the traffic flow as expected. How can you do this? Is this feature natively found in VMware Workstation? Let’s look at VMware Workstation VLAN tagging configuration and the steps required.
Is VMware Workstation VLAN tagging natively supported?
Unfortunately, as far as I am aware and have tested, there is no native way to tag VLANs in VMware Workstation. For external connectivity, VMware Workstation expects a “physical” adapter for you to bridge to for external connectivity.
It would be great if VMware Workstation would allow the creation of VLAN-tagged network adapters where you could specify the VLAN tag as you create the virtual network. However, as you see below, when creating a new virtual network in the Virtual Network Editor in VMware Workstation, you have no option to do this.
It would be great to see more options presented in the Virtual Network Editor in VMware Workstation to control networking, such as VLAN tagging. However, the only options you have are:
For external connectivity, you need to create a bridged or NAT’ed connection. The bridged connection allows you to choose a “physical” network adapter to bridge the connection to. NAT’ing allows translating network traffic behind an address assigned to an adapter. So you will receive a DHCP address for hosts connected to the NAT’ed address, and they will traverse out the connection much like you NAT traffic behind a firewall.
It would be great here to be able to create a new network that is simply a virtual network adapter created on the VMware Workstation host that would send tagged VLAN frames. However, there is no option at this point to do this. However, combining client Hyper-V with VMware Workstation is a way to do this.
Using Client Hyper-V to create tagged virtual network adapters
Installing Windows 10 or 11 client Hyper-V adds the capability to essentially create virtual network adapters that are tagged for a specific VLAN. You can then take the virtual network adapters added by Hyper-V and use these as the target of bridged connections in VMware Workstation. Let’s see how we can do this. If you are wondering, yes, you can have Hyper-V and VMware Workstation on the same machine as of VMware Workstation 15.5.
First, install the Hyper-V Platform and Management Tools.
Next, you can use the Hyper-V manager and create a new External Hyper-V virtual switch. We are creating a parent Hyper-V switch that can be used to create tagged Hyper-V virtual network adapters that will tag the VLAN traffic.
Now that we have the parent External Hyper-V network switch in place, we can use a PowerShell cmdlet to create our tagged virtual network adapters. In the cmdlet syntax below, you tell Hyper-V to create a new VMNetworkAdapter and give it a name. You also tell it which parent Hyper-V virtual switch you want it to be associated with. Finally, you are setting the VLAN ID.
Add-VMNetworkAdapter -ManagementOS -Name "MYVLAN-tag300" -SwitchName "VLAN Tagging Switch" -Passthru | Set-VMNetworkAdapterVlan -Access -VlanId 300
Looking at your available network connections in Windows 10, you will see your new virtual network adapter named with the name entered in the PowerShell one-liner. Also, I have highlighted below, you will see your parent Hyper-V virtual switch also.
Now, below, you can see the adapter number that you will need to reference in VMware Workstation.
Going back to VMware Workstation, create a new virtual network. Then change the virtual network to Bridged. When you select Bridged, you can then select the virtual network adapter from the dropdown. Find the adapter you identified in the step above.
Once you have the new virtual network created, you will be able to connect your guest virtual machine to this network in VMware Workstation, and the machine will have the VLAN traffic tagged accordingly. An advantage of this is that it does not require special network adapter drivers or software like the Intel ProSet drivers.
VMware Workstation VLAN Tagging FAQs
- What are VLAN tags? VLANs are a layer 2 networking construct that adds a special VLAN header to an Ethernet frame. It essentially allows the partitioning of networks into separate broadcast domains allowing separation for security and other reasons.
- Does VMware Workstation support VLAN tagging natively? No. You can’t enter VLAN IDs natively in the virtual network editor found in VMware Workstation. However, by installing Hyper-V and the Hyper-V management tools, you have the ability in Windows 10 and 11 to add virtual network adapters that can be used to bridge your VMware Workstation networks to, adding the VLAN IDs.
- Can you run VMware Workstation and Hyper-V on the same machine? Yes, this has been supported by VMware since VMware Workstation 15.5.
- Can you run multiple VLANs in VMware Workstation? Yes, by adding multiple virtual network adapters using the Hyper-V PowerShell tools, you can connect your VMware Workstation virtual networks to multiple VLANs.
VMware Workstation VLAN Tagging Video
If you want to have multiple virtual machines running in different VLANs in VMware Workstation, you can’t tag VLAN frames natively in VMware Workstation. This feature would be greatly appreciated by the VMware Workstation team if that could be added in the future. However, in the meantime, this is something that can be done by adding Hyper-V and management tools to the workstation and then bridging your VMware Workstation network adapters to the Hyper-V virtual switches tagged with the VLAN IDs.