migrateVM.pls - vMotion without shared storage

migrateVM.pls - vMotion without shared storage

The following vSphere SDK for Perl Script provides an example of performing a vSphere 5.1 vMotion of a live running virtual machine and changing both it's datastore as well as host using the RelocateVM_Task() vSphere API.

Here is an example of running the script:

./migrateVM.pl --server 172.30.0.221 --username root --vmname FRANK --vihost 172.30.0.243 --datastore local-datastore-2

You will need to be connecting to a vSphere 5.1 vCenter Server and specify the following parameters:

--vmname = Name of the Virtual Machine to migrate

--vihost = Name of ESXi host to migrate to

--datastore = Name of the datastore to migrate to

Here are a few screenshots:

vmotion-1.png

vmotion-3.png

vmotion-2.png

For more details, please refer to this blog post.

Attachments
Version history
Revision #:
1 of 1
Last update:
‎10-04-2012 08:43 AM
Updated by: