VMware Communities > VMTN > VMware Serverâ„¢ > VMware Server 2 > Discussions

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
Reply

start and stop virtual machine on command line...

Oct 9, 2008 7:13 AM

Click to view Spackmeier's profile Enthusiast Spackmeier 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!

Reply Re: start and stop virtual machine on command line... Oct 10, 2008 2:00 AM
Click to view Spackmeier's profile Enthusiast Spackmeier 39 posts since
Oct 7, 2008

I try also

vmrun stop "d:\folder\virtualmachinename\virtualmachinefile.vmx" but doesn't work...respond me that is incorret...it want "http:......."

I think that this command is use in Workstation version.

I download the manual "using vmrun to control virtual machines" for Workstation and server 2.0 but I understand how stop and start...the example in this manual is not clear

Now I install a Xp virtual machine for test and I have new idea to try...

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

Have other idea?

Thanks!

p.s.: sorry for my english...

Reply Re: start and stop virtual machine on command line... Oct 10, 2008 10:55 AM
in response to: Spackmeier
Click to view guyrleech's profile Virtuoso guyrleech 1,768 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!


Reply Re: start and stop virtual machine on command line... Oct 10, 2008 12:12 PM
in response to: guyrleech
Click to view Spackmeier's profile Enthusiast Spackmeier 39 posts since
Oct 7, 2008

Hi, thanks for response!

I see now your message and this morning I find the correct string to do the command with my friend.

Next time I post a correst string for the other user...I think that tha manual is not clear...

Thanks a lot!

Goodnight

Reply Re: start and stop virtual machine on command line... Oct 11, 2008 1:40 AM
Click to view cgf57's profile Lurker cgf57 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>.
Reply Re: start and stop virtual machine on command line... Oct 11, 2008 3:37 AM
in response to: guyrleech
Click to view wila's profile Virtuoso wila 3,207 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.
Reply Re: start and stop virtual machine on command line... Oct 11, 2008 6:20 AM
in response to: wila
Click to view guyrleech's profile Virtuoso guyrleech 1,768 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. :-(
Reply Re: start and stop virtual machine on command line... Oct 11, 2008 6:20 AM
in response to: guyrleech
Click to view guyrleech's profile Virtuoso guyrleech 1,768 posts since
Mar 6, 2006
or maybe not the second time!
Reply Re: start and stop virtual machine on command line... Oct 11, 2008 6:39 AM
in response to: guyrleech
Click to view wila's profile Virtuoso wila 3,207 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
Reply Re: start and stop virtual machine on command line... Dec 5, 2008 7:25 AM
in response to: wila
Click to view Spackmeier's profile Enthusiast Spackmeier 39 posts since
Oct 7, 2008

This work fine, I use this commmand line for 1 month whitout problem!

this for start

vmrun -T server -h https://ipserver:8333/sdk -u vmware_user -p vmwarepassowrd start "standard folder/winNetStandard.vmx"

and this for stop

vmrun -T server -h https://ipserver:8333/sdk -u vmware_user -p vmwarepassword stop "standard folder/winNetStandard.vmx" soft

thanks for help

Actions