The obvious gist from @reidransom didn't work for me.
1 Answer
Working through Section 9.24.3 of the User Manual, the following will allow all users to set virtual machines to autostart:
cat /Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist | sed '6s/true/false/' | sudo tee /Library/LaunchDaemons/org.virtualbox.vboxautostart.plist
sudo mkdir -p /etc/vbox/
echo 'default_policy = allow' | sudo tee /etc/vbox/autostart.cfg
VBoxManage modifyvm VM_NAME_HERE --autostart-enabled on
To restrict this ability to a single user, use this line instead:
echo 'default_policy = deny\nUSERNAME_HERE = {\nallow = true\n}' | sudo tee /etc/vbox/autostart.cfg