"path to the autostart database is not set" error

Discussions related to using VirtualBox on Linux hosts.
Post Reply
DWolfman
Posts: 6
Joined: 11. Nov 2009, 07:36
Primary OS: Fedora 16
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2

"path to the autostart database is not set" error

Post by DWolfman »

Trying to set up in VirtualBox 4.2.0 (not the betas or the RC versions) the autostart settings per what little information the user guide has on it, and I can't get it to work. Hopefully it's just me doing something wrong, but there's not much to go by in the guide....

I set up the /etc/default/virtualbox file per the guide. Pointed the DB variable to /etc/vbox, set the permissions on that directory to the group vboxusers with full write access for that group and set the sticky bit on. Set the config file variable to /etc/vboxauto.conf. Even rebooted to make sure it all was picked up. Running vboxmanage as user "admin", who is a member of vboxusers, I get the following output:

Code: Select all

[admin@lserver ~]$ vboxmanage modifyvm WinServer --autostart-enabled on --autostart-delay 30 --autostop-type acpishutdown
VBoxManage: error: The path to the autostart database is not set
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMSETTER(AutostartEnabled)(ValueUnion.f)" at line 2418 of file VBoxManageModifyVM.cpp
So, anyone have any ideas here? I had to take some guesses on the commandline, based on some of what I saw in the beta forum, since there is NO mention of this option for modifyvm outside of one page where it lists what you get when just typing "vboxmanage" by itself on the command line.

The host is a Fedora 17 box, Virtualbox version 4.2.0 build 80737. Here's the output of cat on the two files:

Code: Select all

[admin@lserver ~]$ cat /etc/default/virtualbox 
# virtualbox defaults file
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vboxauto.conf

[admin@lserver ~]$ cat /etc/vboxauto.conf 
# Default policy is to deny starting a VM, the other option is "allow".
default_policy = deny

admin = {
    allow = true
}
And the permissions on the folder:

Code: Select all

[admin@lserver ~]$ ls -l /etc | grep vbox
drwxrwxr-t    2 root vboxusers   4096 Sep 13 04:14 vbox
t.bubeck@reinform.de
Posts: 2
Joined: 30. Apr 2009, 18:03
Primary OS: Fedora 10
VBox Version: OSE Fedora
Guest OSses: Fedora 5-11. Windows XP

Re: "path to the autostart database is not set" error

Post by t.bubeck@reinform.de »

Maybe you forgot to follow this from chapter 9.24.1?
Every user who wants to enable autostart for individual machines has to set the path to the autostart database directory with
VBoxManage setproperty autostartdbpath <Autostart directory>
I successfully used the autostart feature on Fedora 17, so you must miss some setting. It basically works.
DWolfman
Posts: 6
Joined: 11. Nov 2009, 07:36
Primary OS: Fedora 16
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2

Re: "path to the autostart database is not set" error

Post by DWolfman »

Hmm, guess I didn't read the whole section when I tried this. Thanks for pointing that out, as I had not read that last part at all.

I'll be glad when this is completed and added to the GUI. Would have been harder for me to mess it up, then. ;-)

And an FYI, in the documentation for the software where I work, they mark things like that with an "IMPORTANT:" header to get people's attention. I'd be tempted to say that one needs it. ;-)
DWolfman
Posts: 6
Joined: 11. Nov 2009, 07:36
Primary OS: Fedora 16
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2

Re: "path to the autostart database is not set" error

Post by DWolfman »

It also looks like this autostart functionality needs more work....

Just noticed it is not always starting the VM on system start. Thought it might have been the 30 second delay I had on it, so changed that to 0. Still it's not starting up.

If I manually stop and start the autostart service, it does start up, though.

However, stopping the service does not stop the VM. As a test, I had my Windows Server 2008 R2 VM running from starting the autostart service, then told Fedora to shut down. The system went down about as fast as it normally did, when no VMs are running! Booted back up, and started the VM, where Windows complained about not being shut down properly. I had it set to use acpishutdown as the autostop type, but it's not seeming to observe that. Appears to be dumping the VM process without telling it to shutdown and wait for it.

Looks like I'll still be using my old vboxcontrol init.d script, which does handle both startup and shutdown properly, every time.
nadrimajstor
Posts: 1
Joined: 27. Sep 2012, 21:15

Re: "path to the autostart database is not set" error

Post by nadrimajstor »

Stopping autostart service won't shutdown vms because almost all code lines in stop function are commented out. I wish I could know why. :?

However, vboxdrv service have function stop_vms() which is called before stopping virtualbox's kernel modules. This is from vboxdrv service script:

Code: Select all

# enter the following variables in /etc/default/virtualbox:
#   SHUTDOWN_USERS="foo bar"  
#     check for running VMs of user foo and user bar
#   SHUTDOWN=poweroff
#   SHUTDOWN=acpibutton
#   SHUTDOWN=savestate
#     select one of these shutdown methods for running VMs
Mike S
Posts: 1
Joined: 26. Feb 2015, 00:24

Re: "path to the autostart database is not set" error

Post by Mike S »

After struggling with this for ages, I found an article ( lifeofageekadmin dot com how-to-set-your-virtualbox-vm-to-automatically-startup ) which says that the following is needed

VBoxManage setproperty autostartdbpath /etc/vbox

I did this, and it worked. Thanks to the author of that article, and I hope this helps others.
Post Reply