VirtualBox 5, CentOS 7, vboxautostart-service.service failed
Posted: 13. Sep 2016, 20:16
Hi,
I'm trying to get my VM to start on host boot, but haven't succeeded. I'm using VirtualBox 5.1.4 on CentOS 7.2.1511
I've followed the blog posts and cross-checked with VB documentation:
http://lifeofageekadmin.com/how-to-set- ... y-startup/
http://askubuntu.com/questions/404665/h ... en-booting
I have not had any success. Note the above links are for VirtualBox 4 on Ubuntu, but the commands are the same for CentOS
I haven't done the update-rc.d commands because they don't translate easily to CentOS 7 and I'm not sure what they're doing.
The behaviour I'm seeing is that the VM does not start on host boot (although I can start it easily from command line)
I can't find a logfile for VirtualBox, but the following command seems to say something:
Thanks to Perryg's suggestion I tried adding a startup pause but it did not change anything:
/etc/default/virtualbox
Other information which might be relevant:
Linux Version
VirtualBox Version
Autostart database path
/etc/vbox/ attributes
/etc/vbox/ contents
/etc/vbox/autostart.cfg
If anyone has any suggestions or needs more information I would appreciate it.
Thanks,
Greg
I'm trying to get my VM to start on host boot, but haven't succeeded. I'm using VirtualBox 5.1.4 on CentOS 7.2.1511
I've followed the blog posts and cross-checked with VB documentation:
http://lifeofageekadmin.com/how-to-set- ... y-startup/
http://askubuntu.com/questions/404665/h ... en-booting
I have not had any success. Note the above links are for VirtualBox 4 on Ubuntu, but the commands are the same for CentOS
I haven't done the update-rc.d commands because they don't translate easily to CentOS 7 and I'm not sure what they're doing.
The behaviour I'm seeing is that the VM does not start on host boot (although I can start it easily from command line)
I can't find a logfile for VirtualBox, but the following command seems to say something:
Code: Select all
$ systemctl -l status vboxautostart-service.service
● vboxautostart-service.service
Loaded: loaded (/usr/lib/virtualbox/vboxautostart-service.sh; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2016-09-13 18:34:49 IST; 1min 8s ago
Process: 1353 ExecStart=/usr/lib/virtualbox/vboxautostart-service.sh start (code=exited, status=1/FAILURE)
Sep 13 18:34:40 sri-florence systemd[1]: Starting vboxautostart-service.service...
Sep 13 18:34:40 sri-florence vboxautostart-service.sh[1353]: vboxautostart-service.sh: Starting VirtualBox VMs configured for autostart.
Sep 13 18:34:40 sri-florence su[1372]: (to sri-user) root on none
Sep 13 18:34:49 sri-florence systemd[1]: vboxautostart-service.service: control process exited, code=exited status=1
Sep 13 18:34:49 sri-florence systemd[1]: Failed to start vboxautostart-service.service.
Sep 13 18:34:49 sri-florence systemd[1]: Unit vboxautostart-service.service entered failed state.
Sep 13 18:34:49 sri-florence systemd[1]: vboxautostart-service.service failed.
/etc/default/virtualbox
Code: Select all
$ cat /etc/default/virtualbox
sleep 10
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
Linux Version
Code: Select all
$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
Code: Select all
$ vboxmanage -version
5.1.4r110228
Code: Select all
$ VBoxManage list systemproperties | grep "Autostart database path"
Autostart database path: /etc/vbox/
Code: Select all
$ ls -ld /etc/vbox/
drwxrwxr-t. 2 root vboxusers 4096 Sep 13 17:25 /etc/vbox/
Code: Select all
$ ls -l /etc/vbox/
total 8
-rw-r--r--. 1 root root 402 Sep 13 15:47 autostart.cfg
-rw-------. 1 sri-user sri-user 1 Sep 13 17:06 sri-user.start
Code: Select all
$ cat /etc/vbox/autostart.cfg
# Default policy is to deny starting a VM, the other option is "allow".
default_policy = deny
# Bob is allowed to start virtual machines but starting them
# will be delayed for 10 seconds
sri-user = {
allow = true
startup_delay = 10
}
# Alice is not allowed to start virtual machines, useful to exclude certain users
# if the default policy is set to allow.
#alice = {
# allow = false
#}
If anyone has any suggestions or needs more information I would appreciate it.
Thanks,
Greg