Migrate Virtual Machines
This topic contains information about migrating and moving virtual machines within and across pools and standalone servers. Migrating a VM refers to the operation of moving a running or a suspended VM to a different server or a pool. Whereas, moving a VM refers to the act of moving a VM that is shut down. For information about migrating running or suspended VMs, see the section About VM Migration with XenMotion and Storage XenMotion. For information about moving VMs that are shut down, see the section Move VMs.
About VM Migration with XenMotion and Storage XenMotion
XenMotion is available in all versions of XenServer and allows you to move a running or a suspended VM between XenServer hosts, when the VM’s disks are located on storage shared by both hosts. This allows for pool maintenance features such as Workload Balancing (WLB), 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. Storage can only be shared between hosts in the same pool, as a result, VMs can only be moved within the same pool.
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 with virtually no service interruption. The choice of destination server depends on how the VM and the pool are configured. The choice of destination server depends on how the VM and the pool are configured: in a pool with Workload Balancing (WLB) enabled, for example, recommendations are provided to help select the best possible physical server for the VM’s workload. For more information, see Choosing an Optimal Server for VM Initial Placement, Migrate, and Resume.
Storage XenMotion 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 as well as the historical performance metrics, such as CPU and network usage.
Storage XenMotion also allows you to move virtual disks from one Storage Repository (SR) to a different SR within the same pool. For more information, see Move Virtual Disks.
When migrating a VM with XenMotion or Storage XenMotion, the new VM and server must meet the following compatibility requirements:
- XenServer Tools must be installed on each VM that you wish to migrate.
- The destination server must have the same or a more recent version of XenServer installed as the source.
- For Storage XenMotion, if the CPUs on the source and destination server are different, the destination server must provide at least the entire feature set as the source server’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 server 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 (for the VM and its snapshot) available for the incoming VMs. If there is not enough space, the migration will fail to complete.
XenMotion and Storage XenMotion limitations
XenMotion and Storage XenMotion are subject to the following limitations:
- Storage XenMotion must not be used in XenDesktop deployments.
- VMs using PCI pass-thru 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.
For step-by-step instructions on using XenMotion or Storage XenMotion to migrate your VMs, see the section To Migrate or Move a VM.
XenCenter allows you move VMs that are shut down to a new storage in the same pool using the Move VM wizard. For step-by-step instructions, see the section To migrate or move a VM.
To Migrate or Move a VM
In the Resources pane, select the VM and do one of the following depending on the status of your VM.
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.
- Select a standalone server or a pool from the Destination drop-down list.
- Select a server from the Home Server list to assign a home server for the VM and click Next.
- On the Storage page, specify a storage repository where you would like to place the virtual disks of the migrated VM and click Next.
- The Place all migrated virtual disks on the same SR option 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 drop-down list. This option allows you to select different SR for each virtual disk on the migrated VM.
- On the Networking page, map the virtual network interfaces in the selected VM to networks in the destination pool or standalone server. Specify your options using the Target Network drop-down list and click Next.
Select a storage network on the destination pool that will be used for the migration of the VM’s virtual disks and then click Next.
Note: Due to performance reasons, it is recommended that you do not use management network for live migration.
- Review the configuration settings and click Finish to start migrating or moving the VM.