iXBT Labs - Computer Hardware in Detail

Platform

Video

Multimedia

Mobile

Other

Networking in Virtual PC and Virtual Server



Virtualization is one of the most promising computer technologies today. According to many experts, virtualization technologies possess a huge potential and enter Top Three of the fastest growing ones. Many manufacturers (both software and hardware) make sure their products support virtualization. There is nothing surprising about that: leading IT analysts predict that half of all computer systems will be virtual by 2015. Special attention is presently paid to OS virtualization, both in terms of virtualization of the enterprise server infrastructure as well as in terms of desktop virtualization. A virtual server infrastructure possesses much higher capacities than the real one: it's more flexible, and it has many tools to provide high availability, and it's much easier to administrate and deploy. Desktop systems are virtualized for various user tasks: from creating secure virtual environments (to isolate software) to portable virtual machines (to be used in the office and at home).

Microsoft certainly couldn't ignore virtualization technologies in both aspects. Back in 2003 the company bought Connectix with its Virtual PC. That's how Microsoft virtualization history started.

At that time it was not clear how virtualization could allow to use computer systems more efficiently. So Microsoft did not give high priority to Connectix Virtual PC. It just launched Virtual PC 2004, while VMware was aggressively promoting its VMware Workstation. The time showed that virtualization was of great interest to home and corporate users. So Microsoft had to catch up with VMware, which had staked much on virtualization. Having launched Virtual Server 2005, based on Virtual PC, Microsoft righted itself in the eyes of users. However, Standard and Enterprise editions of Virtual Server were not free of charge, so they were not of much interest. Virtual Server 2005 R2 was released in 2006. Microsoft had to make it free, because VMware announced free VMware Server for the SMB sector (Small and Medium Business), which features surpassed those of Virtual Server.

Both companies are presently working on powerful tools to manage virtualization servers, which will determine efficiency of a virtual infrastructure in general. Not long ago Microsoft released the first service pack for Virtual Server R2, which allowed to seriously consider this product for using in industrial environments. Virtual PC 2007 was released in 2007 - a noticeably faster desktop virtualization platform with Windows Vista support.

In the light of quick growth of hardware capacities, home users often support several concurrent virtual systems joined in LAN for various experiments as well as safe Internet operations. Maintaining a virtual network on the Virtual Server platform is one of the key tasks of system administrators as they deploy a virtual infrastructure. This article will give you all details about configuring networks on Microsoft virtualization platforms.

Organizing Virtual Networks on Microsoft Virtualization Platforms

When several virtual machines are running on a single physical computer concurrently, you have to configure networking between guest and host operating systems depending on their tasks. These are basic usage scenarios of virtual networks on a virtualization platform:

  • creating a virtual machine, which network adapter is shared with a physical network card - as a result, a virtual machine acts as an independent computer in the extranet
  • creating isolated networks with several virtual machines in order to test software, to train personnel, and to use linked servers within an intranet
  • working with a virtual machine in an extranet, when you need only connections initiated by this virtual machine to the extranet

Microsoft virtualization platforms offer a networking type for each option.

Virtual Networking

Microsoft offers this network type to let a virtual machine provide services to an extranet (relative to the host system). In this case a virtual machine acts as an independent computer in a network with the host computer. If there is a DHCP server in the network (Dynamic Host Configuration Protocol) to assign IP addresses, a virtual machine will get it and will work as an independent system in the network (otherwise, you will have to specify an external IP manually). Here is a diagram of this networking type:




Virtual Networking diagram

This networking type is assigned to a virtual machine by default, because it fits most usage scenarios. This virtual networking type also connects a host system with guest operating systems.

Local Only Networking

This networking type allows to join several virtual machines into an isolated network within a host system, so that components of the external network (relative to the host system) do not have access to them. Here is the diagram:




Local Only Networking Diagram

This networking type does not allow virtual machines to interact with the host system.

Shared Network with NAT (Network Address Translation)

Security is one of the most important issues to be taken into account as you plan to use virtual machines in extranets. If a virtual machine is created only to let users and software work with services in extranet without granting its services to the extranet, Shared Networking will be an ideal choice.




NAT Networking Diagram

In this case a host operating system has a DHCP server, which assigns internal IP addresses to virtual machines within the host network. A virtual machine can initiate a connection to extranet with a special service (Network Address Translator) that translates IP addresses. In this case virtual machines use a single IP address of the host system (Shared IP), and they are not visible to extranet.

