Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want/need to start my VM instances from the command line, or as part of the host boot sequence. Also, as part of a script manually launched on the host at will.

The obvious command for such case would be vmrun start with the nogui option, but this fails consistently in my 3 hosts running VMware Workstation 7.1.4 under CentOS 5.6 (64 bit):

[root@japeto ~/vmware/juno]$ vmrun start juno.vmx nogui

Error: The virtual machine needs to be powered on

If I open the vmware GUI and use the point+click method everything works fine. In fact, once a VM instance has been started this way, then the vmrun start ... nogui works at it should for other VM instances residing in the same host.

But this doesn't help for a headless operation where I can only access the host via ssh.

Any hints ? Thanks.

share|improve this question
    
I'm not sure, but I think you need a complete path-from-root for the .vmx file you're starting. –  sysadmin1138 Aug 19 '11 at 18:21

2 Answers 2

Have you verified that the modules are loading correctly?

the vmrun command doesn't always auto-load the modules successfully.

load them manually (/etc/init.d/vmware start) and try vmrun again.

share|improve this answer

I got this solution from another forum - and it seems to solve the issue:

su - -c "vmrun start /export/vmware/juno/juno.vmx nogui"
share|improve this answer
    
Later, the error had turned into Error: The operation was canceled. It looks like vmrun needs to have a session opened. If launched manually after the system is up, vmrun works as it is expected to work. –  David Ramirez Sep 7 '11 at 14:20
    
I got around the operation was canceled error using the -T flag: vmrun -T player start ~/vmware/winxp/winxp.vmx nogui, or for workstation: vmrun -T ws start ~/vmware/winxp/winxp.vmx nogui –  bmaupin Apr 26 '13 at 7:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.