Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The Question

How do i start this Wiki VM at the startup of the OSX Server?

I am running OSX Server 10.6.8 and VirtualBox 4.1.8 r75467 and a Debian Linux VM (called "wiki").

.

What I tried so far

Following this article: http://mikkel.hoegh.org/blog/2010/12/23/run-virtualbox-boot-mac-os-x/, i have wrote this plist and placed it in /Library/LaunchDaemons/bar.foo.WikiVirtualBox.plist:

<plist version="1.0">
<dict>
    <key>Label</key>
    <string>bar.foo.WikiVirtualBox</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/VBoxHeadless</string>
<string>-s</string>
<string>wiki</string>
</array>
<key>RunAtLoad</key>
<true></true>
<key>UserName</key>
<string>root</string>
<key>WorkingDirectory</key>
<string>/var/root</string>
<key>StandardErrorPath</key>
<string>/var/log/bar.foo.WikiVirtualBox.stderr.log</string>
<key>StandardOutPath</key>
<string>/var/log/bar.foo.WikiVirtualBox.stdout.log</string>
</dict>
</plist>

and told launchd to start it:

sudo launchctl load -w /Library/LaunchDaemons/bar.foo.WikiVirtualBox.plist

.

The Logfile

But the VM doesn't start. A Look at

tail -f /var/log/system.log

shows:

sudo[1909]: administrator : TTY=ttys000 ; PWD=/Users/administrator ; USER=root ; COMMAND=/bin/launchctl load -w /Library/LaunchDaemons/bar.foo.WikiVirtualBox.plist
VBoxSVC[1914]: 3891612: (connectAndCheck) Untrusted apps are not allowed to connect to or launch Window Server before login.
VBoxSVC[1914]: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
com.apple.launchd[1] (bar.foo.WikiVirtualBox[1910]): Exited with exit code: 1

When i log into the server via ssh (so no login window opened) i can run:

/usr/bin/VBoxHeadless -s wiki

and it works. So i don't understand the error above.

share|improve this question
1  
As an aside, have you ever considered OSX Server's built-in wiki engine. Many people either love it or hate it. I like it personally. I use it for one of my wikis. –  JoshP Sep 28 '12 at 14:59

2 Answers 2

I think VMs are created under your normal user and not under root.

Try to set lunchd to start the command with your normal user privileges.

share|improve this answer

Another idea is to do this:

While you have Virtualbox in your dock right click on it, go to Options, and then click on "Open at Startup". Of course, this won't start the actual Virtual Machine automatically, but it will start Virtualbox.

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.