- 1 Tips and Considerations When Creating Virtual Machines in Azure
- 2 The End of the Road for Windows Server 2003 and 2008
- 3 Move-VM, Move-VMStorage and Compare-VM PowerShell cmdlets for Hyper-V
- 4 Key Considerations for WSUS 6.2 on Windows Server 2012 R2
- 5 Using Amazon Glacier or S3 as an Online Backup Server
Creating Custom Virtual Networks for VMware Player
VMware Player doesn't offer full customization of the virtual network adapters for your virtual machines. This can be a problem if you have specific networking needs, like custom IP address subnets or ranges, or when multiple physical adapters are installed on the host machine.
In version 5 of VMware Player, VMware has added the ability to choose which physical adapter(s) to use in the Bridged mode, in case you have multiple physical adapters on the host machine and it automatically selects the wrong one. However, you still can't specify custom IP settings for the NAT or Host-only modes.
But as you'll discover in this tutorial, you can use the Virtual Network Editor (vmnetcfg.exe) from VMware to create/modify custom virtual adapters and then assign them to virtual machines by editing their configuration (.vmx) file.
Downloading the Virtual Network Editor to Create Custom Virtual Networks
The Virtual Network Editor utility is no longer included or installed with VMware Player, so you must manually extract it from the VMware Workstation:
- Download and run the VMware Workstation Trial installation file, but don't actually install it.
- Go to your Windows temp directory. You can quickly do this by typing "%temp%" into the Run prompt or any Windows Explorer window or dialog.
- Find and open the temporary installation directory for the VMware Workstation Trial, which will be in a directory named VMware_ along with some numbers, such as VMware_1347648287.
- In the VMware installation temp directory, open the core.cab file and copy vmnetcfg.exe to the installation folder of VMware Player — for example, C:\Program Files\VMware\VMware Player.
Now you can run the Virtual Network Editor (vmnetcfg.exe) and even add a shortcut for it on your desktop or the Start Menu folder. And when you open the Virtual Network Editor you can modify the default virtual networks and add custom ones as well.
As we discussed in our previous article, if you want to use the Bridge mode and want to choose which adapter(s) you want to bridge with, select the VMnet0 interface, and from the Bridged to drop-down menu, select the desired adapter.
Assigning Virtual Network Adapters to Virtual Machines
To assign them to a certain virtual machine you must open and edit the VM's configuration (.vmx) file:
- Go to where your virtual machine(s) images are kept (such as C:\Users\username\My Documents\My Virtual Machines\machinename.) and open the configuration (.vmx) file in Notepad or other plain-text editor.
- Find the ethernet0.connectionType setting and change it to "custom", for instance: ethernet0.connectionType = "custom"
- Add the ethernet0.vnet setting under the next line with the value equal to the desired virtual network name. So, for instance, if you want the virtual machine to be assigned to VMnet2, you'd add: ethernet0.connectionType = "VMnet2"
And if you'd like to add multiple virtual network adapters to a virtual machine, you can add a new set of settings with ethernet1.connectionType, ethernet2.connectionType and so on. And again, if you'd like to assign them to a custom adapter, add the new setting such as ethernet1.vnet, ethernet2.vnet and so on.
An important note to keep in mind, any changes made on the Network Adapter settings from the VMware Player GUI will break any custom settings you've made and you'll have to make the changes again.
Eric Geier is a freelance tech writer — keep up with his writings on his Facebook Fan Page. He's also the founder of NoWiresSecurity, a cloud-based Wi-Fi security service, and On Spot Techs, an on-site computer services company.
Read more on "Server Virtualization Spotlight" »