VMware

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
9 Replies Last post: Dec 5, 2008 7:25 AM by Spackmeier  

start and stop virtual machine on command line... posted: Oct 9, 2008 7:13 AM

Click to view Spackmeier's profile Enthusiast 39 posts since
Oct 7, 2008

Hi, I have VMware ServerVersion 2.0.0Build 116503 on a 2003 server R2

I have a virtual machine online and I have install the VMware VIX

Now I want to backup my virtual machine with a simple xcopy of my folder, but for do this I must power off the virtual machine.

I see that on the old GSX, the command vmware-cmd D:\VirtualMachines\VMXP02\winXPPro.vmx start work but in the vmware server 2 I can't use the vmrun command line....

I arrive to this step:

vmrun.exe -T ipserver -h https://ipserver:8333/sdk -u adminuser -p adminpwd list

With this I have:

totale running VMs: 1

standar nameserver/namefiel.vmx

Now I try the command

vmrun.exe -T ipserver -h https://ipserver:8333/sdk -u adminuser -p adminpwd stop \[ipserver\folrder\namevirtualmachinefolder\file.vmx|file://ipserver/folrder/namevirtualmachinefolder/fil.vmx]

vmrun.exe -T ipserver -h https://ipserver:8333/sdk -u adminuser -p adminpwd stop https://10.10.1.4:8333/sdk/namesarver/filr.vmx

and oder try....

I need help....thanks!

Click to view guyrleech's profile Virtuoso 1,814 posts since
Mar 6, 2006

A couple of observations:

1) Why are you using "-T ipserver"? This should be "-T server"

2) I don't use vmrun on Windows but I do on Linux and you have to specify the vmx relative to its datastore such as "[standard] folder/vm.vmx"

Ignore the funny icon above between the opening square bracket and "standard" - this forum editor puts it in and I don't know how to stop it!


Click to view cgf57's profile Lurker 1 posts since
Oct 11, 2008
why next time? who knows when?

Anyway you should have do like this

to stop:
VMrun -T server -h https://localhost:8333/sdk -u adminuser -p adminpwd stop "{standard} nameserver/namefile.vmx" soft

to start:
VMrun -T server -h https://localhost:8333/sdk -u adminuser -p adminpwd start "{standard} nameserver/namefile.vmx" gui

PLEASE, REPLACE ALL { and } WITH square bracket

(It works also on Linux)

p.s. the manual might be not clear (otherwise it should be not a manual), running VMrun without any parameter, you got the examples and there...
you were nearly right, you had just missed to put <list> corectly, of course in case someone has got a different datastore name, this has to be written instead of <standard>.
Click to view wila's profile Virtuoso 3,266 posts since
Jun 27, 2006
guyrleech wrote:
....snipped.... relative to its datastore such as "[standard] folder/vm.vmx"

Ignore the funny icon above between the opening square bracket and "standard" - this forum editor puts it in and I don't know how to stop it!
Heheh, there's a help icon in the editor.. I suggest to click on it and check the help documentation :)
In addition you might want to take a look at my forum wiki documentation here: Undocumented wiki markup tricks
Hope this helps,


--
Wil

edit: instead of just pointing you to the documentation I should also have told you that you can use things like { noformat } (without the extra space characters and { code } (again without the extra spaces.

Re: start and stop virtual machine on command line...

6. Oct 11, 2008 6:20 AM in response to: wila
Click to view guyrleech's profile Virtuoso 1,814 posts since
Mar 6, 2006
[Thanks]. Still can't find any help in the editor but at least I know how to make my posts very pretty now. :^0

Trying square brackets around "Thanks" - looks ok in the preview but go wonky in the post. :-(
Click to view guyrleech's profile Virtuoso 1,814 posts since
Mar 6, 2006
or maybe not the second time!
Click to view wila's profile Virtuoso 3,266 posts since
Jun 27, 2006
You're most welcome. The help icon links to here: http://communities.vmware.com/markuphelpfull.jspa
I completely understand you are overlooking it as someone else had to point it out to me as well :D it is in the plain text tab of the editor, not in the "rich text" view.
--
Wil

VMware Developer

SDKs, APIs, Videos, Learn and much 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

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities