Code: Select all
2.21.3. Mac OS X: Starting the Autostart Service With launchd
On Mac OS X, launchd is used to start the Oracle VM VirtualBox autostart service. An example configuration file can be found in /Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist. To enable the service copy the file to /Library/LaunchDaemons and change the Disabled key from true to false. Furthermore replace the second parameter to an existing configuration file which has the same format as on Linux, see Section 2.21.1, “Linux: Starting the Autostart Service With init”.
To manually start the service use the following command:
Copy# launchctl load /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
For additional information on how launchd services can be configured see:
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html.
The plist file is a wrapper around
Code: Select all
/Applications/VirtualBox.app/Contents/MacOS/VBoxAutostartDarwin.sh /etc/vbox/autostart.cfg
Code: Select all
VBoxAutostart: error: User is not allowed to autostart VMs
VBoxAutostart: error: User is not allowed to autostart VMs
VBoxAutostart: error: User is not allowed to autostart VMs
00:00:00.000405 main VirtualBox Autostart 6.1.28 r147628 darwin.amd64 (Oct 18 2021 19:59:14) release log
00:00:00.000408 main Log opened 2021-11-17T01:47:51.817796000Z
00:00:00.000409 main Build Type: release
00:00:00.000430 main OS Product: Darwin
00:00:00.000441 main OS Release: 17.7.0
00:00:00.000452 main OS Version: Darwin Kernel Version 17.7.0: Fri Oct 30 13:34:27 PDT 2020; root:xnu-4570.71.82.8~1/RELEASE_X86_64
00:00:00.000609 main DMI Product Name: iMac12,1
00:00:00.000680 main DMI Product Version: 1.0
00:00:00.000684 main Firmware type: failed - VERR_NOT_SUPPORTED
00:00:00.000720 main Host RAM: 12288MB (12.0GB) total, 10469MB (10.2GB) available
00:00:00.000723 main Executable: /Applications/VirtualBox.app/Contents/MacOS/VBoxAutostart
00:00:00.000723 main Process ID: 3596
00:00:00.000724 main Package type: DARWIN_64BITS_GENERIC
Code: Select all
bash-3.2# cat /etc/vbox/autostart.cfg
default_policy = deny
paul = {
allow = true
startup_delay = 10
}
If I change that deny to allow…
Code: Select all
VBoxAutostart: error: could not get base directory: VERR_PATH_NOT_FOUND
I just had to reinstall VirtualBox twice and now have the latest version with the extension pack installed.
The only reliable way to start it is still
Code: Select all
/usr/local/bin/VBoxManage startvm ed8b8574-9a71-4b27-b0a9-c6ac81721fe2
Code: Select all
/usr/local/bin/VBoxHeadless
Tried rolling my own plist file and getting rid of all the other junk:
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
<plist version='1.0'>
<dict>
<key>Label</key>
<string>org.virtualbox.autostart</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/VBoxManage</string>
<string>startvm</string>
<string>ed8b8574-9a71-4b27-b0a9-c6ac81721fe2</string>
</array>
<key>Disabled</key><false/>
<key>KeepAlive</key><true/>
</dict>
</plist>