Configuring Virtual PC Network

As you plan how to deploy several virtual machines on a single physical host, you should think about their network structure beforehand. Virtual PC is often used to create a virtual environment for software tests or to create portable user environments. You should often provide access to extranet for virtual machines as well as their interaction between each other. You can specify individual networking options for each virtual machine by attaching one or several virtual network interfaces to a given network type. Virtual PC allows to create up to four virtual network adapters for a single virtual machine. A guest system detects emulated adapters as DEC / Intel 21140 Based PCI Fast Ethernet adapter. They are fully compliant with IPv6 as well as PXE (Preboot eXecution Environment). Microsoft virtualization platforms do not support Token Ring networks.

When you install a virtual machine in Virtual PC, you can see a network icon in the bottom left corner of the console, which blinks as a virtual machine addresses a virtual network adapter. Right-click this icon and choose "Networking Settings", to configure network for a virtual machine. You can also open network settings by choosing in the main menu "Edit" -> "Settings" -> "Networking":




Configuring network in a virtual machine

Note

A virtual machine usually applies network settings on-the-fly, you don't have to reboot a virtual machine.

Not Connected

If you don't want your virtual machine to have a network adapter so that it couldn't access network resources of the host system and other guest systems, choose "Networking", "Not Connected" for the first network adapter in your virtual machine:




Configuring network in a virtual machine

Remember, if you don't need networking in a virtual machine, you'd better choose this option, because it may speed up applications that check for a network connection (owing to no latencies).

Virtual Networking

Virtual PC users very often have to surf Internet in a guest system. But a guest system must also provide some services to extranet (for example, shared folders). In this case "Virtual Networking" will do - virtual machines within a host system interact between each other and with extranet.

To assign this scenario to a virtual network adapter, choose "Networking" and then your physical network adapter in virtual machine settings:




Configuring network in a virtual machine

Note

A virtual machine on the Virtual PC platform can be started without being connected to other guest systems on a host computer. You can run a virtual machine from a command prompt. Click "Start" -> "Run" -> type "cmd" and then press Enter. Then execute the following command:

"<path to Virtual PC>\Virtual PC.exe" –pc <virtual machine name> -extnetworking -launch

(-extnetworking does not affect Shared Networking.)

Local Only

If you choose this networking type for guest systems, virtual machines will interact only with each other, they won't get access to extranet of the host system. In this case network traffic between virtual machines does not reach the host system, it's located in intranet. Keep in mind that Virtual PC does not use a DHCP server in this networking type, so you'll have to configure IP addresses of virtual machines manually. It should be noted that a network adapter of one of guest systems working in promiscuous mode in such a virtual network (when a network card accepts all packets, not just the ones sent to it) can intercept traffic of other virtual machines.

In order to set a virtual network adapter to this mode, choose "Networking" and then "Local Only":




Configuring network in a virtual machine

Shared

As we have already mentioned, this networking type "hides" a virtual machine behind a host operating system. It allows to initiate connections to extranet from a guest system via a modem or LAN connection (however, Microsoft does not recommend using a modem in virtual machines). Access to virtual machines from extranet will be impossible (you should take it into account as you work in a virtual machine). In this case a DHCP server works within a virtual network, which assigns 192.168.131.x internal addresses to virtual machines, where x ranges from 1 to 253 (unfortunately, Virtual PC does not allow to change this range). Remember that this networking type does not support interaction between virtual machines as well as connections from a host system to a guest one. Only the first virtual network adapter can be used for Shared Networking.

In order to set a virtual network adapter to this mode, choose "Networking" and then "Shared Networking (NAT)":




Configuring network in a virtual machine

If you do not belong to the administrator group in a host system, you cannot work with the extranet via ICMP (Internet Control Messages Protocol).

Setting up several virtual networks in a host system

As you deploy virtual machines on desktops, you often have to configure a network between virtual machines and a physical host, when there is no connection to an extranet. Sometime a physical computer does not have a network adapter at all. However, even in this case you can set up networking between a host OS and virtual machines. Besides, in some cases you must set up several isolated "Local Only" virtual networks, where guest systems will interact. Microsoft offers a simple and elegant solution: virtual machines work with the host system via Loopback Adapter, which connects virtual machines and a host system into a common isolated network. As you add this interface, a host system allows to choose it as a network adapter in a virtual machine, so they can interact with a host within a common virtual network. In this case a loopback adapter acts as a virtual switch or hub, to which network adapters of the host and guest systems are connected. You can add several such adapters to create several virtual isolated networks. These networks can be connected by a virtual machine with two virtual network adapters - you just assign each adapter to a corresponding loopback adapter of the host system. When you access Internet from a virtual machine in such network, don't forget to enable Internet Connection Sharing in the host system.

