Hey, i saw in the code that there is supposed to be vm settings which control the autostart, to be found in the general tab, but I don't see these settings there.
Currently I have to manually change the setting for each VM with "VBoxManage modifyvm name_of_vm --autostart-enabled on" which results in this section in the vm file <Autostart enabled="true" delay="0" autostop="Disabled"/>
but it would be way more comfortable if this setting would work from the web GUI.
Can the cause be that I got the latest version 5.2 of virtualbox installed?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No. Auto start has worked for a long time. I've had it working for at least 4 years! For it to work in phpvirtualbox, you have to give the vbox user permissions in /etc/vbox/autostart.conf and allow them write access to the folder /etc/vbox/autostart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, I realized I even had var $startStopConfig = true; still uncommented in config.php :/
I also created the dir /etc/vbox/autostart and the file /etc/vbox/autostart.conf because I didn't have them
I also set VBOXAUTOSTARTDB=/etc/vbox VBOXAUTOSTARTCONFIG=/etc/vbox/autostart.conf SHUTDOWNUSERS=vbox SHUTDOWN=savestate in /etc/default/virtualbox and defaultpolicy = allow in /etc/vbox/autostart.conf
not sure if all of that was necessary but autostart works now for me
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Note: Tested with VirtualBox 6.0 and it's working.
These services are not installed by default on the Ubuntu version you are using. However, you can download the official scripts that provide these services.
To do so, simply copy and paste these commands into the terminal and hit the enter. This will download the scripts and add them via update-rc.d to the start up scripts.
cd /etc/init.d/
services=(vboxautostart-service vboxweb-service vboxballoonctrl-service)
base_url="https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Installer/linux"
for service in "${services[@]}"
do
wget "${base_url}/${service}".sh -O "${service}" \
&& chmod +x "$service" \
&& update-rc.d "$service" defaults 90 10
done
About the vboxdrv:
It's not a service, but a module and needs to be loaded. You can run modprobe vboxdrv to load the module, but usually it's automatically loaded during the virtualbox installation.
To check if it's really loaded you can run
modprobe -n --first-time vboxdrv
Or you can use modinfo to verify if the vboxdrv kernel module is loaded:
modinfo vboxdrv
filename: /lib/modules/4.15.0-47-generic/misc/vboxdrv.ko
version: 6.0.4 r128413 (0x00290008)
...
After you are done with all these things, simply reboot.
After the restart, you can run service --status-all | grep vbox to verify that the services are running.
You should see an output similar to this:
[ ? ] vboxautostart-service [ + ] vboxballoonctrl-service [ + ] vboxweb-service
Now, you can also control these services via systemctl, i.e. systemctl status vboxautostart-service.
For more information about the configuration options of each Oracle VM VirtualBox service, see the official manual:
Web Service: page 243 (254/361)
Autostart Service: page 248 (259/361)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, i saw in the code that there is supposed to be vm settings which control the autostart, to be found in the general tab, but I don't see these settings there.
Currently I have to manually change the setting for each VM with "VBoxManage modifyvm name_of_vm --autostart-enabled on" which results in this section in the vm file <Autostart enabled="true" delay="0" autostop="Disabled"/>
but it would be way more comfortable if this setting would work from the web GUI.
Can the cause be that I got the latest version 5.2 of virtualbox installed?
No. Auto start has worked for a long time. I've had it working for at least 4 years! For it to work in phpvirtualbox, you have to give the vbox user permissions in /etc/vbox/autostart.conf and allow them write access to the folder /etc/vbox/autostart
Thanks, I realized I even had var $startStopConfig = true; still uncommented in config.php :/
I also created the dir /etc/vbox/autostart and the file /etc/vbox/autostart.conf because I didn't have them
I also set
VBOXAUTOSTARTDB=/etc/vbox
VBOXAUTOSTARTCONFIG=/etc/vbox/autostart.conf
SHUTDOWNUSERS=vbox
SHUTDOWN=savestate in /etc/default/virtualbox and
defaultpolicy = allow in /etc/vbox/autostart.conf
not sure if all of that was necessary but autostart works now for me
https://askubuntu.com/questions/1131056/virtualbox-web-service-missing-after-clean-installation-on-ubuntu-18-04-1-lts
Note: Tested with VirtualBox 6.0 and it's working.
These services are not installed by default on the Ubuntu version you are using. However, you can download the official scripts that provide these services.
To do so, simply copy and paste these commands into the terminal and hit the enter. This will download the scripts and add them via update-rc.d to the start up scripts.
cd /etc/init.d/
services=(vboxautostart-service vboxweb-service vboxballoonctrl-service)
base_url="https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Installer/linux"
for service in "${services[@]}"
do
wget "${base_url}/${service}".sh -O "${service}" \
&& chmod +x "$service" \
&& update-rc.d "$service" defaults 90 10
done
About the vboxdrv:
It's not a service, but a module and needs to be loaded. You can run modprobe vboxdrv to load the module, but usually it's automatically loaded during the virtualbox installation.
To check if it's really loaded you can run
modprobe -n --first-time vboxdrv
Or you can use modinfo to verify if the vboxdrv kernel module is loaded:
modinfo vboxdrv
filename: /lib/modules/4.15.0-47-generic/misc/vboxdrv.ko
version: 6.0.4 r128413 (0x00290008)
...
After you are done with all these things, simply reboot.
After the restart, you can run service --status-all | grep vbox to verify that the services are running.
You should see an output similar to this:
[ ? ] vboxautostart-service
[ + ] vboxballoonctrl-service
[ + ] vboxweb-service
Now, you can also control these services via systemctl, i.e. systemctl status vboxautostart-service.
For more information about the configuration options of each Oracle VM VirtualBox service, see the official manual:
Web Service: page 243 (254/361)
Autostart Service: page 248 (259/361)