VMware

This Question is Answered

1 "helpful" answer available (6 pts)
4 Replies Last post: Nov 27, 2008 2:06 AM by guyrleech  

Cannot open vm when suspending VM from commandline posted: Nov 18, 2008 6:02 AM

Click to view pcvnes's profile Novice 26 posts since
Mar 11, 2005
Hi,

I have searched around but could not find the answer , so maybe someone here can help me out.
Recently i upgraded VM Ware server for my home server from V1 to V2. I had to modify the script which suspends the VMs and makes a backup of those VMS.
When making a backup the VMs are suspended, this worked fine on V1 but now on V2 it fails;

/usr/bin/vmrun -T server -h https://10.20.0.10/sdk -P 8333 -u root -p t3l3funk suspend "/VMA/kwek/Windows 2000 Professional.vmx"
Error: Cannot open VM: /VMA/kwek/Windows 2000 Professional.vmx, The virtual machine cannot be found

The VMX is at the shown location, suspending the VM using the webinterface works fine.
When suspending the VM using the commandline a tasks status is reported in the console with the error 'Error:Invalid datastore format '/VMA/kwek/Windows 2000 Professional.vmx'.' on 'Task ID:SearchIndex.findByDatastorePath'.

Who can help me out ? (slashing out of the spaces does not work)

Re: Cannot open vm when suspending VM from commandline

1. Nov 18, 2008 10:57 AM in response to: pcvnes
Click to view mattrich's profile Expert VMware Employees 526 posts since
Nov 29, 2006
Instead of using the file system path to the virtual machine, you need to use a datastore-relative path.

It will look something like this:
[standard] vmName/vmName.vmx


The Web UI should show the actual datatore-relative path for each VM. Also, you'll obviously need to put quotes around this path, since there needs to be a space between the datastor and rest of the path.
Click to view guyrleech's profile Virtuoso vExpert 1,858 posts since
Mar 6, 2006

Try a "list" option to vmrun first which will show you the correct format the .vmx file must be sepcified as.


VMware Beta Programs

Want to be Considered for Future Beta Programs?

Learn More

VMware Developer

Download SDKs, APIs, videos,
training, and more in the Developer community.

Learn More

Developer
Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld
Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

Only VMware ... Delivers Nexus 1000V

Ensure consistent, policy-based network capabilities to virtual machines across your data center.

Learn More

Communities