vCloud PowerCLI SvMotion
What's the correct capitalization supposed to be? sVmotion? SVMotion? SvMotion? Blah, whatever. The point is, William Lam wrote a couple killer posts on doing a storage vMotion through the vCloud API. Feeling the PowerCLI mafia needed a solution as well, I went ahead and wrote it. William's post about performing the vMotion with the REST API made writing the PowerCLI code very easy.
A few general things to note:
comments powered by Disqus
- This is a storage vMotion for the entire VM. If you have VMs with multiple disks on different datastores, the theoretical behavior is that it will move all disks to the same datastore.
- You have to be a user with SYSTEM access. Normal Org admins don't have to worry about such things as datastores. It's all abstracted. :D
- You can't SvMotion to vCloud-disabled datastores. (I could think of some interesting use cases for that, but it doesn't work. ;))
- This is a great method to empty datastores for doing fresh VMFS volumes. Jason Boche has a great VMFS 5 article here. Don't forget to disable the datastore in vCloud Director before running! :D