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.
VM migration can includes the following migrations based on the VM state:
Online migration—Migrates a running VM. To ensure a successful online migration, make sure the target host has enough memory before you migrate a VM.
Offline migration—Migrates a shutdown VM.
VM migration includes the following migrations based on the application mode of a VM:
Dynamic migration— VMs are dynamically migrated in a cluster when they are running.
Manual migration—VMs are migrated manually by an administrator. Space Console provides three manual migration methods as follows:
Host: Migrates a VM between hosts. This method is available only for VMs that use a shared storage pool, and the shared storage pool must be mounted to the migration destination host.
Storage: Migrates the disks of a VM to another storage pool mounted to the host where the VM resides.
Host and Storage: Migrates a VM between hosts, and changes the storage pool to which its disks are attached. The destination host can be any host in the cloud resource, and the destination storage pool must be mounted to the destination host.
Table-1 Networks used in VM migration
VM state |
Migration method |
||
Host |
Storage |
Host and Storage |
|
Online |
Migration network and management network |
Management network |
Migration network and management network |
Offline |
Management network |
Management network |
Migration network and management network |
For more information about the management network and migration network, see "Manage virtual switches."
If you change the host and storage for a VM or change only the host for a VM, the system uses the following rules to select the networks:
If the migration networks of the source and destination hosts are available, the system uses the migration networks. During migration, the management networks are used to transmit configuration information and control commands.
If the migration networks of the source and destination hosts are unavailable, the system uses the management networks.
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 is performed during maintenance to optimize system performance. For example, you can manually migrate the VMs on a host to another host that operates correctly before you upgrade the hardware of the host. After hardware upgrade, you can migrate the VMs back to the host.
After a VM is migrated, you can view its migration information. For more information about this task, see "View the migration history of a VM."
To avoid 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 enough CPU and memory resources.
You might change the disk format in the Storage or the Host and Storage migration. To avoid migration failure, make sure the available space of the target storage is at least twice the space of the source storage before migration.
For VMs bound with physical CPUs, make sure the source and destination hosts have exactly the same NUMA architecture in the Storage or the Host and Storage migration. If the hosts have different NUMA architectures, the migration operation might fail or the VM performance might be affected.
Before migrating a VM mounting a CR-drive, unmount the CD-drive.
If a VM in an affinity group has migrated, other VMs in this group migrate automatically based on migration rules.
From the left navigation pane, select Data Center >Virtualization > Cluster name > Host name > VM name.
Click Migrate.
Select a migration type, and then configure parameters as needed.
Click OK.
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 Space Console.
Timeout: Specify the timeout period for migrating a running VM. The system suspends the VM when the VM is not migrated within the migration timeout to speed up the migration. After migration, the system resumes the VM automatically. The default migration timeout is 5 minutes. If you set the migration timeout to 0, the system does not suspend the VM during migration. The migration timer is triggered depending on the migration mode.
Host/Host and Storage—The timer is triggered when the VM starts to be migrated.
Storage—The timer is triggered when the system updates dirty data (data generated during migration) to the first disk on the VM after all VM disks have been migrated to the target storage pool.
Compression: Set whether to compress the data to be transmitted during migration. This parameter is applicable only to running and suspended VMs..