Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since vSphere 5.x we can now request a combined vMotion and Storage vMotion at the same time via the Web Client - but can it be done via the CLI (not PowerCLI)?

I've read the documentation for 5.1 CLI and googled it pretty hard but I can't find any reference. Also if I do find an answer I thought it should have a place for it be easier to find.

share|improve this question
I don't think so. – ewwhite Aug 9 '13 at 16:49

can it be done via the CLI (not PowerCLI)?

You really need to clarify what you mean when you say "not PowerCLI". There's the VMA, and then there's right-on-an-ESX-server.

However I've recently taken the courses for vSphere 5...

The two operations require very different things, and are done sequentially (one-after-another) instead of simultaneously when you use the Web-based UI.

That means when you do it from the VMA command line, you have to do two different things. (What your asking isn't possible directly from the ESX servers, as far as I could tell)

share|improve this answer

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:

  1. create a memory snapshot of a running VM on source host
  2. begin tracking changes to VM memory map since snapshot
  3. transfer the original memory snapshot to the target ESX host
  4. quiesce the VM
  5. apply memory snapshot delta to the original memory snapshot on the target host
  6. stop the VM on source host
  7. 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


share|improve this answer

In v5.1 docs, it looks like you can use svmotion command, though I'm not certain if its capable of doing just storage or both.

svmotion [standard vCLI options] - -datacenter=<datacenter_name>
     - -vm <VM config datastore path>:<new datastore>
    [- -disks <virtual disk datastore path>:<new datastore>,
     <virtual disk datastore path>:<new datastore>]

svmotion link

This is also another method - How to move a VM without vCenter or Storage VMotion

share|improve this answer
Both of those are Storage vMotion only sorry. – Chopper3 Mar 6 '14 at 20:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.