Solved: kernel modules cannot be built

Discussions related to using VirtualBox on Linux hosts.
Post Reply
arnozorro
Posts: 15
Joined: 8. Sep 2017, 18:11

Solved: kernel modules cannot be built

Post by arnozorro »

Host: opensuse 15.2

When starting a newly constructed VM '/sbin/vboxconfig is requested. This resulted in the following code:

--------------------------------

Code: Select all

am-linux:/ # /sbin/vboxconfig
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /usr/lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /usr/lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /usr/lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /usr/lib/systemd/system/vboxweb-service.service.
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
am-linux:/
The log in /var/log/vbox-setup.log is included as attachment. As this overtaxes me I would be grateful for a comment.

A. Mehl
Attachments
vbox-setup.log
(26.39 KiB) Downloaded 84 times
Last edited by arnozorro on 24. Jul 2020, 12:41, edited 1 time in total.
arnozorro
Posts: 15
Joined: 8. Sep 2017, 18:11

Re: kernel modules cannot be built

Post by arnozorro »

arnozorro wrote:Host: opensuse 15.2
I forgot the guest: windows 10 home prof.

A. Mehl
arnozorro
Posts: 15
Joined: 8. Sep 2017, 18:11

Re: kernel modules cannot be built

Post by arnozorro »

And still another addendum:

When trying to start the VM the following message came:

Code: Select all

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
A. Mehl
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: kernel modules cannot be built

Post by fth0 »

The error messages in vbox-setup.log indicate that the VirtualBox version cannot be used with the Linux kernel of openSUSE 15.2 (mismatch in expected kernel structures). Which VirtualBox version are you trying to use, and where exactly did you get it from?

Looking at Download VirtualBox for Linux Hosts, it is quite possible that VirtualBox 6.1.12 for openSUSE 15.0 (Linux kernel 4.12) cannot be used on openSUSE 15.2 (Linux kernel 5.3). Maybe you should try the All distributions version.

Additionally, you could search the VirtualBox Bugtracker and create a new ticket if necessary.
multiOS
Volunteer
Posts: 825
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: kernel modules cannot be built

Post by multiOS »

Not sure that it's a compatibility issue, but a possibility. However, openSUSE has a long standing guide on dealing with this error message at the bottom of this 'page': https://en.opensuse.org/VirtualBox

The the general procedure is also covered in the VirtualBox User Guide - Section 2.3.2 , including a reference to actions possibly needed in openSUSE, but obviously can't cover specific command line instructions for every Linux variant.
arnozorro
Posts: 15
Joined: 8. Sep 2017, 18:11

Re: Solved: kernel modules cannot be built

Post by arnozorro »

I would like to thank for all replies. Due to this help the problem has been solved.

A. Mehl
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Solved: kernel modules cannot be built

Post by fth0 »

arnozorro wrote:Due to this help the problem has been solved.
Well, it would be nice if you told us (and future readers) which of the different suggestions was crucial. ;)
arnozorro
Posts: 15
Joined: 8. Sep 2017, 18:11

Re: Solved: kernel modules cannot be built

Post by arnozorro »

The problem was solved by deinstalling VB and installing it anew, this time not from Oracle, but from opensuse.

A. Mehl
multiOS
Volunteer
Posts: 825
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Solved: kernel modules cannot be built

Post by multiOS »

That course of action probably also drew in the additional Linux 'dependencies' mentioned in their troubleshooting guide, which enable new kernel versions to be built. I'm not absolutely certain, but openSUSE seems to use unaltered VirtualBox installers unlike some other distributions, which offer their own 'forked' versions and which may include unknown changes to the opensource code tailored to their own needs.

Glad you got it working.
jcdole
Posts: 95
Joined: 3. May 2013, 18:25
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: WIN 7, WIN 10
Location: South west of france

Re: Solved: kernel modules cannot be built

Post by jcdole »

For opensuse people which want to run oracle virtualbox stuff on leap 15.2 there is a workaround :
For the full story read : https://www.virtualbox.org/ticket/19724
Thanks to ichamel for the complete indication that helps me

The short story:
Patch : https://paste.opensuse.org/30651673
my install script : https://paste.opensuse.org/53405695
Run that script after a clean install of virtualbox with dependencies and recommended packages installed.
Run as normal user. root password is asked for issuing sudo.
Post Reply