- 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
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
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
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
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
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
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
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:
"
(-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
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:
- Click "Start" -> "Settings" -> "Control Panel" -> "Add Hardware".
- Click "Next", choose "Yes, I have already connected the Hardware", then click "Next":
Adding a loopback adapter
- Then choose the last "Add a new hardware device" element from the list and click "Next":
Adding a loopback adapter
- Choose "Install the hardware that I manually select from a list" in the new window and click "Next":
Adding a loopback adapter
- Choose "Network Adapters" from the list and click "Next":
Adding a loopback adapter
- In the Manufacturer list choose "Microsoft" and in the next list choose "Microsoft Loopback Adapter":
Adding a loopback adapter
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
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
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)
To see the list of available networks in Virtual Server, choose "Virtual Networks" -> "Configure" -> "View All":
The list of available networks in Virtual Server
The list of available virtual networks
Editing virtual network properties
Virtual network editor
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
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
with
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.