Using Quick Storage Migration in System Center Virtual Machine Manager 2008 R2


Overview


In this article, you will learn how to deploy a Hyper-V virtualization environment that uses System Center Virtual Machine Manager 2008 R2 to provide the ability to migrate a virtual machine between two domain-joined, unclustered servers with different storage devices, using a feature called Quick Storage Migration. This feature is useful in the case where you do not deploy a Windows Failover Cluster (which is a requirement for Quick Migration or Live Migration) with shared storage, but still desire a managed process to move a virtual machine between Hyper-V servers while minimizing downtime.



With System Center Virtual Machine Manager 2008 R2 (VMM 2008 R2), Microsoft provides the Quick Storage Migration (QSM) feature which allows you to migrate a running virtual machine between storage devices without significant downtime or manual intervention. QSM can be performed for VMs with or without snapshots, and supports several different scenarios including:



  • Transfer of VHD files between different storage devices connected to a single Hyper-V R2 host
  • Transfer of VHD files and migration of a VM between different storage devices connected to distinct Hyper-V R2 hosts in a Failover Cluster
  • Transfer of VHD files and migration of a VM between different storage devices connected to distinct unclustered Hyper-V R2 hosts

Using QSM on a single Hyper-V R2 host, you can upgrade between a simple NTFS volume and Clustered Shared Volume, supports migration from local storage to a Storage Area Network (SAN), and also allows migration from one SAN device to another SAN device. In all cases, QSM uses the Background Intelligent Transfer Service (BITS) to transfer the files data between storage devices. BITS performs file transfers asynchronously and has the ability to adjust data transfer rates based on network bandwidth availability.


Requirements


In order to use QSM, your environment must satisfy the following requirements:



  • Hyper-V hosts must be Windows Server 2008 Hyper-V R2 or Microsoft Hyper-V Server 2008 R2
  • Hyper-V hosts must be running on physical servers with processors from the same manufacturer (processors can be different versions)
  • Hyper-V hosts must be managed by System Center VMM 2008 R2
  • Hyper-V hosts must have direct-attached storage devices or SAN-based devices using iSCSI or Fibre Channel interfaces
  • Virtual machine VHDs cannot be stored on pass-through disks

QSM can be performed between Hyper-V R2 hosts with different processor versions. If you experience processor issues using QSM, you can use the Hyper-V R2 processor compatibility option, if necessary. Also you should be aware that System Center VMM 2008 R2 supports a maximum of 10 concurrent storage migrations. If you have more VMs to transfer using the QSM feature than concurrently supported, you will need to plan for sequential migrations.


How Quick Storage Migration Works


Before you can use QSM to migrate a VM, you have to ensure that all the Hyper-V host targets are managed by System Center VMM 2008 R2. After the System Center VMM 2008 R2 agent is deployed to the Hyper-V host target and can be managed through it, you can initiate a QSM either from the System Center VMM 2008 R2 Administrator Console or through a Command Line Interface (CLI). When you start a QSM VM migration through the System Center VMM 2008 R2 Administrator Console, a wizard guides you through the selection of the QSM target Hyper-V R2 host and destination folder. After you make your selections, the QSM migration begins and System Center VMM 2008 R2 performs these steps:



  • Creates a new virtual machine on the target Hyper-V R2 host
  • Takes snapshots of all VHDs connected to the running virtual machine on the source Hyper-V R2 host that creates new differencing disks for subsequent write operations and places original parent VHDs in read-only state
  • BITS-based transfer of original parent VHDs from the source Hyper-V R2 host to the target Hyper-V R2 storage location
  • Saves state for the running virtual machine on the source Hyper-V R2 host
  • Exports the virtual machine on the source Hyper-V R2 host
  • BITS-based transfer of differencing disks and Saved State files to the target Hyper-V R2 host
  • BITS-based transfer of the exported VM configuration file to the target Hyper-V R2 host
  • Imports the virtual machine on the target Hyper-V R2 host
  • Merges the differencing disks back into the original parent VHDs on the target Hyper-V R2 host
  • Resumes the VM on the target Hyper-V R2 host

Setting up and Using Quick Storage Migration


In the test environment used during this process, both the source and target Hyper-V R2 hosts (HOU-HV2 and HOU-HV3, respectively) are members of the same Active Directory domain. HOU-HV1 is a standalone Hyper-V server that hosts two virtual machines: HOU-DC1 is an Active Directory domain controller, and HOU-VMM is a System Center VMM 2008 R2 server.


The HOU-HV2 server configuration includes a quad-core processor with 6 GB RAM, and the HOU-HV3 server contains a dual-core processor with 8 GB RAM. As shown in Figure 1, each Hyper-V R2 host is connected to a different iSCSI-based SAN storage device. The Hyper-V R2 hosts and the iSCSI-based SAN devices are connected via a LAN using 1 Gbps network interface cards. There is a single virtual machine named W2K8R2-QSM with a single 10 GB VHD running on the HOU-HV2 source host. The virtual machine VHD and configuration files are stored on a 250 GB volume hosted on the HOU-HV2 SAN device. QSM is used to migrate the virtual machine and its files to the HOU-HV3 target host and its connected HOU-HV3 SAN device.



