Monday, February 04, 2008

VMware Storage VMotion

With ESX 3.5 and VirtualCenter 2.5, VMware introduces a new feature called Storage VMotion. As a matter of fact, it isn’t a completely new feature. It has been used during Virtual Machine upgrade from ESX 2.x to ESX 3.x, which was called DMotion. It moves the Virtual Machine’s memory from a ESX 2.x host to a ESX 3.x host, and moves its virtual disks from VMFS 2 to VMFS 3 datastore. It greatly reduces the Virtual Machine’s downtime during upgrade. In ESX 3.5/VC2.5, the Virtual Machine stays in the same host, but moves its virtual disks to a new location. I think it is a great extend of VMotion feature. It helps a lot in SAN LUN maintenance, and load balancing.

You will need RCLI package installed. It has Windows and Linux version. Or better yet, just use VirtualCenter to download a RCLI Virtual Appliance directly from The command to run Storage VMotion is svmotion. It can be run in interactive mode or non-interactive mode.

  • Interactive Mode: use the --interactive flag to enter this mode, and it will ignore the rest of flags if it has any.

atl1396:~# svmotion --interactive

Entering interactive mode. All other options and environment
variables will be ignored. Enter the VirtualCenter service url you wish to connect to (e.g., or just

Enter your username: VCadmin

Enter your password:

Attempting to connect to

Connected to server.

Enter the name of the datacenter: DataCenter

Enter the datastore path of the virtual machine

(e.g. [datastore1] myvm/myvm.vmx): [sanlun] VM1/VM1.vmx

Enter the name of the destination datastore: sanlun2

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%

  • Non-interactive Mode:

svmotion --url=

--username=user_name to login into VirtualCenter


--vm='[testlun1] TestVM1/TestVM1.vmx:testlun3'

--disks='[testlun3] TestVM1/TestVM1.vmdk:testlun3'

The --disks flags is optional. If the disks need to be stored at different datastores, or to separate datastore for .vmx file and .vmdk files. Sometimes it is good to use it to separate the datastore. Snapshots store in the same directory as the .vmx file by default.

No comments: