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 CLIFirst 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 --interactiveonce you have put svmotion in to interactive mode you will be prompted with the followingEntering interactive mode. All other options and environment variables will beignored.Enter the VC url or IP address and add in a username and password with the correct rights to perform a svmotionEnter the VirtualCenter service url you wish to connect to (e.g. https://myvc.mycorp.com/sdk, or just myvc.mycorp.com): 10.10.1.10Enter your username: Domain\usernameEnter your password: ********wait for the CLI to connect to your VCAttempting 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 DataCenterEnter 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.vmxEnter the name of the destination datastore: LUN2you 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