Migrate VMs

You can migrate running VMs by using XenMotion and Storage XenMotion and 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. This feature enables you to move a running VM from one host to another host, when the VMs disks are on storage shared by both hosts. Pool maintenance features such as high availability and Rolling Pool Upgrade (RPU) can automatically move VMs by using XenMotion. 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 Intel GVT-g 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. For information about NVIDIA vGPU compatibility with these features, see Graphics.

Storage XenMotion

Notes:

  • Do not use Storage XenMotion in Citrix Virtual Desktops deployments.
  • Storage XenMotion cannot be used on VMs that have changed block tracking enabled. Disable changed block tracking before attempting Storage XenMotion.
  • Storage XenMotion cannot be used on VMs whose VDIs are on a GFS2 SR.

Storage XenMotion additionally allows VMs to be moved from one host to another, where the VMs are not 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 feature 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 and the historical performance metrics, such as CPU and network usage.

Compatibility requirements

When migrating a VM with XenMotion or Storage XenMotion, VM and the target host must meet the following compatibility requirements 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 Tools must be installed on each Windows VM that you want to migrate. The version of XenServer Tools installed on the VM must be the same as the version installed on the target XenServer host.

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

  • Storage XenMotion only: VMs with more than one snapshot cannot be migrated.

  • VMs with checkpoint cannot be migrated.

  • Storage XenMotion only: 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 fails to complete.

  • Storage XenMotion only: 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 is reduced during migration.

  • For Storage XenMotion, pools protected by high availability, disable high availability before attempting VM migration.

  • Time to completion of VM migration depends on the memory footprint of the VM and its activity. In addition, the size of the VDI and its storage activity affects VMs being migrated with Storage XenMotion.

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

Migrate 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 action opens the Migrate VM wizard.

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

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

  3. From the Home Server list, 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 list. This option allows you to select different SR for each virtual disk on the migrated VM.

  5. From the Storage network list, select a network on the destination pool that is used for the live migration of the VM’s virtual disks. 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 feature 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

  • Do not use Storage XenMotion in Citrix Virtual Desktops deployments.

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

  • If you perform live VDI migration on a VM that has a vGPU, vGPU XenMotion is used. The host must have enough vGPU space to make a copy of the vGPU instance on the host. If the pGPUs are fully employed, VDI migration may not be possible.

To move virtual disks

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

  2. In the Virtual 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:

    Ensure 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.

Migrate VMs