To add a loopback adapter, do the following steps in the host system:

  1. Click "Start" -> "Settings" -> "Control Panel" -> "Add Hardware".
  2. Click "Next", choose "Yes, I have already connected the Hardware", then click "Next":



    Adding a loopback adapter

  3. Then choose the last "Add a new hardware device" element from the list and click "Next":



    Adding a loopback adapter

  4. Choose "Install the hardware that I manually select from a list" in the new window and click "Next":



    Adding a loopback adapter

  5. Choose "Network Adapters" from the list and click "Next":



    Adding a loopback adapter

  6. In the Manufacturer list choose "Microsoft" and in the next list choose "Microsoft Loopback Adapter":



    Adding a loopback adapter

Then click "Next" and "Finish". The list of hardware devices will now contain a loopback adapter in the Network Adapters category. So you can "assign" virtual network adapters to it like to a switch.

Open network settings of a virtual machine ("Virtual PC Console" -> "Settings"), choose "Networking", and bind a virtual network adapter to the loopback adapter:




Binding a virtual network adapter

After that, specify an IP address and network mask for the network adapter. You are recommended to choose an IP address within the 192.168.x.y range (where x ranges from 0 to 255, y – from 1 to 254) to avoid conflicts with other extranet addresses. Then you should configure the IP address of a network adapter in the guest system in compliance with the host network (x must match this number in the host, 255.255.255.0 mask).

Other adapters can be bound to other interfaces to join virtual networks.

Using Wi-Fi adapters in Virtual PC 2007

Some users of Virtual PC 2007 need to use a wireless network in a virtual machine through a Wi-Fi adapter in the host system. But such adapters are not always recognized. Users often face the following problem:




Wi-Fi adapter detection error

In this case virtual machines won't be able to access extranet and host resources, if this Wi-card is used for Virtual Networking, because Virtual Machine Network Services are disabled for this connection. To make virtual machines work with a Wireless adapter, right-click the Wi-Fi network connection in the host system and choose "Properties". Select the "Virtual Machine Network Services" checkbox:




Activating Virtual Machine Network Services

Configuring Virtual Server R2 network

Unlike Virtual PC, Virtual Server R2 has more features to configure networking between virtual machines, but their network principles are the same. Virtual Server uses two networking types:

  • Internal Network (similar to Local Only in Virtual PC)
  • External Network (it uses a physical network adapter of the host system to work with extranet)

After you install Microsoft Virtual Server, it automatically creates one internal and several external networks (as many as the number of physical network adapters in the host system).

To see the list of available networks in Virtual Server, choose "Virtual Networks" -> "Configure" -> "View All":




The list of available networks in Virtual Server

Then you will see the list of available virtual networks:




The list of available virtual networks

As you can see in the picture, we can use a virtual loopback adapter just like in Virtual PC. To edit virtual network properties, point a mouse cursor at a virtual network name and choose "Edit Configuration".




Editing virtual network properties

We can edit network or DHCP settings here. As you click "Network Setting", you will open a virtual network editor:




Virtual network editor

You can change the name of a virtual network. The network adapter field specifies a type of the virtual network. If it contains "None (Guest Only)", virtual machines, which network adapters are connected to this network, will work only with each other. Network of the host system will be inaccessible (similar to Local Only in Virtual PC). If you choose a physical adapter of the host system, the networking type will be similar to Virtual Networking in Virtual PC.

You can add a virtual network adapter to the edited network in the "Disconnected virtual network adapters" field. You can edit a description in the "Virtual network notes" field.

If you get back and click the DHCP Server link, you can enable and configure a DHCP server for this virtual network:




Configuring a DHCP server

DHCP settings include all necessary properties of a network adapter it specifies at startup (starting and ending IP addresses, default gateway, subnetwork, DNS and WINS servers, etc). As you configure a DHCP server, you must take into account that the first 16 addresses of a given range are reserved by the server and are never assigned to virtual machines. DHCP server is disabled by default for external networks, so that virtual machines could obtain network settings from the external network.

