NAME

vmmigrate.pl - Migrates one or more virtual machines within the current host or from the current host to another host.


SYNOPSIS

 vmmigrate.pl [options]


DESCRIPTION

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.


OPTIONS

GENERAL OPTIONS

source

Required. Host name containing the virtual machines.

destination

Optional. 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.

quiet

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

migrate_flag

Optional. Flag to specify whether or not to migrate the virtual machine within the current host. Default is '0' (i.e the VMs will be migrated to different host). <destination> option is not needed if migrate_flag is '1'.


EXAMPLES

Migrate a virtual machine named VM1 from host 'ABC' to host 'XYZ'

 vmmigrate.pl --url https://<host>:<port>/sdk/vimService
                --username myuser --password mypassword
                --source ABC --destination XYZ --pool Pool9

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
                --source Host1 --pool Pool123 --piority low


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0.1

No operation work when VMware ESX Server 3.0.1 directly accessed.