Page 1 of 1

VirtualBox 5, CentOS 7, vboxautostart-service.service failed

Posted: 13. Sep 2016, 20:16
by bluebiscuit
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:

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.
Thanks to Perryg's suggestion I tried adding a startup pause but it did not change anything:

/etc/default/virtualbox

Code: Select all

$ cat /etc/default/virtualbox
sleep 10
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
Other information which might be relevant:

Linux Version

Code: Select all

$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
VirtualBox Version

Code: Select all

$ vboxmanage -version
5.1.4r110228
Autostart database path

Code: Select all

$ VBoxManage list systemproperties | grep "Autostart database path"
Autostart database path:         /etc/vbox/
/etc/vbox/ attributes

Code: Select all

$ ls -ld /etc/vbox/
drwxrwxr-t. 2 root vboxusers 4096 Sep 13 17:25 /etc/vbox/
/etc/vbox/ contents

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
/etc/vbox/autostart.cfg

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

Re: VirtualBox 5, CentOS 7, vboxautostart-service.service failed

Posted: 13. Sep 2016, 23:13
by Perryg
You can test if this is a timing issue by adding a pause statement ( sleep 10 ) to the /etc/default/virtualbox at the top and see if it allows it to proceed.

Re: VirtualBox 5, CentOS 7, vboxautostart-service.service failed

Posted: 14. Sep 2016, 11:25
by bluebiscuit
@Perryg: Thanks for your reply, but I'm afraid I get the same results. I've edited my post to reflect this

Greg

Re: VirtualBox 5, CentOS 7, vboxautostart-service.service failed

Posted: 28. Jan 2017, 22:03
by _des_
Hi,
I have got the same problem like Greg has. Does anyone found a solution for that?

Thank's
Dominik

Re: VirtualBox 5, CentOS 7, vboxautostart-service.service failed

Posted: 9. Mar 2017, 11:27
by PM72
I am having the same problem!

Any pointers?