Figure 1: QSM Environment Configuration


The procedure begins with adding the source and target Hyper-V R2 hosts as managed hosts in System Center VMM 2008 R2, and then initiating the QSM migration using the System Center VMM 2008 R2 Administrator Console.


Adding Managed Hosts to System Center VMM 2008 R2




  1. Open the System Center VMM 2008 R2 Administrator Console.


Figure 2




  1. Right-click the All Hosts default host group in the Virtual Machines pane, and select New Host Group.


Figure 3




  1. Enter QSM Hosts as the new host group name.


  2. In the Action pane, select Add Host.


Figure 4




  1. In the Add Hosts wizard, on the Select Host Location page, verify that the Windows Server-Based Host on an Active Directory Domain option is selected, and then enter Domain Administrator credentials.


Figure 5




  1. On the Select Host Servers page, click Search.


  2. In the Computer Search dialog box, select the Hyper-V option, and then click Search.


Figure 6




  1. In the Search Results list, highlight the source and target Hyper-V R2 hosts, and then click Add.


Figure 7




  1. After the source and target Hyper-V R2 hosts are added to the Selected Computers list, click OK.


  2. On the Select Host Servers page, click Next.


Figure 8




  1. In the Virtual Machine Manager dialog box that warns you about a possible server restart to enable the Hyper-V role, click Yes.


Figure 9




  1. On the Configuration Settings page, click on All Hosts, expand it, and select QSM Hosts, and then click Next.


Figure 10




  1. On the Host Properties page, click Next.


Figure 11




  1. On the Summary Page, review the host settings, and then click Add Hosts.


Figure 12




  1. Monitor the VMM 2008 R2 process in the displayed Jobs window.


Figure 13




  1. Close the Jobs window when the hosts have been configured to be managed by System Center VMM 2008 R2.

Initiating QSM using the System Center VMM 2008 R2 Administrator Console




  1. Open the System Center VMM 2008 R2 Administrator Console.


  2. In the Virtual Machines pane, expand the QSM Hosts group, and then select the source Hyper-V R2 host.


Figure 14




  1. Right-click the virtual machine that you want to migrate using QSM, and then select Migrate.


Figure 15




  1. In the Virtual Machine Manager dialog box, click Yes.


Figure 16




  1. In the Migrate Virtual Machine Wizard, on the Select Host page, highlight the target Hyper-V R2 host, and then click Next.


Figure 17




  1. On the Select Path page, click Browse to select the storage location on the target Hyper-V R2 host.


Figure 18




  1. In the Select Destination Folder dialog box, select the desired storage folder on the target Hyper-V R2 host, and then click OK.


Figure 19




  1. On the Select Path page, verify that the desired virtual machine path is set, and then click Next.


  2. On the Select Networks page, select the desired virtual network to connect to the virtual machine on the target Hyper-V R2 host.


Figure 20




  1. On the Summary page, review your selections and then click Move.


Figure 21




  1. In the Jobs window, highlight the Move Virtual Machine, and click the Details tab to monitor the process.


Figure 22




  1. After the parent VHD file is copied using BITS over HTTPS from the source to the target Hyper-V R2 host, you can see that the virtual machine is placed in Saved State and exported on the source Hyper-V R2 host, the differencing disk is then copied using BITS over HTTPS to the target storage device, and then the virtual machine is imported on the target Hyper-V R2 host.


Figure 23




  1. After the virtual machine is imported on the target Hyper-V R2 host, the parent VHD and differencing disk are merged, the virtual machine network adapter properties configured, and the virtual machine is restarted.


Figure 24


In my test environment described in Figure 1, without any I/O or network optimization, and with minimal Hyper-V host and network load, the entire QSM-based migration took about 35 minutes. The majority of that time, or 30 minutes, was required to perform the BITS transfer of the 10 GB parent VHD file. The BITS transfer of the 800 MB differencing disk took about 2 minutes. In total, the virtual machine was unavailable for only 4 minutes which accounted for the time starting with the virtual machine placed into Saved State and exported on the source Hyper-V R2 host, the BITS transfer of the differencing disk, the virtual machine import on the target Hyper-V R2 host, the parent and differencing VHD merge, and the virtual machine resumed from Saved State on the target Hyper-V R2 host.


Conclusion


Windows Server 2008 R2 Hyper-V or Microsoft Hyper-V Server 2008 R2 in conjunction with System Center VMM 2008 R2 provides the ability to implement a managed migration of a virtual machine and its files while minimizing downtime. Virtual machine downtime is minimized between source and target Hyper-V R2 hosts with optimized disk I/O connections, and fast (1 Gbps or higher), reliable network connections with sufficient available bandwidth.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top