vmmigrate.pl - Migrates one or more virtual machines within the current host or from the current host to another host.
vmmigrate.pl [options]
This VI Perl command-line utility provides an interface to migrate one or more virtual machines within the current host or from the current host to another host.
Required. Name of the virtual machine.
Required. Host name containing virtual machines to be evacuated.
Required. Host name to transfer virtual machines to.
Required. Datastore of target host to transfer virtual machines to.
Required. Resource pool to associate with the virtual machine.
Optional. The priority of the migration task: default, high, low. Default is 'defaultPriority'.
Optional. State of the virtual machine: poweredOn, poweredOff, suspended. If specified, the virtual machine migrates only if its state matches the specified state.
Migrate a virtual machine named VM1 from host 'ABC' to host 'XYZ'
vmmigrate.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --sourcehost ABC --targethost XYZ --targetdatastore storage1 --targetpool Pool9 --vmname VM1
Migrate a virtual machine named VM1 within the current host to pool 'Pool123' and let the migration priority be 'low'.
vmmigrate.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --sourcehost ABC --targethost XYZ --targetdatastore storage1 --targetpool Pool9 --piority lowPriority --vmname VM1
All operations work with VMware VirtualCenter 2.0.1
No operation work when VMware ESX Server 3.0.1 directly accessed.