Pages

Friday 29 January 2010

Storage VMotion with VI Remote CLI

This article provides steps to use Storage VMotion (SVMotion) to move virtual machines from one LUN to another LUN when you are using the VI Remote CLI


First install the VI Remote CLI, you can download it from the following locations.  http://www.vmware.com/download/vi/drivers_tools.html.


If you are using Remote CLI on Windows, open a command prompt and browse to the bin directory inside C:\Program Files\VMware\VMware VI Remote CLI\.


Next run the following command to put svmotion in to interactive mode


C:\Program Files (x86)\VMware\VMware VI Remote CLI\bin>svmotion.pl --interactive


once you have put svmotion in to interactive mode you will be prompted with the following
Entering interactive mode.  All other options and environment variables will be
ignored.


Enter the VC url or IP address and add in a username and password with the correct rights to perform a svmotion
Enter the VirtualCenter service url you wish to connect to (e.g. https://myvc.my
corp.com/sdk, or just myvc.mycorp.com): 10.10.1.10
Enter your username: Domain\username
Enter your password: ********


wait for the CLI to connect to your VC
Attempting to connect to https://10.10.1.10/sdk.
Connected to server.


Enter the name of your VC.  Note: I noticed that this value needs to be case sensitive.
Enter the name of the datacenter: VM DataCenter


Enter the datastore path of the VM.  Note: This is also case sensitive.
Enter the datastore path of the virtual machine (e.g. [datastore1] myvm/myvm.vmx
): [LUN1] WIN2k3-Test/WIN2k3-Test.vmx


Enter the name of the destination datastore: LUN2


you will be prompted with the following message if you VM has multiple disks.
You can also move disks independently of the virtual machine.  If you want the disks to stay with the virtual machine, then skip this step..
Would you like to individually place the disks (yes/no)? no



Performing Storage VMotion.
0% |----------------------------------------------------------------------------
------------------------| 100%
    ############################################################################
##############
Storage VMotion completed successfully.

Disconnecting.

your VM has now been svmotion across to its new LUN.

Also you can use SVMotion Graphical User Interface by Alexander Gaiswinke in conjunction with the VI Remote CLI as well if you are not comfortable with using the VI Remote CLI. 

Simply Install the VMWARE remote CLI on a Windows machine to the standard path.
Download the GUI and save the file vms.pl into the C:\Program Files\VMware\VMware VI Remote CLI\bin directory.
Save the svmotionGUI.exe somewhere on the machine.
Double click it!


No comments:

Post a Comment