Hyper-V: Step-by-Step Guide to Using Live Migration in Windows Server 2008 R2

by ABB 12. June 2009 06:39
Hyper-V: Step-by-Step Guide to Using Live Migration in Windows Server 2008 R2

Updated: April 20, 2009

Applies To: Windows Server 2008 R2

This guide details the steps required to perform a live migration of Hyper-V™ virtual machines from one node in a Windows Server® 2008 R2 failover cluster to another node.

Live migration overview

Live migration is a new Hyper-V feature in Windows Server 2008 R2, which requires the failover clustering role to be added and configured on the servers running Hyper-V. Live migration allows you to transparently move running virtual machines from one node of the failover cluster to another node in the same cluster without a dropped network connection or perceived downtime. In addition, failover clustering requires shared storage for the cluster nodes. This can include an iSCSI or Fiber-Channel Storage Area Network (SAN). All virtual machines are stored in the shared storage area, and the running virtual machine state is managed by one of the nodes. For a detailed overview of live migration and the benefits of using it, see Windows Server 2008 R2 Hyper-V Live Migration.

Considerations before using live migration

This guide assumes you are familiar with the requirements for using Hyper-V and failover clustering, which are covered in Hyper-V Step-by-Step Guide: Hyper-V and Failover Clustering.

Specific recommendations to consider before using live migration are listed below:

  • For each node of the failover cluster: use more than one network adapter; configure at least one network adapter for the private virtual network. We recommend that you configure a dedicated private network with Gigabit speed for live migration traffic. This network should be separate from the network for managing the failover cluster, from the network for the virtual machine, and from the network for storage.

  • We recommend that you make the hardware and system settings of the nodes in the failover cluster as similar as possible to minimize potential problems.

  • If possible, do not apply IPSec policies on a private network for live migration because this can significantly impact the performance of live migration.

  • Ensure that the source and destination nodes (for the live migration) in the failover cluster are connected through the same IP subnet. This is so the virtual machine can retain the same IP address after live migration.

  • Before reverting a clustered virtual machine back to a snapshot, you should first shut down the virtual machine from Failover Cluster Manager, take a snapshot of the virtual machine, and restart the virtual machine.

  • When creating the virtual machine, we recommend that you configure the storage location under SystemRoot/ClusterStorage in the Cluster Shared Volumes.

Processor compatibility

Hyper-V provides processor compatibility settings to make it easier to perform a live migration of a virtual machine to another physical computer with a different processor version. The Migrate to a physical computer with a different processor version setting in Hyper-V Manager allows you to move a running virtual machine to a physical computer with different processor features without restarting the virtual machine. It is recommended that you enable this setting to ensure that the virtual machine uses only the features of the processor that are available on all versions of a virtualization-capable processor by the same processor manufacturer. It does not provide compatibility between different processor manufacturers. When this setting is not used, Hyper-V provides the virtual machine with all the virtualization features offered by the physical processor. The setting is also useful for high availability and backup and recovery scenarios because it makes it easier to move a highly available virtual machine to another node in a cluster or restore the virtual machine to different hardware.

Steps for implementing live migration

Use the following steps to implement live migration:

Configure Cluster Shared Volumes

Cluster Shared Volumes are volumes in a failover cluster that multiple nodes can read from and write to at the same time. The nodes coordinate the reading and writing activity so that the disk is not corrupted. In contrast, disks (LUNs) in cluster storage that are not Cluster Shared Volumes are always owned by a single node. Cluster Shared Volumes have the same requirements as non-Cluster Shared Volumes disk resources. It is recommended that you first validate the cluster configuration. For instructions on validating a cluster configuration, see The Microsoft Support Policy for Windows Server 2008 Failover Clusters.

noteNote
  • The network connection used by Cluster Shared Volumes is fault tolerant, and therefore, if the network used by Cluster Shared Volumes experiences problems, network traffic will be moved to another network.

  • Cluster Shared Volumes can only be enabled once per cluster.

  • By enabling Cluster Shared Volumes for a failover cluster, all nodes in the cluster will be enabled to use shared volumes.

To enable Cluster Shared Volumes using Failover Cluster Manager
  1. In the Failover Cluster Manager snap-in, if the cluster that you want to configure is not displayed, in the console tree, right-click Failover Cluster Manager, click Manage a Cluster, and then select or specify the cluster that you want.

  2. In the left pane, click to expand Failover Cluster Manager, and then select the failover cluster you want to enable Cluster Shared Volumes on.

  3. Right-click the failover cluster, and then click Enable Cluster Shared Volumes. Or, in the Actions pane, click Enable Cluster Shared Volumes. The Enable Cluster Shared Volumes dialog box opens. Click to read and accept the terms and restrictions, and click OK.

