Apr 09 2009

Go Virtual with Hyper-V

Microsoft's Hyper-V is a fast, free and capable hypervisor supported by Windows Server 2008.

Virtualization technologies have become “the thing” in IT over the last couple of years. With the potential to make huge savings, IT managers have been clamoring to virtualize, especially in the data center.

VMware has traditionally dominated the virtualization market, but last year Microsoft released its first serious virtualization server product: Hyper-V. While not as fully featured as VMware’s ESX Server, Hyper-V is an impressive first pass.

Hyper-V Editions

Hyper-V Server 2008 is a free download from Microsoft that installs on bare-metal systems. This is a bit of a misnomer, however, as Server Core is used as the basis for the install. But unlike a normal install of Core, you’ll only be able to perform a few basic tasks, such as join a domain and configure network settings, which are essential for integrating Hyper-V into your environment.

The Hyper-V Server Role can be added to Full, or Core editions of Server 2008. The final Hyper-V code wasn’t available at the time Server 2008 RTM’d, so you’ll need to download the updated bits from Microsoft to avoid installing the release candidate code. The RTM version of Hyper-V will be included in Server 2008 Service Pack 2.

Hyper-V RTM Update
http://support.microsoft.com/default.aspx/kb/950050

As a Hyper-V beginner, I’d strongly recommend working with the Full edition of Server 2008 and installing the Hyper-V role. Once you’ve mastered the basics, you can then move to Hyper-V Server or Server Core, as the requirement to remotely manage Hyper-V in these editions leads to various complications that will leave you tearing your hair out. (See Remote Administration for more details.)

Installing Hyper-V

Unlike Microsoft Virtual Server 2005, Hyper-V relies on hardware assisted Virtualization Technology from Intel, or Intel VT for short. Don’t assume that all of Intel’s newest processors support Intel VT. Check Intel’s website before making a purchase. Not only does the processor need to support Intel VT (or AMD-V), but a compatible motherboard and BIOS are also key components to ensure that Windows Server can start the hypervisor. Hyper-V only runs on x64 processors with hardware Data Execution Prevention — Intel XD or AMD NX — enabled.

If you’ve got the hardware requirements right from the outset, installing Hyper-V is simple. Log on to Windows Server 2008 (Full Edition) with an admin account:

    1. Open a command prompt from the Start menu.
    2. Type servermanagercmd — install Hyper-V and press Enter.
    3. Once the installation is complete, you’ll be prompted to reboot the server.

Networking with Hyper-V

Before installing your first virtual machine (VM), it’s important to understand networking in Hyper-V, which uses the concept of virtual switches to route traffic between VMs, hosts and other physical devices.

When you add a virtual network interface card (NIC) to a VM, you have the choice of leaving it disconnected or connecting it to a virtual network, often referred to as a virtual switch. Here are some steps to create a virtual network that will be used to connect VMs to the physical NIC on the parent partition (physical host):

    1. Open Hyper-V Manager from Start > Administrative Tools.
    2. Click Virtual Network Manager on the Actions pane.
    3. Make sure that New virtual network is selected under Virtual Networks, select External under Create virtual network and click Add.
    4. Give the new virtual network a name, External Virtual in this example, and under Connection type, use the drop down menu to select a physical NIC to which the virtual switch will connect (Figure 1).
    5. Click OK to complete the procedure.
Figure 5
Figure 1.

Figure 2.

Open the Network and Sharing Center Control Panel applet and click Manage network connections under Tasks, and you’ll see the new network represented as a virtual switch (Figure 2).

Right click and select Properties for both the physical and virtual NICs, and you’ll notice the physical NIC has only the Microsoft Virtual Network Switch Protocol bound. Conversely, the virtual switch has all other installed protocols bound (Figures 3 and 4).

 

 
Figure 3.
 
Figure 4.

While it is possible to get Hyper-V up and running with only one physical NIC, Microsoft recommends a minimum of two NICs — one for the parent partition and one for your child partitions (VMs) — so that if the parent partition wants to communicate with other physical servers on the network, it can do so on a dedicated NIC without having to pass traffic through a virtual switch.

Working with VMs

Once you’ve got your virtual switch configured, creating a new VM is as easy as clicking New on the Actions pane and selecting Virtual Machine from the menu. The wizard will guide you through the process of configuring a disk, assigning memory and connecting the VM to a virtual network. Figure 5 shows the full range of configurable options. Note the lack of support for USB devices.

Figure 5
Figure 5.

Hyper-V Integration Services provide optimized performance and usability enhancements for Windows operating systems running in child partitions. Integration Services are built-in to Vista and Server 2008, and will automatically be activated if a child partition is detected, but must be installed manually for all other operating systems. You can install Integration Services on Windows Server 2000 (SP4), Server 2003 (SP2) and XP (SP2) by pressing CTRL+I in a Virtual Machine Connection window.

Of interest to those using Hyper-V to create test labs, snapshots of a child partition’s state can be created to facilitate rollback to a given point in time. You can right click on a snapshot and select Apply from the menu, and the VMs recorded state is restored within seconds (Figure 6).

Figure 6
Figure 6.

Remote Administration

The Hyper-V Manager console can be downloaded as a separate component for Vista SP1 and includes the Virtual Machine Connection tool - http://support.microsoft.com/kb/952627/. However, there’s a plethora of configuration steps required to get it working.

If you intend to use Server Core or Hyper-V Server 2008, you’ll have little choice but to set up remote administration. While not a supported solution, the complex configuration can be simplified using the Hyper-V Remote Management Configuration Utility: http://code.msdn.microsoft.com/HVRemote. HVRemote reduces the workload to one or two commands on client and server. You’ll find documentation on the site that explains clearly how to use the tool.

Hyper-V in a Production Environment

Some good news on the licensing front means that if you license Windows Server 2008 Enterprise and run the Hyper-V role, you can install up to four virtual instances of Server 2008, or downgrade to a previous release. One caveat, however, is that if you use the maximum four free licenses, the host server can only be used for Hyper-V and not other infrastructure tasks such as AD or DHCP. As of January 2009, a Windows Server 2008 CAL is no longer required to access child partitions, as long as the host server is only used for Hyper-V.

Storage options for Hyper-V include direct attached storage, Fibre Channel and iSCSI storage area networks. Hyper-V provides a feature called Quick Migration on the Enterprise and Datacenter editions of Windows Server, which allows you to move VMs from one physical host to another, by saving the VM, moving and then restoring to the previously saved state. This system involves some downtime and requires two physical hosts to be clustered. Also be aware that unlike VMware’s ESX, Hyper-V doesn’t natively support NIC teaming. That’s not to say NIC teaming can’t be done with Hyper-V, but it’s dependent on the capabilities of third-party NIC drivers and utilities, and cannot be managed in Hyper-V Manager.

Close

Become an Insider

Unlock white papers, personalized recommendations and other premium content for an in-depth look at evolving IT