Hyper-V R2 Gains Live Migration

Microsoft Product Roadmaps

An all-in-one-place software version product roadmap resource that summarizes the current and future versions of 100+ Microsoft enterprise and developer technologies. Our product roadmaps will give you the forward looking information you need to efficiently plan projects, schedule migrations and budget purchases.

Hyper-V R2 Gains Live Migration
Monday, 15 June 2009
ShareShare on LinkedIn

When Windows Server 2008 R2 is released in late 2009, it will include the second version of Hyper-V, Microsoft's hypervisor-based virtualization server role that makes it possible for multiple, different OS and application instances to coexist on a single physical computer by putting each instance in a virtual machine (VM). The second version of Hyper-V will allow an administrator to move VMs from one physical host to another without interrupting users (called Live Migration), will perform faster, and will no longer require a post-installation download, but using the live migration feature will require careful server and storage selection.

Why Hypervisors Matter

Hypervisor-based server hardware virtualization is a key technology for large organizations because it offers the potential to increase both server hardware utilization and operational flexibility. The technology also has become important to Microsoft as it tries to compete with existing virtualization vendors, such as VMware and Xen, and furthers the concept of dynamic data centers.

IT departments. Hypervisors enable an IT department to place multiple OS configurations, complete with applications, on a single physical server, which can improve hardware utilization and reduce the total number of physical servers the organization must manage, reducing overall costs. In addition, hypervisors decouple applications from the underlying hardware, and management tools enable organizations to move VMs among servers much more easily than nonvirtualized applications. As a result, organizations can more easily balance workloads, perform maintenance, and recover from hardware or system failures, reducing system downtime.

Microsoft and partners. The availability of a hypervisor for the Windows server OS can drive upgrades to Microsoft's latest server versions. As Microsoft struggles with the perception that its older products, such as Windows Server 2003, are "good enough," hardware virtualization has become one of the most compelling scenarios for upgrading from existing versions. By including Hyper-V in Windows Server 2008, Microsoft may solidify Windows Server's market position by encouraging customers to use Windows Server instead of competitive hardware virtualization products.

Key improvements to Hyper-V's second version are Live Migration, Network VM Queues, improved memory addressing, and increased scalability—Hyper-V adds support for up to 64 Logical Processors (up from 24 in the original release.)

Live Migration

Microsoft's first Hyper-V version leveraged Windows Server's failover cluster support to facilitate moving a running VM from one physical server to another with a brief, but noticeable, interruption. Microsoft named this level of migration "Quick Migration." With Windows Server 2008 R2, Hyper-V will support Live Migration, which accomplishes the same movement without noticeable interruption, making Hyper-V competitive with other hypervisor products from companies such as VMware, which already offer VM migration with no downtime.

Administrators migrate or move VMs among physical servers to consolidate workloads to make efficient use of server hardware, to deploy high-availability or fault-tolerant servers, or to perform hardware and software maintenance, such as applying new patches to the software. Administrators can initiate the migration, or management tools can monitor both the physical servers and the VMs to automatically move VMs when they detect a condition requiring action. For example, an administrator could set a threshold for the performance of a VM on a physical server. System Center Operations Manager (Microsoft's monitoring product) could continually monitor the information from that server and work with Microsoft's Virtual Machine Manager (VMM) to move the VM to a different server whenever it detected that a VM's performance had fallen below the preset threshold.

How Live Migration Works

Moving a VM from one physical server to another must be accomplished in a matter of seconds in order for users not to be interrupted. A longer interruption causes TCP/IP connections between users and the VM to time out and close.

When a live migration is initiated, Hyper-V establishes a connection between the source server, which is currently running the VM in production, and the target server where the VM will be moved. When the connection is made, Hyper-V transfers the source server's VM configuration and device information to the target server and then begins to copy the contents of VM memory from the source to the target. Because the VM is still running on the source, some memory pages will change after they have been copied. Hyper-V keeps track of these "dirty pages" as the migration progresses.

After completing the first copy of all the memory pages, Hyper-V continues to make passes through the pages, attempting to get to a point where there are no dirty pages and the target has a good and complete copy of the source's memory, or until the remaining modified memory pages have been transferred within the migration period. Next, Hyper-V suspends the source VM and transfers any remaining dirty pages and the current state information about the source to the target so that the target can take over as the new production VM. Live Migration does not have to move the contents of the VM's hard drive, since the two systems must be using shared storage. For an illustration showing the steps in a Live Migration, see "Live Migration Switch Over".)

Live Migration Requirements

Although the ability to move a VM from one host to another can be useful, it requires well-matched servers. The source and destination hosts must have processors from the same manufacturer (e.g., Intel or AMD), must be part of the same Windows failover cluster, and must have access to shared storage.

Intel and AMD implement hardware-assisted virtualization differently. Therefore, Hyper-V (and other hypervisors) cannot transfer the state of an Intel processor to an AMD processor (or vice versa). Instead, Live Migration requires that the source and target host have a processor from the same manufacturer (although different models are supported, a feature Microsoft calls Processor Compatibility), best results are achieved if the processor model is also a match. Hosts do not need to have the exact memory configuration, but the target machine must have sufficient free memory for the migrated VM.

