Windows
26 June 2011 3 Comments

Using One Network Card Exclusively for a VMWare Virtual Machine on Windows

Let’s say you have a Windows computer with one network card. You are running VMWare on this computer, and you want to have network access from your Virtual Machine(s). There are many ways to accomplish this with VMWare, i.e. NAT, but for true separation you need another hardware network card.

This article explains how to create a setup where Windows uses one network card, and VMWare uses the other.

1: Install and Configure Second Network Card

  1. Install the second network card and power on the Windows. Windows will automatically install the drivers and start using the second network adapter alongside the existing one – it will request an IP for both network adapters.
  2. Configure Windows to not use the second network adapter [VMWare KB]:
To disassociate the network adapter from all protocols except the VMware Bridge protocol:
  1. In the Windows host, open the network adapter settings within Control Panel.
    • Windows XP – Click Start > Control Panel and open Network Connections.
    • Windows Vista or Windows 7 – Click Windows > Control Panel and open View network Status and Tasks > Change Adapter settings.
  2. Right-click the network adapter and click Properties.
  3. Deselect all protocols except VMware Bridge Protocol.
  4. Click OK. The network adapter is now available in the Virtual Network Editor and is not used by the host. Virtual machines can use this adapter and the traffic does not have any effect on the host.

2: Configure the VMWare

Next, we must create a the proper bridged connection in VMWare [VMWare KB]. This will allow the VM to use the second network adapter.

  1. Open a VMWare Workstation window.
  2. Choose Edit > Virtual Network Settings.
  3. Configure one of the VMNet# interfaces to be Bridged. Select your second network adapter In the Bridged to dropdown. It should look somewhat like this:


Now, we must assign the Bridged interface to our Virtual Machine:

  1. Open the Virtual Machine Control Panel (Edit > Virtual Machine Settings).
  2. Select the adapter you want to modify
  3. Select Custom, and choose the VMnet virtual network you just configured from the drop-down list.
  4. Click OK to save your changes and close the Virtual Machine Control Panel.

3: Changing the MAC

Now after booting up your Virtual Machine, you will see that the VM’s connection is bridged through the second network adapter, and it should be fully functional. However, the MAC address your Virtual Machine uses is (by default) not the hardware address of the second network card. Instead, VMWare generates and uses a MAC address in a specific range.

If you want to use the original MAC address (of the new network card), use these steps [VMWare KB]:

  1. Open the virtual machine’s .vmx configuration file with a text editor. For more information about editing a virtual machine’s configuration file (.vmx) check out this page..

  2. Remove the three lines from the configuration file that begin with:

    ethernetN.generatedAddress
    ethernetN.addressType
    ethernetN.generatedAddressOffset
  3. To change the MAC address to a non-vmware address (in the case of a P2V where software on the PC is licensed against the original MAC address) add these lines to the .vmx:

    ethernetN.addressType = "static"
    ethernetN.address = "
    "
  4. Save the configuration file.

A real life example looks like this:

ethernet0.addressType = "static"
ethernet0.address = "01:2A:54:34:B3:FF"

Now the Virtual Machine will use the MAC address 01:2A:54:34:B3:FF.

Tags: adapter for vm, isolated mac, , nic, nic for vm, virtual machine, virtual machine settings, virtual network settings, vmware, windows 2003, windows xp

3 Responses to “Using One Network Card Exclusively for a VMWare Virtual Machine on Windows”

  1. Stephen 9 November 2011 at 4:48 pm #

    I am assuming that ethernet0.checkMACAddress = “FALSE” is not required for this to function correctly, or is that only for ESX?

    Reply
    • tboerman 10 November 2011 at 11:01 am #

      The checkMACAddress setting allows assigning MAC addresses outside the VMWare ranges.

      No, it worked without touching this setting, with VMWare Workstation. I guess the setting is only required when using ESX.

      Reply
  2. Tomasz Chrapek 3 December 2012 at 2:19 pm #

    Hi I have a question regarding step 1: is there a way to disassociate the network adapter from all protocols except the VMware Bridge in Linux as well?

    Reply