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 vmware.com. 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.
|
Entering interactive mode. All other options and environment Enter your username: VCadmin Enter your password:
Attempting to connect to https://VC.domain.com/sdk. 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=https://virtualcenter.domain.com/sdk --username=user_name to login into VirtualCenter --datacenter=DataCenter --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:
Post a Comment