Storage, including Windows Server Failover Clustering, must also be properly configured, and the source and target servers must be using storage drivers and firmware compatible with Windows Server 2008 R2. Components that were compatible with Windows Server 2003 failover clusters may not be compatible with failover clusters in Windows Server 2008 or 2008 R2. In addition, Microsoft has improved failover clustering by creating Clustered Shared Volumes to facilitate Live Migration. (For additional information, see the sidebar "Clustered Shared Volumes".)

Failover clusters with multiple host bus adapters and multipath I/O software provide the highest level of redundancy and availability. For Live Migration, a multipath solution must be based on Microsoft Multipath I/O (MPIO) and the server manufacturer will usually supply an MPIO device-specific module (DSM) for its hardware. Note that host bus adapters and multipath I/O software must be carefully matched with the proper OS and driver versions.

The Microsoft Cluster Configuration Validation Wizard (ClusPrep) can validate that servers are configured properly by taking inventory of the system configuration and highlighting discrepancies in service pack levels, driver versions, and evaluating and testing your network and storage configuration.

Because of these requirements, organizations considering Live Migration with Hyper-V should include hardware costs when calculating any cost savings they might realize from virtualization. They should also work closely with their hardware supplier to ensure the servers contain components able to handle working with a hypervisor performing undetectable migrations.

Hardware Performance Improvements

Two improvements in Windows Server 2008 R2 will allow the Hyper-V role to take advantage of new hardware being introduced for servers running virtualized workloads, including Network VM Queues and Second Level Address Translation (SLAT) processor support.

Network VM Queues

Network cards have been enhanced over the years to reduce TCP/IP communications overhead by taking over some TCP/IP packet processing from the server's processor. Future high-end network cards will take on an additional role, processing some virtualization network traffic.

Specifically, for a VM to receive a packet from the network, virtual switch software running on the OS on the server (the parent partition) must identify the target VM of the packet, based on the destination Media Access Layer (MAC) address, determine which Virtual LAN (VLAN) is associated with the MAC address, and then dispatch the target packet to the VM. Sending data is basically the reverse of this process. With several VMs on a server, the extra load can be substantial.

Network cards with virtualization support take over this load: These cards manage on-board receive and send queues that are assigned to specific VMs. The cards validate the MAC address and VLAN ID, placing packets in the appropriate VM queue and reducing the CPU's workload.

In addition to network VM queues, additional improvements in offloading TCP tasks (TCP Chimney Offload) and supporting large packets of data (jumbo frames) will help improve network performance.

Second Level Address Translation

Hyper-V R2 will be able to take advantage of new virtualization capabilities being built into future processors from both Intel and AMD and can support up to 64 logical processors.

Although some current processors provide hardware-level assistance to a hypervisor, in general, the current generation of processors was not designed for hardware virtualization because these processors only support one level of address translation: converting physical memory addresses to process-specific virtual memory addresses. Hypervisors need to translate a second level of addresses for the VMs: From "physical" memory addresses inside a VM to actual physical addresses on the host computer. Even when running on today's virtualization assist processors, Hyper-V performs this second level of translations itself using Shadow Page Tables. Creating these tables takes approximately 1MB of memory per VM, and performing memory translations using these tables can use up to 10% of total CPU time on the physical processor running Hyper-V.

Intel and AMD are modifying their virtualization assist processors to shift this second level of address translation from the hypervisor software to the processor hardware. Future chips will not only include the current virtualization hardware assist features but also offer Second Level Address Translation (SLAT). AMD calls its support either Nested Page Tables or Rapid Virtualization Indexing, while Intel's SLAT support is referred to as Extended Page Tables. Hyper-V R2 is ready to use these chips in place of creating its own Shadow Page Tables.

Availability and Resources

Windows Server 2008 R2 with Hyper-V is currently available as a release candidate (RC) and is expected to be released in the fourth quarter of 2009. Virtual Machine Manager 2008 R2, available in beta form since Mar. 2009, will manage Live Migration in Hyper-V R2.

Windows Server 2008 R2 RC can be downloaded from www.microsoft.com/windowsserver2008/en/us/r2.aspx.

An overview of Hyper-V updates is included in the Windows Server 2008 Reviewers Guide, which can be downloaded from download.microsoft.com/download/F/2/1/F2146213-4AC0-4C50-B69A-12428FF0B077/Reviewers_Guide_Beta_update.doc.

A TechNet article describing what's new in Hyper-V is available at technet.microsoft.com/en-us/library/dd446676.aspx.

The TechNet article "Hyper-V Step-by-Step Guide: Hyper-V and Failover Clustering" provides a good description of how server hardware should be configured to support Live Migration. It is available at technet.microsoft.com/en-us/library/cc732181.aspx.

A TechEd "Inside Windows Server 2008 R2 Hypervisor" presentation by Mark Russinovich (Technical Fellow) is available at www.microsoft.com/emea/teched2008/itpro/default.aspx.

The Microsoft Cluster Configuration Validation Wizard (ClusPrep) can be downloaded from www.microsoft.com/downloads/details.aspx?familyid=BF9EB3A7-FB91-4691-9C16-553604265C31.

System Center Virtual Machine Manager (VMM) 2008 R2 is described in "Virtual Machine Manager 2008 R2" on page 18 of the Apr. 2009 Update. VMM 2008 is described in "Virtual Machine Manager 2008 Released" on page 7 of the Dec. 2008 Update and in "Virtual Machine Manager 2008 Supports Hyper-V" on page 3 of the July 2008 Update.