Contents
Switching Ethernet Adaptors in a Virtual Machine
You may find it helpful to configure a virtual machine so it can use one
virtual switch or Ethernet
adapter when you
are in one location and a different virtual switch when you are somewhere else.
The most common case would involve a laptop computer that is sometimes used
with a PC Card (PCMCIA) adapter and sometimes docked in a docking station that
has its own physical network adapter.
If you are using bridged networking, the steps covered in this topic will
allow you to configure your virtual machine so it can use both physical network
adapters, with each physical adapter connected by a different virtual switch.
You will create two separate Workstation configuration files (
.cfg
files), both of which point to the same virtual or raw disk. One will use
standard bridged networking on the VMnet0 virtual switch. The other will
use custom bridged networking on the VMnet2 virtual switch. You will use
one configuration when you want to connect to a network using the PC Card
network adapter and the other when you want to use the docking station's
adapter.
To switch virtual Ethernet
adapters
in a virtual machine:
- Follow the usual steps to configure your Workstation
virtual machine with one virtual Ethernet
adapter that uses bridged networking on
the VMnet0 switch. For example, perform the configuration while the PC
Card adapter is in use.
- After you have tested the initial configuration, shut down
your virtual machine and exit Workstation.
- Switch the setup so the other physical network adapter is
being used. For example, if you first configured the computer while the PC Card
adapter was in use, you should now set the computer up in the docking station
so its physical network adapter is in use.
- Open a shell window.
- Change to the Workstation programs directory. If you have
installed Workstation in the default location, the command is:
cd <UserHome>/vmware/
- Run the following command:
vnetconfig -s -ib vmnet2
- If you see a dialog box that asks which network adapter to use,
choose the adapter that is currently installed (not the one you already
configured for bridged networking in step 1).
- Start the service "VMnet Bridge (for VMnet2)". If it does not
start, reboot the system and try to start it again.
- Change to the directory where the files for the virtual
machine you are configuring are stored.
- Copy the .cfg file under a different name, so that you
have two copies -- one to use when you are using the PC Card adapter (referred to
here as pcmcia.cfg)
and one to use when you are using the network
adapter in the docking station (referred to here as
nic.vmx).
- Launch Workstation, select Open Existing Virtual
Machine, and open the .cfg
file for the virtual adapter you will set
up on VMnet2 (
nic.vmx in our example). You will probably have to
browse to locate it.
- Open the Configuration Editor (Settings > Configuration
Editor) and select Ethernet
Adapter.
- From the drop-down list on the right, select Custom
(VMnet2).
- Click OK to save your changes and close the Configuration
Editor.
- When you are using the PC Card adapter, launch your virtual
machine using pcmcia.cfg.
When you are using the adapter in the docking
station, use
nic.vmx. Both configuration files will be for the same
virtual machine. When you choose one, you will just be choosing which network
adapter to use.
Note:
If you make a change to other aspects of one configuration, remember to make
the same change to the other configuration the next time you open it.
Back to top
© 2001 VMware, Inc.
All rights reserved.