First off - the virtualbox install by apt DOES NOT install the vboxautostart service. There is a post online where somebody gives you a script to add the missing services, I tried that - it does add the service but then they seem to fail at load.
Next, I tried just installing the deb from Ubuntu 22 off the VirtualBox website but that caused problems booting the guest with something about a key missing. I found a few hints on that around but basically it all revolved around virtualbox not being installed correctly - I removed it and reinstalled it, remade the guest OS - all no good, it doesn't work.
FINALLY I found this guys post [sorry, I can't post links yet so just google linuxcapable virtualbox mint 21] where he shows you how to install it with the gpg. It seemingly installs everything, everything seems to work as it should (at least, no errors on startup by vboxautostart) excepttt.....the vm doesn't turn on. SO! Either I'm doing something wrong or I have no idea, I see no errors in the log now so I'm hoping somebody can help me out.
I did all this
Code: Select all
1. Create a virtualbox configuration file.
sudo nano /etc/default/virtualbox
2. Add the following entries
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
3. Provide Access to your user in the autostart configuration.
sudo nano /etc/vbox/autostart.cfg
default_policy = deny
mydude = {
allow = true
}
4. Ensure correct access is present
sudo chgrp vboxusers /etc/vbox
sudo chmod 1775 /etc/vbox
sudo usermod -aG vboxusers mydude
5. Set the virtualbox VM properties
VBoxManage setproperty autostartdbpath /etc/vbox
VBoxManage modifyvm Win --autostart-enabled on
6. Restart virtualbox auto start service
sudo service vboxautostart-service restart
Code: Select all
$ cat /etc/default/virtualbox
sleep 10
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg
Code: Select all
$ ls -al /etc/vbox
total 24
drwxrwxr-t 2 root vboxusers 4096 Aug 5 23:46 .
drwxr-xr-x 150 root root 12288 Aug 5 23:32 ..
-rw-r--r-- 1 root root 51 Aug 5 23:46 autostart.cfg
-rw------- 1 mydude mydude 1 Aug 5 23:32 mydude.start
syslog
Code: Select all
Aug 6 00:26:55 PlexServer vboxautostart-service.sh[1054]: vboxautostart-service.sh: Starting VirtualBox VMs configured for autostart.
Aug 6 00:26:55 PlexServer systemd[1]: Started vboxballoonctrl-service.service.
Aug 6 00:26:55 PlexServer vboxautostart-service.sh: Starting VirtualBox VMs configured for autostart.
Aug 6 00:26:55 PlexServer systemd[1]: Started vboxautostart-service.service.
Code: Select all
$ systemctl status vboxautostart-service
● vboxautostart-service.service
Loaded: loaded (/usr/lib/virtualbox/vboxautostart-service.sh; enabled; vendor preset: enabled)
Active: active (exited) since Sat 2022-08-06 00:26:55 EDT; 8min ago
Process: 1054 ExecStart=/usr/lib/virtualbox/vboxautostart-service.sh start (code=exited, status=0/SUCCESS)
CPU: 32ms
Aug 06 00:26:45 PlexServer systemd[1]: Starting vboxautostart-service.service...
Aug 06 00:26:55 PlexServer vboxautostart-service.sh[1054]: vboxautostart-service.sh: Starting VirtualBox VMs configured for autostart.
Aug 06 00:26:55 PlexServer vboxautostart-service.sh[1245]: Starting VirtualBox VMs configured for autostart.
Aug 06 00:26:55 PlexServer systemd[1]: Started vboxautostart-service.service.
Code: Select all
$ dmesg | grep "vbox"
[ 38.251737] vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
[ 38.256810] vboxdrv: Found 4 processor cores
[ 38.280350] vboxdrv: TSC mode is Invariant, tentative frequency 2594103728 Hz
[ 38.280367] vboxdrv: Successfully loaded version 6.1.36 r152435 (interface 0x00320000)
Code: Select all
$ VBoxAutostart --start --config /etc/vbox/autostart.cfg
Oracle VM VirtualBox Autostart 6.1.36
(C) 2022 Oracle Corporation
All rights reserved.
00:00:00.008691 main VirtualBox Autostart 6.1.36 r152435 linux.amd64 (Jul 19 2022 22:20:57) release log
00:00:00.008695 main Log opened 2022-08-06T04:39:13.325818000Z
00:00:00.008696 main Build Type: release
00:00:00.008700 main OS Product: Linux
00:00:00.008701 main OS Release: 5.15.0-43-generic
00:00:00.008702 main OS Version: #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022
00:00:00.008781 main DMI Product Name: 23595JU
00:00:00.008803 main DMI Product Version: ThinkPad T530
00:00:00.008824 main Firmware type: BIOS
00:00:00.008884 main Host RAM: 11671MB (11.3GB) total, 11210MB (10.9GB) available
00:00:00.008887 main Executable: /usr/lib/virtualbox/VBoxAutostart
00:00:00.008888 main Process ID: 1689
00:00:00.008888 main Package type: LINUX_64BITS_UBUNTU_22_04
00:00:00.096126 main IPC socket path: /tmp/.vbox-mydude-ipc/ipcd