NAME

hostevacuate.pl - Migrates all virtual machines from one host to another.


SYNOPSIS

 hostevacuate.pl [options]


DESCRIPTION

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.


OPTIONS

sourcehost

Required. Name of the host that contains the virtual machines to be evacuated.

targethost

Required. Name of the host to transfer virtual machines to.

targetdatastore

Required. Datastore of target host to transfer virtual machines to.

targetpool

Required. Resource pool to associate with the virtual machine.

priority

Optional. The priority of the migration task: default, high, low. Default is 'defaultPriority'.

state

Optional. State of the virtual machine: poweredOn, poweredOff, suspended. If specified, the virtual machine migrates only if its state matches the specified state.


EXAMPLES

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


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0.1

No operation works when VMware ESX 3.0.1 is accessed directly.