I'm trying to start a virtual machine from the command line that is on my Linux workstation (SLED 10 SP1 x86_64). I've added "msg.autoAnswer = TRUE" to the .vmx file. Unfortunately, when I attempt to start the virtual machine I get the following:
deimos:~/vmware/PGPUniversal-2.6.3> vmrun start PGPUniversal-2.6.3.vmx
Error: Command failed: Cannot connect to the virtual machine
I've search through the forum but didn't find an answer. According to this page, http://www.vmware.com/support/ws55/doc/ws_learning_cli_vmrun.html, I'm not doing anything out of the ordinary.
deimos:~/vmware/PGPUniversal-2.6.3> vmware -v
VMware Workstation 6.0.0 build-45731
Ideas?
I should have picked up on this. I run VMs with no gui on my Linux box...
Try "vmrun start nogui..." That should work. It tells workstation to run the vm without starting the gui. I ssh into my linux box and run this just fine.
I've found I had to specify the full path to the vmx file. Give that a try and see if it helps.
John, thanks for the input. Sadly, I still got the same error:
deimos:~> vmrun start /home/shawn.protsman/vmware/PGPUniversal-2.6.3/PGPUniversal-2.6.3.vmx
Error: Command failed: Cannot connect to the virtual machine
Is the Workstation UI started before you do this? If not, does it appear when you run this command?
Could you strace vmrun when you run this command and post the result?
Here is an interesting thing I noticed today, now that I'm back in the office. If I run the command from the physical machine (my Linux system), VMWare Workstation will start up and then start the virtual machine successfully. It works as expected. But when I ssh from another machine into my Linux workstation, run the same command, I get the "Error: Command failed: Cannot connect to the virtual machine".
My strace output is 6166 lines long. Is there anything specific you want to see in it? I doubt this forum will accept a post that long. Let me know how I can get this to you if it will be of help.
Thanks,
--Shawn
With a remote connection you don't have a X11 environment / you don't have the DISPLAY environment variable set.
Resolved.
I already had "export DISPLAY=0.0" in my .profile on my laptop (Mac OS 10.4.11) but I wasn't passing the '-Y' param to ssh. Now, if I start X11, then log in to my Linux box with '-Y', I can run 'vmrun start ...' and VMWare launches and starts my virtual machine. Works nicely! oreeh, thanks for pointing me in the right direction.
Now to figure out how to start the virtual machine from my laptop, detach while keeping it running and then re-attach when I return to the office.
--Shawn
I should have picked up on this. I run VMs with no gui on my Linux box...
Try "vmrun start nogui..." That should work. It tells workstation to run the vm without starting the gui. I ssh into my linux box and run this just fine.
Take a look at (Gnu ?) "screen" - not sure if it is available for Mac OS.
'screen' is included with OS X but I after I detach I cannot logout until I suspend the virtual machine in the X11 session. I don't think screen was meant to be used with X sessions but would love to be proven wrong.
I started vmrun with nohup, then closed the GUI window and clicked send to background and this worked. And a less complicated way is to use John's suggestion of 'nogui':
deimos:~> vmrun start vmware/PGPUniversal-2.6.3/PGPUniversal-2.6.3.vmx nogui
+ Done vmrun suspend vmware/PGPUniversal-2.6.3/PGPUniversal-2.6.3.vmx
Thanks guys!