Firstly, you need to create/edit the file /etc/default/virtualbox and add a few variables.
VBOXAUTOSTART_DB which contains an absolute path to the autostart database directory and
VBOXAUTOSTART_CONFIG which contains the location of the autostart config settings. The file should look similar to this:
# virtualbox defaults file
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
Now we need to create the /etc/vbox/autostart.cfg file and add..
# Default policy is to deny starting a VM, the other option is "allow".
default_policy = allow
# Create an entry for each user allowed to run autostart
root ={
allow = true
startup_delay = 1
}
Set permissions on directory to the vboxuser group and make sure users can write to the directory as well as sticky bit.
VBOXAUTOSTART_DB which contains an absolute path to the autostart database directory and
VBOXAUTOSTART_CONFIG which contains the location of the autostart config settings. The file should look similar to this:
# virtualbox defaults file
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
Now we need to create the /etc/vbox/autostart.cfg file and add..
# Default policy is to deny starting a VM, the other option is "allow".
default_policy = allow
# Create an entry for each user allowed to run autostart
root ={
allow = true
startup_delay = 1
}
Set permissions on directory to the vboxuser group and make sure users can write to the directory as well as sticky bit.
root@home:~ sudo chgrp vboxusers /etc/vbox
root@home:~ sudo chmod 1775/etc/vbox
root@home:~ sudo usermod -a -G vboxusers vbox
MAKE SURE YOU ARE LOGGED IN AS ROOT - SUDO IS NOT GOOD ENOUGH! or do sudo -s
root@home:~ VBoxManage setproperty autostartdbpath /etc/vbox
root@home:~ VBoxManage modifyvm windows7 --autostart-enabled on
root@home:~ touch /etc/vbox/root.start
root@home:~ chmod 755 /etc/vbox/root.start
root@home:~ chmod 777 /etc/vbox/root.start
root@home:~ nano /etc/rc.local and add the lines
/etc/init.d/vboxdrv start
/etc/init.d/vboxautostart-service start
place these BEFORE the "exit 0"
reboot and you should be set to go!
Good Luck!
root@home:~ sudo chmod 1775/etc/vbox
root@home:~ sudo usermod -a -G vboxusers vbox
MAKE SURE YOU ARE LOGGED IN AS ROOT - SUDO IS NOT GOOD ENOUGH! or do sudo -s
root@home:~ VBoxManage setproperty autostartdbpath /etc/vbox
root@home:~ VBoxManage modifyvm windows7 --autostart-enabled on
root@home:~ touch /etc/vbox/root.start
root@home:~ chmod 755 /etc/vbox/root.start
root@home:~ chmod 777 /etc/vbox/root.start
root@home:~ nano /etc/rc.local and add the lines
/etc/init.d/vboxdrv start
/etc/init.d/vboxautostart-service start
place these BEFORE the "exit 0"
reboot and you should be set to go!
Good Luck!
No comments:
Post a Comment