VMware VMotion support the live migration of running virtual machines from one physical server to another with no downtime. The source and destination physical servers can be in the same datacenter or in different datacenters.

When you call the VirtualMachine object’s MigrateVM_Task method, you can specify either a host or resource pool to migrate to. You can optionally specify the task priority and the power state of the virtual machine. The VMotion example performs the following tasks:

Uses QueryVMotionCompatibility_Task to check two hosts are compatible.

Uses CheckMigrate_Task to check whether migration is feasible. For example, if two hosts are not compatible, virtual machines cannot be migrated from one to the other.

Uses CheckRelocation_Task to check whether relocation is possible.

The sample performs the migration if the hosts are compatible.