After you configure a virtual network, you may proceed to the configuration of virtual network adapters. You can also create your own virtual network by clicking the Add link in the Virtual Networks category. Virtual Server allows to create an unlimited number of virtual networks with as many virtual machines as you like. When you create a virtual network, a .vnc file with network settings is created in the \Documents and Settings\All Users\Documents\Shared Virtual Networks folder. You can then import this file to Virtual Server. Remember that virtual networks cannot be moved to another physical host, because their settings depend on the host hardware.

Configuring network adapters in a virtual machine

To configure one or several virtual network adapters, move the mouse cursor to the name of a virtual machine in the main Virtual Server window, then click "Edit Configuration" and "Network adapters".




Configuring network adapters in a virtual machine

On this page you can choose a virtual network, to which a virtual network interface will be added, add another network interface (up to four interfaces in a virtual machine), and specify a static or dynamic MAC address (Media Access Control) of a network adapter. Microsoft recommends to use dynamic MAC addresses to avoid network conflicts between virtual machines. If you use static addresses, make sure they are unique in each virtual machine (this is especially important, when you deploy virtual machines from a single virtual appliance on different servers). If there is still a conflict of MAC addresses, in the .vmc file replace the line

<ethernet_card_address type="bytes">0003FFxxxxxx</ethernet_card_address>

with

<ethernet_card_address type="bytes"></ethernet_card_address>

then reboot the guest system, so that Virtual Server could assign a unique MAC address to the network adapter.

Like in Virtual PC, you can disable networking in a virtual machine by choosing "Not Connected" in the "Connected to" field. Virtual Server does not have Shared Networking. But you can easily get similar functionality by binding virtual machines to a loopback adapter and then enabling Internet Connection Sharing.

Conclusion

Virtual PC and Virtual Server platforms allow users to create virtual networks with various interaction scenarios. Even though they are not configured as flexibly as in VMware products, they still allow all popular scenarios of using several virtual machines on a single host working in one or several isolated or connected networks. As both Microsoft platforms are free, they can be used by enthusiasts, home users, and small companies. Virtual Server and Virtual PC offer a huge field for experiments, virtual networks training, if you don't have an opportunity to build a real network.

Alexander Samoilenko (admin@vmgu.ru, www.vmgu.ru)
October 9, 2007

Write a comment below. No registration needed!


Article navigation:



blog comments powered by Disqus

  Most Popular Reviews More    RSS  

AMD Phenom II X4 955, Phenom II X4 960T, Phenom II X6 1075T, and Intel Pentium G2120, Core i3-3220, Core i5-3330 Processors

Comparing old, cheap solutions from AMD with new, budget offerings from Intel.
February 1, 2013 · Processor Roundups

Inno3D GeForce GTX 670 iChill, Inno3D GeForce GTX 660 Ti Graphics Cards

A couple of mid-range adapters with original cooling systems.
January 30, 2013 · Video cards: NVIDIA GPUs

Creative Sound Blaster X-Fi Surround 5.1

An external X-Fi solution in tests.
September 9, 2008 · Sound Cards

AMD FX-8350 Processor

The first worthwhile Piledriver CPU.
September 11, 2012 · Processors: AMD

Consumed Power, Energy Consumption: Ivy Bridge vs. Sandy Bridge

Trying out the new method.
September 18, 2012 · Processors: Intel
  Latest Reviews More    RSS  

i3DSpeed, September 2013

Retested all graphics cards with the new drivers.
Oct 18, 2013 · 3Digests

i3DSpeed, August 2013

Added new benchmarks: BioShock Infinite and Metro: Last Light.
Sep 06, 2013 · 3Digests

i3DSpeed, July 2013

Added the test results of NVIDIA GeForce GTX 760 and AMD Radeon HD 7730.
Aug 05, 2013 · 3Digests

Gainward GeForce GTX 650 Ti BOOST 2GB Golden Sample Graphics Card

An excellent hybrid of GeForce GTX 650 Ti and GeForce GTX 660.
Jun 24, 2013 · Video cards: NVIDIA GPUs

i3DSpeed, May 2013

Added the test results of NVIDIA GeForce GTX 770/780.
Jun 03, 2013 · 3Digests
  Latest News More    RSS  

Platform  ·  Video  ·  Multimedia  ·  Mobile  ·  Other  ||  About us & Privacy policy  ·  Twitter  ·  Facebook


Copyright © Byrds Research & Publishing, Ltd., 1997–2011. All rights reserved.