VMWare Player and VM Networking

VMWare Player is the Virtualization software/hypervisor provided free of charge by VMWare. Player is for personal use. Paid versions are available as VMWare Player Pro or VMWare Workstation. Following link covers the differences between different editions. I have used Virtualbox for most of my VM needs. There were few recent scenarios where I had to use VMWare Player and in this blog, I will share some things that I learnt as part of this process.

Networking Options:

  1. Bridged – This is equivalent to the Bridged option provided by Virtualbox. This is present by default. VMnet0 is used for this.
  2. NAT – This is equivalent to the NAT option provided by Virtualbox. This is available as VMNet8 in the host machine and is present by default.
  3. Host only – This is equivalent to Host only option provided by Virtualbox. The difference is that only 1 network is present by default. This is available as VMNet1 is the host machine. To change the default subnet created, we need vmnetcfg utility.
  4. Custom – This is a variation of Host only option where we can create more networks and associate with VMNet2, 3, etc. This is not available by default and we need vmnetcfg utility to create custom networks.
  5. LAN Segments – This is similar to Custom network. Here, there is no host connectivity and no dhcp servers. Advantage with LAN segment is we dont have limit on the number of networks.

vmnetcfg utility:

vmnetcfg utility is needed to modify dhcp servers, change ip address range allocation for dhcp, create custom networks, edit port forwarding for nat etc. By default, VMWare player does not provide this utility and following workaround can be used to get vmnetcfg and use it with VMWare player. Following are the steps:

  1. Find equivalent Workstation version corresponding to the Player version and download it.
  2. Extract Workstation exe.
  3. Look for core.cab file in the extracted content and extract vmnetcfg.exe and _vmnetcfglib.dll from it.
  4. Rename _vmnetcfglib.dll tp vmnetcfg.dll and copy vmnetcfg.exe ane vmnetcfg.dll to Player install location(\Program files\VMWare Player\)

In my case, I had Player 6.0.5 version. I downloaded equivalent Workstation 10.0.5 version. I extracted the files using:

.\VMware-workstation-full-10.0.5-2443746.exe /e extract

In the “extract” directory, we can find core.cab file and then extract vmnetcfg.exe and vmnetcfglib.dll and copy it.

At this point, we can run the “vmnetcfg.exe” utility. For my usecase, I had to create 2 custom networks using “vmnetcfg.exe” and then use VMNet2 and VMNet3 in Player to create interfaces for the newly created VM. I could share the VMNet2 and VMNet3 network with the host machine.

To get vmnetcfg.exe for Player 7, use the procedure here. The location of the files have been changed in the Workstation 11. We need to download Workstation 11 for Player 7.

Cloning VM:

VMWare player has minimal features compared to VMWare Workstation and VMWare Fusion since Player is a free version. Cloning is not available natively. To clone VM, follow the procedure below:

  1. Copy the VM directory to a new directory. This is usually located under “C:\users”.
  2. Launch VMWare Player and load the new VM (.vmx file) from it(File->Open)
  3. Edit VM properties to rename it. This is available under Options.
  4. Make a copy of VMDK file and put in a new location. This is optional.
  5. Start the new VM. When prompted, select “I have copied the VM”. VMWare will fix everything else.

I would stick to Virtualbox as I feel more comfortable with it. Also, I feel VMPlayer has more restrictions and we need workarounds like the one used for custom network creation. There are some scenarios where the OVA file does not work in Virtualbox and the OVA provider has tested only with VMWare Fusion, Workstation or Player, we will be forced to use VMWare player in those scenarios. There were few good things that I liked in VMPlayer like being able to make dynamic changes to VM, these including changing cpu, memory limit, hard disk size. Also, Virtualbox does not support nested virtualization which VMPlayer supports. (Please refer to my Virtualbox blog for more info)


5 thoughts on “VMWare Player and VM Networking

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s