Storage VMotion the easy way
While doing some research to get ready to implement the new ESX 3.5 storage vmotion feature I came across some helpful blog posts, and a script that will be a real time saver.
Unlike the vmotion we are used to, you can not right click on a vm in the vi client and initiate a storage vmotion. You have to download VMware-VIRemoteCLI and install it. The VIRemoteCLI can be downloaded as:
* a virtual appliance
* a windows installer
* a linux installer
Once the RemoteCLI is installed in Windows for example,
you have to open a command prompt, browse to the location it was installed, and then enter an interactive session where you will be prompted to provide various parameters that will ultimately kick off a storage vmotion. Vmwareworld.blogspot.com has a great post on walking you through using the Remote CLI on a windows machine.
Dominic over at vmprofessional.com says it best in his post about his vmpmotion.pl script.
“While the idea is brilliant and can save you from the dreaded downtime, the implementation that VMware has put together for the initial release of ESX 3.5.0 is pretty kludgey. If you have to move any number of VMs from one datastore to another you may find yourself cursing VMware for not adding this functionality to VirtualCenter ….”
Fortunately Dominic provides the solution to the problem with his vmpmotion.pl script. From his post:
“The script is a bit more friendly, just edit the script to include your VC url, username, password, cluster and Datacenter, then you will be prompted with a list of VMs to choose from, and a list of target datastore to choose from. Output will look similar to the following:
vicfg:~# ./vmpmotion.pl
cluster: dominic
[0] vm1 : [dominic-lun01] vm1/vm1.vmx
[1] vm2 : [dominic-lun02] vm2/vm2.vmx
Enter selection: 0
You selected vm1
[0] dominic-lun01
[1] dominic-lun02
Enter target : 1
You selected dominic-lun02
Performing Storage VMotion of vm1 to dominic-lun02
To install, just copy this script to your RemoteCLI host, and then make the script executable:
vicfg:~# chmod +x vmpmotion.pl
vicfg:~# ./vmpmotion.pl
Dominic’s example output and installation instructions are referring to the linux version of the RemoteCLI. According to VMware’s documentation, also downloadable from the same page as the install files, Fedora Core 7, SLES 10, and Ubuntu Desktop 7.04 are supported OSes.
The script is downloadable from vmprofessional.com here. I have also saved a copy on my Files page.
Related Posts
-
http://www.ntpro.nl Eric Sloof
-
http://www.ntpro.nl Eric Sloof
-
http://www.vmetc.com Rich
-
http://vmetc.com Rich
-
http://vmetc.com Rich
-
http://vmetc.com rbrambley
-
http://vmetc.com Rich









