VM Migration with XenMotion and Storage XenMotion

This article discusses migrating running VMs using XenMotion and Storage XenMotion and how to move a VMs Virtual Disk Image (VDI) without any VM downtime.

XenMotion and Storage XenMotion

The following sections describe the compatibility requirements and limitations of XenMotion and Storage XenMotion.

XenMotion

XenMotion is available in all versions of XenServer and allows you to move a running VM from one host to another host, when the VMs disks are located on storage shared by both hosts. This allows for pool maintenance features such as High Availability (HA), and Rolling Pool Upgrade (RPU) to automatically move VMs. These features allow for workload leveling, infrastructure resilience, and the upgrade of server software, without any VM downtime.

Note

Storage can only be shared between hosts in the same pool. As a result VMs can only be migrated to hosts in the same pool.

Virtual GPU and GPU Pass-through are not compatible with XenMotion, Storage XenMotion, or VM Suspend. However, VMs using GPU Pass-through or vGPU can still be started any host that has the appropriate resources

Storage XenMotion

Caution

Storage XenMotion must not be used in XenDesktop deployments.

Storage XenMotion additionally allows VMs to be moved from one host to another, where the VMs are not located on storage shared between the two hosts. As a result, VMs stored on local storage can be migrated without downtime and VMs can be moved from one pool to another. This enables system administrators to:

  • rebalance VMs between XenServer pools (for example from a development environment to a production environment).

  • upgrade and update standalone XenServer hosts without any VM downtime.

  • upgrade XenServer host hardware.

Note

Moving a VM from one host to another preserves the VM state. The state information includes information that defines and identifies the VM in addition to the historical performance metrics, such as CPU and network usage.

Compatibility Requirements

When migrating a VM with XenMotion or Storage XenMotion, the VMs to be migrated and the new VM host must meet the following compatibility requirements in order for the migration to proceed:

  • The target host must have the same or a more recent version of XenServer installed as the source host.

  • XenServer PV Tools must be installed on each Windows VM that you want to migrate. The version of XenServer PV Tools installed on the VM must be the same as the version installed on the target XenServer host.

  • For Storage XenMotion, if the CPUs on the source host and target host are different, the target host must provide at least the entire feature set as the source host’s CPU. Consequently, it is unlikely to be possible to move a VM between, for example, AMD and Intel processors.

  • For Storage XenMotion, VMs with more than six attached VDIs cannot be migrated.

  • The target host must have sufficient spare memory capacity or be able to free sufficient capacity using Dynamic Memory Control. If there is not enough memory, the migration will fail to complete.

  • For Storage XenMotion, the target storage must have enough free disk space available for the incoming VMs. The free space required can be three times the VDI size (without snapshots). If there is not enough space, the migration fails to complete.

Limitations and Caveats

XenMotion and Storage XenMotion are subject to the following limitations and caveats:

  • VMs using PCI pass-through cannot be migrated.

  • VM performance will be reduced during migration.

  • For Storage XenMotion, pools protected by High Availability (HA) should have HA disabled before attempting VM migration.

  • Time to completion of VM migration will depend on the memory footprint of the VM, and its activity, in addition, VMs being migrated with Storage XenMotion will be affected by the size of the VDI and its storage activity.

  • IPv6 Linux VMs require a Linux Kernel greater than 3.0.

Migrating a VM using XenCenter

  1. In the Resources pane, select the VM and do one of the following:

    • To migrate a running or suspended VM using XenMotion or Storage XenMotion, on the VM menu, click Migrate to Server and then Migrate VM wizard. This opens the Migrate VM wizard.

    • To move a stopped VM: On the VM menu, select Move VM. This opens the Move VM wizard.

  2. From the Destination menu, select a standalone server or a pool.

  3. From the Home Server menu, select a server to assign as the home server for the VM and click Next.

  4. In the Storage tab, specify the storage repository where you would like to place the migrated VM’s virtual disks, and then click Next.

    • The Place all migrated virtual disks on the same SR radio button is selected by default and displays the default shared SR on the destination pool.

    • Click Place migrated virtual disks onto specified SRs to specify an SR from the Storage Repository menu. This option allows you to select different SR for each virtual disk on the migrated VM.

  5. From the Storage network menu, select a network on the destination pool that will be used for the live migration of the VM’s virtual disks and click Next.

    Note

    Due to performance reasons, it is recommended that you do not use your management network for live migration.

  6. Review the configuration settings and click Finish to start migrating the VM.

Live VDI Migration

Live VDI migration allows the administrator to relocate the VMs Virtual Disk Image (VDI) without shutting down the VM. This enables administrative operations such as:

  • Moving a VM from cheap local storage to fast, resilient, array-backed storage.

  • Moving a VM from a development to production environment.

  • Moving between tiers of storage when a VM is limited by storage capacity.

  • Performing storage array upgrades.

Limitations and Caveats

Live VDI Migration is subject to the following limitations and caveats

  • Storage XenMotion must not be used in XenDesktop deployments.

  • IPv6 Linux VMs require a Linux Kernel greater than 3.0.

To Move Virtual Disks

  1. In the Resources pane, select the SR where the Virtual Disk is currently stored and then click the Storage tab.

  2. In theVirtual Disks list, select the Virtual Disk that you would like to move, and then click Move.

  3. In the Move Virtual Disk dialog box, select the target SR that you would like to move the VDI to.

    Note

    Make sure that the SR has sufficient space for another virtual disk: the available space is shown in the list of available SRs.

  4. Click Move to move the virtual disk.

VM Migration with XenMotion and Storage XenMotion