Perform this task to migrate a VM between hosts and storages.
VM migration changes the carriers of a VM, including computing resources and storage resources. For example, you can change the host where a VM runs, or change the storage pool that stores disks (image files) of a VM.
Based on the VM state, VM migration includes online migration and offline migration.
Online migration—Migrates a running or suspended VM.
Offline migration—Migrates a shutdown VM.
Based on the application mode, VM migration includes dynamic migration and manual migration.
Dynamic migration—VMs are dynamically migrated in a cluster when they are running. Dynamic migration occurs when hosts fail, resources are allocated unevenly, or DPM policies are configured. Dynamic VM migration is implemented through HA, DRS, and DPM configuration of a cluster.
Manual migration—VMs are migrated manually by an administrator. Manual migration is performed during maintenance. For example, you can manually migrate the VMs on a host before you upgrade the hardware of the host. After the hardware upgrade, you can migrate the VMs back to the host.
This section describes how to perform a manual migration.
To avoid VM startup failure or slow VM startup after migration or even migration failure, make sure the target storage pool has sufficient space.
To avoid VM startup failure or slow VM startup after migration, make sure the target host has sufficient CPU and memory resources. Online VM migration affects the memory and CPU performance of the host and might cause service interruption. Please be cautious. As a best practice, do not perform online VM migration during peak service periods.
For the Storage migration type and the Host and Storage migration type, make sure the available space in the source storage pool is larger than the total capacity of the VM's storage volumes. If you change the disk format in migration, make sure the available space of the target storage is at least twice the space of the source storage. Violation of this restriction might cause migration failure. Migrating the data storage of a VM affects the memory, CPU, and disk I/O performance of the host. Please be cautious. As a best practice, do not migrate the data storage for multiple VMs in bulk during peak service periods.
Migrating VM storage while a VM is online will rate limit disk I/O and might degrade service performance. As a best practice, migrate VM storage for an online VM only when the service running on the VM is idle.
Enabling auto convergence in migration of a running VM will decrease VM performance.
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Migrate, or select a VM from the navigation pane to access the VM overview page, and then click Migrate.
Set the parameters as described in "Parameters" to complete VM migration.
Migration Type
Host: Migrate a VM to another host. This method applies to VMs that use shared storage pools. The target host and the destination host must use the same shared storage pool.
Storage: Change the storage used by a VM.
Host and Storage: Migrate a VM to another host and change the VM storage. The target host can be any host in UIS Manager.
Network Type: When you migrate a running VM by changing the host, the system selects the network type of the vSwitch bound to the destination host automatically.
Post-Copy Memory: When you migrate an online VM by changing the host, you can select whether to enable this option. Post-copy migration enables fast VM migration. To avoid VM exceptions during the migration process, make sure the network and storage of the source and destination hosts are running correctly.
Estimated Migration Duration: The system estimates the migration duration based on the destination host you select. If a migration network is available between the source and destination hosts, the system estimates the migration duration based on the migration network condition. If no migration network is available, the system estimates the migration duration based on the management network condition.
Auto Convergence: Select whether to enable auto convergence in migration of a running VM. With auto convergence enabled, if a migration task has not finished for a long time, the system will reduce CPU usage to accelerate the VM migration speed and lower the migration duration.
Compress: Set whether to compress the data to be transmitted during migration. This parameter is applicable only to running and suspended VMs.
Encryption: Select whether to encrypt the tunnel between the source and destination hosts. This parameter is applicable only to running and suspended VMs and is available only when the migration type is Change Host or Change Host and Storage.
Destination Storage
Set Format: Specify the disk format. If the disk of a VM has base image files, the disk format cannot be changed.
Unchanged—The disk format keeps unchanged.
Qcow2—The disk format is qcow2.