VMware Communities
joxean
Contributor
Contributor

vmrun: Error: The virtual machine is not powered on

Hi,

I'm using vmrun in host Windows XP SP3 to automate some tasks but I always get the following error when trying to execute any command except "list" and "start":

c:\>vmrun -T ws -gu user -gp pass stop "C:\somevm
Error: The virtual machine is not powered on "C:\somevm"

The VM is up and running and executing "vmrun -T ws list" shows that the VM is running, however, trying to execute any other command (even stop...hard) will complain with the error shown bellow.

The problem appears to affect other VMWare versions (server, etc...) because I found the same problem reported by other people (i.e., http://communities.vmware.com/message/1157720;jsessionid=6763DCC1167237C621F6395198A04AFE) .

Does anyone known what is the problem and how can I solve it?

Thanks in advance,

Joxean

Tags (1)
Reply
0 Kudos
3 Replies
continuum
Immortal
Immortal

the path to the VM looks invalid - are you sure you posted correct syntax ?

___________________________________

VMX-parameters- VMware-liveCD - VM-Sickbay


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
joxean
Contributor
Contributor

Hi,

Well, I wrote just a sample of the command. The following are complete commands and the complete output of them:

C:\>"%PROGRAMFILES%\VMware\VMware Workstation\vmrun.exe" -T ws -gu Administrator -gp ***** stop "D:\vms\testxp\Windows XP Professional.vmx"
Error: The virtual machine is not powered on: D:\vms\testxp\Windows XP Professional.vmx
C:\>"%PROGRAMFILES%\VMware\VMware Workstation\vmrun.exe" -T ws stop "D:\vms\testxp\Windows XP Professional.vmx" hard
Error: The virtual machine is not powered on: D:\vms\testxp\Windows XP Professional.vmx
C:\>"%PROGRAMFILES%\VMware\VMware Workstation\vmrun.exe" -T ws list
Total running VMs: 1
D:\vms\testxp\Windows XP Professional.vmx

I tried with both VMRun version 6.5.0 build-118166 and e.x.p build-186713. It seems to be a bug because it does shows that the VMWare image I select is running however complains running any command that the VMWare must be powered on before doing anything.

Any clues?

UPDATE: I found a "workaround". Misteriously enough debugging vmrun.exe with a debugger which gets the privilege SeDebugPrivilege it works as expected so I suspect it's a privileges problem (BTW, I'm running VMRun as a local administrator).

I also tried patching (:P:p) the binary VMRun.exe at the offset where the check for the return value of vix_Vix_GetPropertiesVargs is made wrong (in VMRun 6.5.0 build-118166 at offset 0x00402A7A) forcing always to take the jump regardless of the retun value of this function but, well, as expected, it complains at another point with "Error: The virtual machine needs to be powered on" message. I know that this is not so "legal" but, well, I tried just in case.

So, any clue? Any workaround different from creating another binary that debugs vmrun.exe? Smiley Wink

Thanks you!

Reply
0 Kudos
joxean
Contributor
Contributor

So, no workaround? It seems to be a timing issue but, well, creating a process to debug VMRun to fix the issue is really an overhead.

Any help?

Reply
0 Kudos