To add a disk to the Cluster Shared Volumes
  1. In the Failover Cluster Manager snap-in, if the cluster that you want to configure is not displayed, in the console tree, right-click Failover Cluster Manager, click Manage a Cluster, and then select or specify the cluster that you want.

  2. Click to expand Failover Cluster Manager, and then click to expand the failover cluster for which you want to add a disk to the Cluster Shared Volumes.

  3. Click Cluster Shared Volumes.

  4. In the Actions pane, click Add storage.

  5. In Add Storage, select from the list of available disks, and click OK. The disk or disks you selected appear in the Results pane for Cluster Shared Volumes.

The storage location appears as SystemRoot\ClusterStorage (which you can rename) on all nodes of the failover cluster. Under SystemRoot\ClusterStorage, a specific folder appears for each volume on the disk (or disks) that was added to the Cluster Shared Volumes. You can view the list of volumes in Failover Cluster Manager.

Set up a virtual machine for live migration

To set up a virtual machine for live migration, you need to create the virtual machine, configure it to use Cluster Shared Volumes, reconfigure the automatic start action, and make the virtual machine highly available. For instructions on how to perform these procedures, see Steps 6 and 7 in Hyper-V Step-by-Step Guide: Hyper-V and Failover Clustering.

Configure cluster networks for live migration

Cluster networks are automatically configured for live migration. You use Failover Cluster Manager to perform this procedure.

To configure a cluster network for live migration
  1. In the Failover Cluster Manager snap-in, if the cluster that you want to configure is not displayed, in the console tree, right-click Failover Cluster Manager, click Manage a Cluster, and then select or specify the cluster that you want.

  2. Expand Nodes.

  3. In the console tree (on the left), select the clustered virtual machine for which you want to configure the network for live migration.

  4. Right-click the virtual machine resource displayed in the center pane (not on the left), and then click Properties.

  5. Click the Network for live migration tab, and select one or more cluster networks to use for live migration. Use the buttons on the right to move the cluster networks up or down to ensure that a private cluster network is the most preferred. The default preference order is as follows: networks with no default gateway should be located first; networks used by cluster shared volumes and cluster traffic should be located last.

    Live migration will be attempted in the order of networks specified in the list of cluster networks. If the connection to the destination node using the first network is not successful, the next network in the list is used until the complete list is exhausted or there is a successful connection to the destination node using one of the networks.

    note
    • When you configure a network for live migration for a specific virtual machine, the setting is global and therefore applies to all virtual machines.

    • If you have more than one cluster network listed in Network for live migration, you should change the priority order to avoid having live migration and Cluster Shared Volumes using the same network.

Initiate a live migration of a virtual machine

You can use either Failover Cluster Manager or PowerShell to initiate live migration to move a virtual machine from one node in the failover cluster to another.

noteNote
  • You can use live migration to move more than one virtual machine at a time, depending on the number of nodes in the failover cluster. However, a cluster node can participate as the source or destination node in only one live migration at a time. For example, if there are 4 nodes in the failover cluster, then two live migrations can occur at the same time.

  • When you use PowerShell to initiate a live migration of a virtual machine, then more than one live migration can occur at a time.

  • If live migration fails, the virtual machine continues to operate on the source node with no disruption.

The amount of time to move a virtual machine using live migration is dependent on the following items:

  • The network connection speed and bandwidth that is available between the source cluster node and the destination cluster node.

  • The load on the source cluster node and the destination cluster node.

  • The amount of RAM configured for the virtual machine.

To initiate live migration using Failover Cluster Manager
  1. In the Failover Cluster Manager snap-in, if the cluster that you want to configure is not displayed, in the console tree, right-click Failover Cluster Manager, click Manage a Cluster, and then select or specify the cluster that you want.

  2. Expand Nodes.

  3. In the console tree (on the left), select the clustered virtual machine for which you want to move using live migration.

  4. Right-click the virtual machine resource displayed in the center pane (not on the left), and then click Live migrate this virtual machine to another node.

  5. Select the node you want to move the virtual machine to. When migration is complete, the virtual machine is running on the new node.

  6. To verify that the virtual machine successfully migrated, you will see the virtual machine listed under the new node (in Owner Name).

To initiate a live migration using PowerShell
  1. Open PowerShell. Click Start, point to All Programs, click Windows Powershell 2.0, and then click Windows Powershell 2.0.

    The Failover Clustering feature must be installed on the computer on which you are starting the PowerShell.

  2. Type Add-Module FailoverClusters.

  3. Type Get-Cluster “<Cluster Name>” | Move-ClusterVirtualMachineRole -Name “<VM group name>” -Node “<Destination node name>”.

    <Cluster Name> is the name of the cluster that the virtual machine is included in.

    <VM group name> is the virtual machine resource group.

    <Destination node name> is the name of the destination node to which you would like to move the virtual machine using live migration.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Clustered Shared Volume | CSV | HP Blades & Hyper-V | Hyper-V | Live Migration | VIrtual Machines | Windows Server 2008 R2

Comments

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen