Well, since VMotion is a licensed vCenter feature, invoking it would need to be done by vCenter server. Perhaps the reason it is not currently exposed through the CLI is for some commercial/licensing reasons..
Anyway, I've looked and can't find any references to VMware equivalent of "svmotion" for traditional VMotion either.
I suppose, if you don't want to use PowerCLI, you could try to script something resembling VMotion with vmware-cmd, but even if it works (which I doubt), it will be clunky and totally unsupported.
Basic structure behind a VMotion operation is:
- create a memory snapshot of a running VM on source host
- begin tracking changes to VM memory map since snapshot
- transfer the original memory snapshot to the target ESX host
- quiesce the VM
- apply memory snapshot delta to the original memory snapshot on the target host
- stop the VM on source host
- start the VM on target host with memory snapshot
There is a vmware-cmd parameter that does quiescing and memory snapshots, so while you won't be able to do (2), you may be able to do the rest.
Virtual Machine Operations
vmware-cmd <conn_option> <config_file_path>
[answer |
connectdevice <device_name> |
createsnapshot <name> <description> quiesce [0|1] memory [0|1] |
...
I doubt it will run in a short enough time-frame to be useful with respect to loss of service. Sorry, probably not the answer you are looking for.
-- ab1
Reference:
http://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vcli.ref.doc%2Fvmware-cmd.html