Managing VMware Virtual Networks and Adapters

From Virtuatopia
Revision as of 15:24, 14 October 2008 by Neil (Talk | contribs) (Removing Virtual Network Adapters)

Jump to: navigation, search

As outlined in the chapter entitled VMware Server Virtual Network Architecture, VMware Server provides two types of virtual network adapter. Virtual network adapters are installed into virtual machines and provide a mechanism for guest operating systems to establish network communications. Host virtual adapters, on the other hand, are installed in the host operating system and are used to establish communication between the host operating system and virtual machines running in VMware Server based NAT and HostOnly based virtual networks.

This chapter covers the creation, removal and configuration of both virtual network adapters and host virtual adapters.

Adding a New Virtual Network Adapter to a Virtual Machine

VMware Server 2 increased the number of virtual network adapters that can be added to a virtual machine from 4 to 10. Although the VI Web Access new virtual machine wizard allows virtual network adapters to be added to configured into a virtual machine it is quite common to need to add additional adapters later in the lifecycle of the virtual machine. Fortunately, VMware Server makes the addition of virtual network adapters quick and easy to achieve.

The first step in the process is to log into the VI Web Access management interface (details of which covered in the A Guided Tour of the VMware Server 2.0 Infrastructure Web Access Interface chapter of this book). Once logged in, identify and select the required virtual machine from the Inventory panel. Just as a physical computer system needs to be shutdown and powered off before the cover is removed and a new network adapter card installed, the virtual machine must be powered off before a new virtual network adapter can be added. The currently select virtual machine may be shutdown by clicking the power off button in the VI web Access toolbar, or by selecting the Power off link in the Commands panel of the workspace.

Once the virtual machine status panel indicates that the virtual machine has been successfully powered off, click on the Add Hardware link in the Commands panel to invoke the VMware Add Hardware Wizard. The wizard is generic in that it allows a variety of different virtual hardware devices to be added to a virtual machine in addition to a virtual network adapter. To proceed with the device installation click on the link labeled Network Adapter to proceed to the network adapter properties screen as illustrated in the following figure:


The VMware Server 2 Add New Network Adapter Wizard


In order to be of use to the guest operating system, the virtual network adapter must be connected to a virtual network. The Network Connection drop down menu provides a list of virtual networks currently configured within the VMware Server environment. These were either selected during the Vmware Server installation process, or subsequently configured by an administrator. If all virtual network options were configured during installation then NAT, HostOnly and Bridged virtual networks should be available for the virtual network adapter to connect to. In the absence of a required virtual network on Linux systems, run the vmware-config.pl script as super-user and configure the missing virtual network type. Assuming the required virtual network is listed in the connections menu, select it and then choose whether the new virtual network device is to be automatically connected to the virtual machine at power on.

Finally, click Next to proceed to the Ready to complete screen and review the configuration summary information listed. if the virtual machine is to be power on automatically immediately after the new virtual network adapter has been added, set the Power on your vietual machine now option before clicking on the Finish button. The new virtual machine subsequently power up with the new virtual network adapter installed and, subject to the configuration settings, connected to the selected virtual network. The new adapter will also be listed in the Hardware panel of the selected virtual machine, together with the name of the network to which it is currently connected.


Removing Virtual Network Adapters

Virtual network adapters may be removed from a VMware Server virtual machine at any time, once again using the VI Web Access management interface. As with the process to add a new virtual network adapter, the virtual machine must be powered off before an adapter can be removed. Begin by selecting the virtual machine from which the virtual device is to be removed from the Inventory panel and clicking the power off button in the toolbar or the appropriate link in the Commands panel. Once the virtual machine is listed as Powered off in the Status panel, click on the down arrow next to the required network adapter in the Hardwarepanel and select Remove:


Removing a Virtual Network Adapter from a VMware Server Virtual Machine


Once the Remove option have been selected a dialog will appear confirmation that the virtual device is to be removed from the virtual machine. Selection of the yes button will proceed with the removal process. The virtual network adapter will disappear from the virtual machine's hardware list and will be absent next time to the virtual machine is powered on.

Modifying Virtual Network Adapter Settings

In addition to adding and removing virtual network adapters it is also possible to configure the current settings of existing adapters. The virtual machine may be power on or off during the editing phase, although the range of options available for configuration differs depending on the current power state (for example, it is not possible to configure the MAC address settings when the virtual machine is powered on).

To modify the settings of a particular virtual network adapter, select the virtual machine to which it is connected from the VI Web Access inventory list, click on the down arrow next to the required device in the Hardware panel and select the Edit... menu option. This will invoke the network adapter settings dialog as illustrated in the following figure:


Configuring virtual network adapter settings


In the above figure, the virtual machine is currently powered on causing the MAC addess settings to be disabled (since it is unwise to change the MAC address of a device while it is in operation). Conversely, had the virtual machine been powered off the options to connect or disconnect the virtual network adapter would have been disabled. An overview of the various settings available is as follows:

  • Connect - This setting is only active when the virtual machine is in the powered on' state. If the virtual network adapter is not currently connected to the designated virtual network, this option establishes a connection.
  • Disconnect' - Also only active when the virtual machine is powered on. Disconnects the virtual machine from the designated virtual network "(much like unplugging the network cable from a physical network interface card).
  • Connect at power on - Controls whether the virtual network adapter is automatically connected to the specified virtual network when the virtual machine is powered on.
  • Network Connection - Specifies the virtual network to which the virtual network adapter is to be connected. This will be one of NAT, HostOnly, Bridged, or a custom network.
  • MAC Address - All network devices (including network adapters) require a MAC address as a form of identification. VMware Server provides the option to have a host generated MAC address assigned to the virtual network adapter, or to assign one manually. If manually assigned, the MAC address must fall within the 00:50:56:00:00:00 through 00:50:56:3F:FF:FF address range to avoid conflicts. This settings is only avialable for modification when the virtual machine is in the powered off state.