Badges

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

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

    Storage VMotion simplifies array migration and upgrade tasks and reduces I/O bottlenecks by moving running virtual machines to the best available storage resource in your environment. But There was one downside to it. Migrations using Storage VMotion had to be administered through the Remote Command Line Interface (Remote CLI). Asp24 created a webpage that does the following: Log in to VirtualCenter (2.5) and get the storage/config file paths for all registered VM’s (like this: iscsi1_1 vm/vm.vmx) Put the list into a dropdown menu and have an input field for the target storage location. And a move-button to start svmotion. You can read all about it in this community thread.

    http://communities.vmware.com/thread/119217?tstart=0

  • http://www.ntpro.nl Eric Sloof

    Storage VMotion simplifies array migration and upgrade tasks and reduces I/O bottlenecks by moving running virtual machines to the best available storage resource in your environment. But There was one downside to it. Migrations using Storage VMotion had to be administered through the Remote Command Line Interface (Remote CLI). Asp24 created a webpage that does the following: Log in to VirtualCenter (2.5) and get the storage/config file paths for all registered VM’s (like this: iscsi1_1 vm/vm.vmx) Put the list into a dropdown menu and have an input field for the target storage location. And a move-button to start svmotion. You can read all about it in this community thread.

    http://communities.vmware.com/thread/119217?tstart=0

  • http://www.vmetc.com Rich

    Thanks Eric. I will definitely explore this svmotion interface as well!

  • http://www.vmetc.com Rich

    Thanks Eric. I will definitely explore this svmotion interface as well!

  • http://vmetc.com Rich

    I just tried this in a data center with over 75 vms. It listed them all but the console does not scroll back to the vms at the top of the list. I tried to pipe “|more” but it did not work. Maybe the web page Eric commented about is a better solution for now for larger environments.

  • http://vmetc.com Rich

    I just tried this in a data center with over 75 vms. It listed them all but the console does not scroll back to the vms at the top of the list. I tried to pipe “|more” but it did not work. Maybe the web page Eric commented about is a better solution for now for larger environments.

  • http://vmetc.com rbrambley

    Correction to my last comment – the “|more” command does work. It was a user issue …. I was able to svmotion a 30 gb vm in about 20 mins. Very nice! I will have to try multiple VMs by using multiple sessions at a later time.

    NOTE – The status of the svmotion can be watched at the bottom of the VIClient in the Recent Tasks panel.

  • http://vmetc.com Rich

    Correction to my last comment – the “|more” command does work. It was a user issue …. I was able to svmotion a 30 gb vm in about 20 mins. Very nice! I will have to try multiple VMs by using multiple sessions at a later time.

    NOTE – The status of the svmotion can be watched at the bottom of the VIClient in the Recent Tasks panel.

Get My Podcast On iTunes!
Support VM /ETC
Support VMETC.com

Support VMETC.com

Free Business and Tech Magazines and eBooks
@rbrambley tweets
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo