There is a possibility to setup VLANs in VMware Workstation.
If you're user of VMware Workstation, you usually use one of the 3 basics networking types provided. Bridget, NAT or Host Only. I just stumbled through this KB explaining how to setup VLANs inside of VMware Workstation environment, and especially if you're running several VMs on different hosts as long as the hosts stays connected.
The downside is that you have to add a second physical NIC to each host where you want to use VLANs…
Here are the steps:
01. Power off all virtual machines on your host first.
02. Now you must add a secondary NIC to the host.
03. You now create a virtual switch on the host, by adding a vmnet to the secondary network card.
04. Launch VMware Workstation and go to Edit > Virtual Network Editor.
05. Click vmnet0 and set it to Host Only. (just temporarily)
06. Select vmnet2 or any unused, unresevered vmnet.
07. Set vmnet2 to Bridged To and from the dropdown menu, select the secondary network card that you just added on this host, and click Apply.
08. Click vmnet0, set it to Bridged To, and from the dropdown menu, select Automatic. ( now the secondary NIC is now dedicated to vmnet2, so you don't see it anymore.) Click Apply and OK
09. Add the chosen vmnet to your virtual machine.
10. In Workstation, edit the settings for the virtual machine which you want to isolate.
11. In the Hardware tab, click Network Adapter and in the right pane, you must select Custom: Specific Virtual Network and from the dropdown menu, select the vmnet adapter that is mapped to the secondary network card. In our example, it is vmnet2. OK.
12. Power on the virtual machine and assign an IP address within the IP range that you would use for this VLAN. Note: To avoid conflicts and confusions, ensure that this IP range is different from your network's existing DHCP scope.
The virtual machines are now on the same VLAN. To aid connectivity between the machines, you may want to assign them all to the same workgroup or join/bind them to the same domain.
Also related to this setup:
Source: KB Article: 1020480
You could also use a feature available with teams called Team Segments and use isolated networks segments for testing and running VMs in isolated environments too. You can see more about Teams and Workstation in my articles below:
With team segments you can:
– Isolate a team completely from the host network. A team LAN segment is undetectable and inaccessible from any other network.
– Create a virtual DMZ or proxy server to securely bridge the team members to the outside network.
– Allow specific network bandwidth and packet loss to each virtual machine on the team.
– Connect all team members fully to host resources