Migrate Virtual Machines
Using Storage XenMotion, a running virtual machine can be moved from one server to another server in the same resource pool with virtually no service interruption. 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.
XenCenter allows you move VMs that are not currently running, to a new storage in the same pool using the Move VM dialog box. To move a VM: from the XenCenter menu, click VM and then Move VM. Select a storage repository to which you would like to move the VM to and clickMove.
About VM migration with XenMotion and Storage 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 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. 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 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.
Note: Storage XenMotion feature is available in Citrix XenServer Enterprise Edition or higher. To learn more about the features available in different XenServer Editions, click here.
When migrating a VM with XenMotion or Storage XenMotion, the new VM host must meet the following compatibility requirements in order for the migration to proceed:
- XenServer Tools must be installed on each VM that you wish to migrate.
- The target host must have the same or a more recent version of XenServer installed as the source 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 one snapshot cannot be migrated.
- 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 (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 StorageXenMotion are subject to the following limitations:
- Storage XenMotion must not be used in XenDesktop deployments.
- VMs with VDIs located on Integrated StorageLink (iSL) SRs cannot be migrated.
- VMs using PCI pass-thru cannot be migrated.
- VM performance will be reduced during migration.
- For Storage XenMotion, pools protected by High Availability (HA) or Work Load Balancing (WLB) should have HA and WLB 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.
To migrate a VM
- In the Resources pane, select the VM and do one of the following:
- Right-click and, on the shortcut menu, click Migrate to Server and then Migrate VM wizard.
- On the VM menu, click Migrate to Server and then Migrate VM wizard.
- In Folder View, drag the VM onto the destination server. Note that you must be in Folder View to be able to migrate a VM by dragging and dropping it in the Resources pane.
- 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.
- Specify a storage repository where you would like to place the virtual disks of the migrated VM in the Storage tab and 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 drop-down list. This option allows you to select different SR for each virtual disk on the migrated VM.
- Select a network on the destination pool that will be used for the live migration of the VM’s virtual disks from the Storage network drop-down list and 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 the VM.
Here is a quick video from citrix how to use xenmotion.
vms can also be migrated across different xenserver pools. Check it out here: