NAME

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


SYNOPSIS

 hostevacuate.pl [options]


DESCRIPTION

This VI Perl command-line utility 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

GENERAL OPTIONS

source

Required. Host name containing virtual machines to be evacuated.

destination

Required. Host name to transfer virtual machines to.

pool

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. For host evacuation, all the virtual machines should be in the specified state. If this option is not specified, then all the virtual machines will be migrated regardless of their state.

quiet

Optional. Flag to specify whether or not to provide progress messages. Default is '0'.


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
                --source ABC --destination XYZ --pool Pool9

Evacuate host 'Host1' by migrating all virtual machines from 'Host1' to another host 'Host2'. Let the priority of the migration task be 'high' and let the quiet flag be '1' to provide progress messages.

 hostevacuate.pl --url https://<host>:<port>/sdk/vimService
                --username myuser --password mypassword
                --source Host1 --destination Host2 --pool Pool9
                --piority high


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0.1

No operation work when VMware ESX Server 3.0.1 directly accessed.