hostevacuate.pl - Migrates all virtual machines from one host to another.
hostevacuate.pl [options]
This command provides an interface to evacuate a host by migrating all virtual machines from one host to another in preparation for maintenance actions on that host.
Required. Name of the host that contains the virtual machines to be evacuated.
Required. Name of the host 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.
Evacuate host 'ABC' by migrating all virtual machines from 'ABC' to another host 'XYZ':
hostevacuate.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --sourcehost ABC --targethost XYZ --targetdatastore storage1 --targetpool Pool9
Evacuate host 'Host1' by migrating all virtual machines from 'Host1' to another host 'Host2'. Let the priority of the migration task be 'high':
hostevacuate.pl --url https://<host>:<port>/sdk/vimService --username myuser --password mypassword --sourcehost ABC --targethost XYZ --targetdatastore storage1 --targetpool Pool9 --piority highPriority