
Using One Network Card Exclusively for a VMWare Virtual Machine on Windows
Contents
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
- 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.
- Configure Windows to not use the second network adapter [VMWare KB]:
To disassociate the network adapter from all protocols except the VMware Bridge protocol:
- 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.
- Right-click the network adapter and click Properties.
- Deselect all protocols except VMware Bridge Protocol.
- 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.
- Open a VMWare Workstation window.
- Choose Edit > Virtual Network Settings.
- 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:
- Open the Virtual Machine Control Panel (Edit > Virtual Machine Settings).
- Select the adapter you want to modify
- Select Custom, and choose the VMnet virtual network you just configured from the drop-down list.
- 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]:
-
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.. -
Remove the three lines from the configuration file that begin with:
ethernetN.generatedAddress ethernetN.addressType ethernetN.generatedAddressOffset
-
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 = ""
-
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
.
I am assuming that ethernet0.checkMACAddress = “FALSE” is not required for this to function correctly, or is that only for ESX?
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.
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?