Hi,
I recently installed Virtualbox (6.1) and it asked me to run vboxconfig. I ran as root and it completed successfully and I could start and use my Virtual Machine. However, everytime I reboot I am required to re-run vboxconfig as root before I can start my virtual machine. I am trying to autostart my virtualpc on reboot but can’t get past the vboxconfig problem.
I just today upgraded to Leap 15.4 from 15.3 and still get the same issue.
any help appreciated
Regards
John
larryr
July 13, 2022, 2:46pm
#2
How did you install it. Without more info we cannot help you.
Please show the following :
sudo zypper se -si virtual
and
sudo zypper lr
it should look something like this
llrainey@LLR1:~> zypper se -si virtual
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+------------------------+---------+--------------------------------------+--------+-----------------------
i+ | virtualbox | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-Oss
i+ | virtualbox-kmp-default | package | 6.1.32_k5.14.21_150400.22-lp154.1.67 | x86_64 | openSUSE-Leap-15.4-Oss
i | virtualbox-qt | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-Oss
i | virtualbox-websrv | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-Oss
llrainey@LLR1:~> zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.
# | Alias | Name | Enabled | GPG Check | Refresh
---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+--------
1 | Packman | Packman 15.4 Repository | Yes | (r ) Yes | Yes
2 | X11_MATE_Current | MATE openSUSE_Leap_15.4 | No | ---- | ----
3 | adobe | adobe | No | ---- | ----
4 | brave-browser | brave-browser | No | ---- | ----
5 | mozilla | mozilla | No | ---- | ----
6 | os-repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes
7 | os-repo-non-oss | openSUSE-Leap-15.4-Non-Oss | Yes | (r ) Yes | Yes
8 | os-repo-oss | openSUSE-Leap-15.4-Oss | Yes | (r ) Yes | Yes
9 | os-repo-sle-update | Update repository from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes
10 | os-repo-update | openSUSE-Leap-15.4-Update | Yes | (r ) Yes | Yes
11 | os-repo-update-non-oss | Update Repository (Non-Oss) | Yes | (r ) Yes | Yes
12 | os-repo-virtualization | openSUSE-Leap-15.4-Virtualization | No | ---- | ----
13 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No | ---- | ----
14 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes
15 | repo-sle-debug-update | Update repository with debuginfo for updates from SUSE Linux Enterprise 15 | No | ---- | ----
16 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes
17 | skype-stable | Skypeforlinux - stable | No | ---- | ----
18 | teamviewer | TeamViewer - x86_64 | Yes | (r ) Yes | No
llrainey@LLR1:~>
Hi larryr,
I installed it from the Yast interface.
Output of zypper se–si virtualbox
| Name | Type | Version | Arch | Repository
---+------------------------+---------+--------------------------------------+--------+---------------------
i+ | virtualbox | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-1
i+ | virtualbox | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
i+ | virtualbox-guest-x11 | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-1
i+ | virtualbox-guest-x11 | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
i+ | virtualbox-host-source | package | 6.1.32-lp154.1.83 | noarch | openSUSE-Leap-15.4-1
i+ | virtualbox-host-source | package | 6.1.32-lp154.1.83 | noarch | Main Repository
i | virtualbox-kmp-default | package | 6.1.32_k5.14.21_150400.22-lp154.1.67 | x86_64 | openSUSE-Leap-15.4-1
i | virtualbox-kmp-default | package | 6.1.32_k5.14.21_150400.22-lp154.1.67 | x86_64 | Main Repository
i | virtualbox-qt | package | 6.1.32-lp154.1.83 | x86_64 | openSUSE-Leap-15.4-1
i | virtualbox-qt | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
and output of zypper lr
# | Alias | Name | Enabled | GPG Check | Refresh
---+---------------------------------------+---------------------------------------------------------------------------------------------+---------+-----------+--------
1 | Google-Chrome | Google-Chrome | Yes | (r ) Yes | No
2 | ftp.gwdg.de-openSUSE_Leap_$releasever | Packman Repository | Yes | (r ) Yes | Yes
3 | google-chrome | google-chrome | Yes | (r ) Yes | Yes
4 | home_Subsurface-Divelog | Subsurface-Divelog's Home Project (openSUSE_Leap_15.4) | Yes | (r ) Yes | No
5 | http-opensuse-guide.org-03e0aa68 | libdvdcss repository | Yes | (r ) Yes | Yes
6 | lynis | CISOfy Lynis repository | Yes | (r ) Yes | Yes
7 | nordvpn | nordvpn | Yes | (r ) Yes | Yes
8 | openSUSE-Leap-${releasever}-1_2 | openSUSE-Leap-15.4-1 | Yes | (r ) Yes | Yes
9 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No | ---- | ----
10 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes
11 | repo-debug | Debug Repository | No | ---- | ----
12 | repo-debug-non-oss | Debug Repository (Non-OSS) | No | ---- | ----
13 | repo-debug-update | Update Repository (Debug) | No | ---- | ----
14 | repo-debug-update-non-oss | Update Repository (Debug, Non-OSS) | No | ---- | ----
15 | repo-non-oss | Non-OSS Repository | Yes | (r ) Yes | Yes
16 | repo-oss | Main Repository | Yes | (r ) Yes | Yes
17 | repo-sle-debug-update | Update repository with debuginfo for updates from SUSE Linux Enterprise 15 | No | ---- | ----
18 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes
19 | repo-source | Source Repository | No | ---- | ----
20 | repo-source-non-oss | Source Repository (Non-OSS) | No | ---- | ----
21 | repo-update | Main Update Repository | Yes | (r ) Yes | Yes
22 | repo-update-non-oss | Update Repository (Non-Oss) | Yes | (r ) Yes | Yes
23 | snappy | snappy | Yes | (r ) Yes | Yes
24 | teamviewer | TeamViewer - x86_64 | Yes | (r ) Yes | No
25 | zerotier | zerotier | Yes | ( p) Yes | Yes
Many thanks for the help
John
larryr
July 13, 2022, 5:57pm
#4
My take is you have too many installs of virtualbox and they are conflicting and you do not need the guest additions in the host. That is probably why it wants to reinstall as the guest kernel code is overriding the host config.
You also do not need the source since you installed it via yast.
You do want the virtualbox host extensions to allow its features on the host.
Also you still have a repo that should be a no so I recommend deinstalling and reinstalling - it will not remove your virtualbox config or machines.
run these as root or sudo in front of them.
this will turn of repo 8:
zypper mr -d 8
This will remove all of virtualbox kernel code:
zypper rm virtualbox virtualbox-guest-x11 virtualbox-host-source virtualbox-kmp-default virtualbox-qt
make sure all are gone (you had to say yes to the above line
zypper se -si virtualbox
reboot to remove the unwanted kernel parts.
now just install virtualbox (all it needs will come with it)
zypper in virtualbox
yes you have to reboot after the install to put virtualbox in the kernel
add the extension pack before you start virtualbox
(here is my script to install the extension pack - it has to be run as root)
# cat addvbext
echo update VirtualBox
VBOX_VERSION=`/usr/bin/VBoxManage --version | awk -F_ {'print $1'}`
VBOX_EXT_VERSION=`/usr/bin/VBoxManage --version | awk -F_ {'print $1'}`
# echo Virtualbox version installed is $VBOX_VERSION and $VBOX_EXT_VERSION
VBOX_EXT=`echo Oracle_VM_VirtualBox_Extension_Pack-${VBOX_EXT_VERSION}.vbox-extpack`
# echo File is $VBOX_EXT
cd /tmp
/usr/bin/wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/$VBOX_EXT
echo y | /usr/bin/VBoxManage extpack install --replace $VBOX_EXT
rm -f $VBOX_EXT
Please do nor use
zypper lr
to show your Repo List, use
zypper lr -d
or
zypper lr -uP
because this show the important thing, the URL.
Name and Alias can be set by the User and must not point to the right openSUSE Version…
Hi Larryr,
I followed your advice and got this clean install
S | Name | Type | Version | Arch | Repository
---+------------------------+---------+--------------------------------------+--------+----------------
i+ | virtualbox | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
i | virtualbox-kmp-default | package | 6.1.32_k5.14.21_150400.22-lp154.1.67 | x86_64 | Main Repository
i | virtualbox-qt | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
Then I ran your scriptfile successfully.
then I opened virtualbox Manager as user - no problems, but when I tried to start my Machine I got the “Kernel Driver not installed error.” pointing me to ‘/sbin/vboxconfig’ which doesn’t exist. When I try vboxconfig I am told:
venus:~/scriptfiles # vboxconfig
Sources for building host modules are not present,
Use 'sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel' to install them. Quitting ..
I did that and the kernel modules installed correctly. VBox work fine
UNTIL I rebooted
Then it asks again for vboxconfig to be run.
Back to square one.
buttshill:
Hi Larryr,
I followed your advice and got this clean install
S | Name | Type | Version | Arch | Repository
---+------------------------+---------+--------------------------------------+--------+----------------
i+ | virtualbox | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
i | virtualbox-kmp-default | package | 6.1.32_k5.14.21_150400.22-lp154.1.67 | x86_64 | Main Repository
i | virtualbox-qt | package | 6.1.32-lp154.1.83 | x86_64 | Main Repository
Then I ran your scriptfile successfully.
then I opened virtualbox Manager as user - no problems, but when I tried to start my Machine I got the “Kernel Driver not installed error.” pointing me to ‘/sbin/vboxconfig’ which doesn’t exist. When I try vboxconfig I am told:
venus:~/scriptfiles # vboxconfig
Sources for building host modules are not present,
Use 'sudo zypper install virtualbox-host-source kernel-devel kernel-default-devel' to install them. Quitting ..
I did that and the kernel modules installed correctly. VBox work fine
UNTIL I rebooted
Then it asks again for vboxconfig to be run.
Back to square one.
Minor update.
I found by manually running the insmod
venus:/home/john # insmod /lib/modules/5.14.21-150400.22-default/extra/vboxdrv.ko
venus:/home/john # insmod /lib/modules/5.14.21-150400.22-default/extra/vboxnetflt.ko
venus:/home/john # insmod /lib/modules/5.14.21-150400.22-default/extra/vboxnetadp.ko
the Vbox will work again, so it seems as if it is a problem with the modules not reloading on reboot
Hi, no it’s an old PC and doesn’t use secure boot. The modules complie correctly and install fine, but only until a reboot.
larryr
July 13, 2022, 8:32pm
#11
If it is Secure Boot issue - the answer is in this thread starting at post #9 or you can disable secure boot in the BIOS.
https://forums.opensuse.org/showthread.php/566268-VirtualBox-Linux-kernel-driver-not-loaded
The PC is NOT secure boot capable.
larryr
July 14, 2022, 1:44am
#13
What is in your systemd to start virtualbox?
This is what I have:
find /usr/lib/ -name vbox* -print
This is what I have:
# find /usr/lib/ -name vbox* -print
/usr/lib/systemd/system/vboxweb-service.service
/usr/lib/systemd/system/vboxautostart-service.service
/usr/lib/systemd/system/vboxdrv.service
/usr/lib/systemd/system/multi-user.target.wants/vboxautostart-service.service
/usr/lib/systemd/system/multi-user.target.wants/vboxdrv.service
/usr/lib/virtualbox/vboxdrv.sh
/usr/lib/virtualbox/vboxautostart-service.sh
/usr/lib/virtualbox/vboxweb-service.sh
/usr/lib/virtualbox/vboxshell.py
/usr/lib/virtualbox/vboximg-mount
/usr/lib/virtualbox/vboxwebsrv
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vbox_err.ph
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vbox_vmmdev_types.ph
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vboxguest.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vbox_err.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vbox_vmmdev_types.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vboxguest.ph
~ #
[FONT=arial]Maybe it needs to be added to the bootup code. Running mkinitrd will rebuild the boot modules.
mkinitrd
are these running?
L:~ # systemctl status vboxdrv
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; disabled; vendor preset: d>
Active: active (exited) since Thu 2022-06-09 23:13:54 CDT; 1 month 3 days >
Notice: journal has been rotated since unit was started, output may be incomple>
L:~ # systemctl status vboxautostart-service
● vboxautostart-service.service
Loaded: loaded (/usr/lib/virtualbox/vboxautostart-service.sh; disabled; ve>
Active: active (exited) since Thu 2022-06-09 23:13:54 CDT; 1 month 3 days >
Notice: journal has been rotated since unit was started, output may be incomple>
L:~ #
If they are not they need to be enabled
systemctl enable [/FONT][FONT=courier new]vboxautostart-service
systemctl enable [/FONT][FONT=courier new][FONT=courier new]vboxdrv[/FONT] [/FONT]
Reboot, try to start VM and provide full output of “journalctl -b” immediately after that.
larryr:
What is in your systemd to start virtualbox?
This is what I have:
find /usr/lib/ -name vbox* -print
This is what I have:
# find /usr/lib/ -name vbox* -print
/usr/lib/systemd/system/vboxweb-service.service
/usr/lib/systemd/system/vboxautostart-service.service
/usr/lib/systemd/system/vboxdrv.service
/usr/lib/systemd/system/multi-user.target.wants/vboxautostart-service.service
/usr/lib/systemd/system/multi-user.target.wants/vboxdrv.service
/usr/lib/virtualbox/vboxdrv.sh
/usr/lib/virtualbox/vboxautostart-service.sh
/usr/lib/virtualbox/vboxweb-service.sh
/usr/lib/virtualbox/vboxshell.py
/usr/lib/virtualbox/vboximg-mount
/usr/lib/virtualbox/vboxwebsrv
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vbox_err.ph
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vbox_vmmdev_types.ph
/usr/lib/perl5/vendor_perl/5.26.1/i586-linux-thread-multi/linux/vboxguest.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vbox_err.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vbox_vmmdev_types.ph
/usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi/linux/vboxguest.ph
~ #
[FONT=arial]Maybe it needs to be added to the bootup code. Running mkinitrd will rebuild the boot modules.
mkinitrd
are these running?
L:~ # systemctl status vboxdrv
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; disabled; vendor preset: d>
Active: active (exited) since Thu 2022-06-09 23:13:54 CDT; 1 month 3 days >
Notice: journal has been rotated since unit was started, output may be incomple>
L:~ # systemctl status vboxautostart-service
● vboxautostart-service.service
Loaded: loaded (/usr/lib/virtualbox/vboxautostart-service.sh; disabled; ve>
Active: active (exited) since Thu 2022-06-09 23:13:54 CDT; 1 month 3 days >
Notice: journal has been rotated since unit was started, output may be incomple>
L:~ #
If they are not they need to be enabled
systemctl enable [/FONT][FONT=courier new]vboxautostart-service
systemctl enable [/FONT][FONT=courier new][FONT=courier new]vboxdrv[/FONT] [/FONT]
Unfortunately, I am away from my PC now, so I will to wait to do more than simple basics as I am running ssh from my phone. I ran mkinitrd and got lots of message warning.
I then tried the two systemctl status commends and saw the services were Failed(dead).
I tried to run the systemctl enable for both and was told can’t be started as the service is “masked”. Dont know what that means?
I will have to wait to get back in front of my PC to try this. - Many thanks
John
larryr
July 14, 2022, 3:44pm
#17
buttshill:
Unfortunately, I am away from my PC now, so I will to wait to do more than simple basics as I am running ssh from my phone. I ran mkinitrd and got lots of message warning.
I then tried the two systemctl status commends and saw the services were Failed(dead).
I tried to run the systemctl enable for both and was told can’t be started as the service is “masked”. Dont know what that means?
that is the reason why - they are not starting with a reboot. Somewhere in your installs a long time ago some script masked them saying never allow to run. We can undo that.
run the systemctl unmask vboxautostart-service and systemctl unmask vboxdrv then enable them and then start them then status them.
Tried the unmask commands, they ran fine. I then enabled vboxdrv and started it -all ok. The autostart service complains of something on start , but it is too difficult to read. So I have to concede for a few days until I get in front of the PC again. Many thanks for the help.
I manage to log on to my PC with a Laptop, turns out that vboxautostart.sh file was deleted from /usr/lib/virtualbox. I found a copy in a Trash folder and moved it to /usr/lib/virtualbox. I then ran systemctl start vboxautostart and success. I rebooted and was able to start the VM successfully without any problems
In summary.
clean up multiple instances of the virtualbox pacakges
install a single instance.
unmask the vboxdrv and vboxautostart services
enable /start - check status of the two services
if you cant start vboxautostart check if /usr/lib/virtualbox/vboxautostart.sh has been deleted.
Thanks for all the help to get me here.
Next step is to autostart the vm