Configure Autostart

Note

This doesn't work with systemd ... see this instead.

System Setup

mkdir -p /etc/vbox
chgrp vboxusers /etc/vbox
chmod 1775 /etc/vbox

cat <<"EOF" >>/etc/default/virtualbox
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
EOF

cat <<"EOF" >/etc/vbox/autostart.cfg
default_policy = deny

attie = {
        allow = true
}
EOF

systemctl enable vboxautostart-service

User Setup

VBoxManage setproperty autostartdbpath /etc/vbox

VM Setup

VBoxManage modifyvm ${VM_UUID} --autostart-enabled on
VBoxManage modifyvm ${VM_UUID} --autostop-type acpishutdown