In bsc#1107769, J Merkel reported that autostarting VirtualBox virtual machines on system boot no longer work since the switch to systemd.
It took a while, but a fix is now available, which is similar to the Oracle mechanism, and different from the one previously used by openSUSE. Once the updated code reaches the appropriate repository (Tumbleweed, Leap 15 Update, or Leap 42.3 Update) using this feature will only require the following steps:
-
As root, edit file /etc/vbox/autostart.cfg and add the following:
default_policy = denyCreate an entry for each user allowed to use autostart
myusername = {
allow = true
} -
As root, edit file /etc/default/virtualbox and add the following (set directory and file as you wish):
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg -
For each VM you want to autostart, as your regular user, enter a line such as
VBoxManage modifyvm <uuid|vmname> --autostart-enabled on -
To turn off autostart:VBoxManage modifyvm <uuid|vmname> --autostart-enabled off