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.


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 think this might be a bug in VMWare. Have you tried VirtualBox (http://www.virtualbox.org/) instead? It has a command line tool VBoxHeadless, which lets you run virtual machines in headless mode, and connect to them via RDP. With a bit of luck, you can even convert or run your VMWare machine using VirtualBox.

share|improve this answer

Your Answer


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.