Migration with
vMotion
VMware vMotion supports the live migration
of running virtual machines from one physical server to another with no
downtime. The source and destination physical servers may be in the same
datacenter or in different datacenters.
When calling the
VirtualMachine
object’s
MigrateVM_Task
method, you can
specify a host or resource pool to migrate to, and optionally the task priority
and power state of the virtual machine. The
VMotion
example makes the
following queries, and performs the migration if possible:
- UsesQueryVMotionCompatibility_Taskto check that two hosts are compatible.
- UsesCheckMigrate_Taskto check whether migration is feasible. If two hosts are not compatible, virtual machines cannot be migrated from one to the other.
- UsesCheckRelocation_Taskto check whether relocation is possible.
MigrateVM_Task
was
deprecated in vSphere 6.5 and can be replaced with
RelocateVM_Task
.