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

On a computer running OSX (snow leopard server) with VMWare Fusion installed I'm trying to start a VM via SSH without being directly logged in to the GUI.

Based on looking around I figured the following command should do the trick

vmrun -T fusion start /path/to/VM nogui

However it is returning this error

vmware-vmx[24770] <Warning>: 3891612: (connectAndCheck) Untrusted apps are not allowed to connect to or launch Window Server before login.
vmware-vmx[24770] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

which makes me think that it's not getting the 'nogui' part of the command or there is something with how OSX is setup that I don't understand.

share|improve this question
    
"which makes me think that it's not getting the 'nogui' part of the command" What occurs when you attempt the same command under a regular desktop/console session? –  user48838 Aug 14 '11 at 7:27

2 Answers 2

The "nogui" part is known to be problematic with MOSX because of security parameters that disallow "rogue" apps to start and operate (the untrusted part). To run headless, I've always just killed the GUI application once I've launched the VMs the old fashion way.

You can, however, create a launchd items to circumvent the (un)trust(ed) issue. It will have to run in the right security context and be in /Libary/LaunchAgents and include these parameters.

    <key>LimitLoadToSessionType</key>
    <string>LoginWindow</string>

Here's a good article to review: http://communities.vmware.com/message/1648085 -- the author uses a launchd item without the above parameters, but the VM runs as a specific user, which might be nice. For good info on launchd in general, check out this article: http://www.mactech.com/articles/mactech/Vol.25/25.10/2510MacEnterprise-SnowLeopard-launchdandLunch/index.html

share|improve this answer

I've played with both VirtualBox and VMWare Fusion, and have had issues getting either to run reliably (especially without logging in).

Now I do things the more reliable way: I run OS X inside ESXi instead. (ESXi installs fine on Mac Mini and the Macbook Pro I have).

This is only really an option if you have a dedicated machine to use for the VMs, though. If you want to run a VM in the background and also use a local GUI with a host OS, then you will have to muddle through.

share|improve this answer

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.