Trying to run the vmware-cmd.pl script and keep getting the following error:
Fault: SOAP Fault
Fault string: memory
Fault Detail: InvalidRequestFault
I am on a Windows XP Pro box with the vmware Remoe cli install and here is what I am entering in the command prompt line. First I switch to the Remote/bin directory and type the following
vmware-cmd.pl --server <ip address of machine I want to connect to> /vmfs/volumes/493343df..../2008VM/2008VM.vmx createsnapshot 2009VM483 and hit <Enter>.
I am then prompted for the user name and password. Once I enter that I receive the error shown above. I have searched the internet for anything to help me on this and have found just a few sites but none that can resolve the error. I am trying to connect to a VI 3.5 ESX server. Any ideas on what the error pertains to?
Are you using RCLI or vCLI? I tested it with vCLI which is the latest version and redubbed from RCLI and you're missing few additional parameters that 1.0 version probably does a crappy job of letting you know what the error is, other than the generic fault.
Basically, when creating a snapshot, you'll need to pass in a few additional parameters which is required in this case versus using the vSphere Client.
Here is a sample run using vCLI:
C:\Program Files\VMware\VMware vSphere CLI\bin>vmware-cmd.pl --server himalaya.primp-industries.com --username root /vmfs/volumes/4a31aece-e34d675a-72cf-003048d9586a/Quentin/Quentin.vmx createsnapshot MY_SNAPSHOT Enter password: For creating a snapshot you must specify <name> <description> <quiesce - can be 0/1> <memory - can be 0/1>
As you can see, you need to specify not only the snapshot name, but also a description and whether or not to quiesce to VM and capture it's memory.
Here is the run again with the correct params:
C:\Program Files\VMware\VMware vSphere CLI\bin>vmware-cmd.pl --server himalaya.primp-industries.com --username root /vmfs/volumes/4a31aece-e34d675a-72cf-003048d9586a/Quentin/Quentin.vmx createsnapshot MY_SNAPSHOT SNAP_DESC 0 0 Enter password: createsnapshot (MY_SNAPSHOT SNAP_DESC 0 0) = 1
I would highly recommend upgrading to the latest version of the vCLI as it supports both ESX(i) 3.5 and 4.0 and it provides better error/warning messages.
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".