Virtualbox module won't load at startup

Hello,

I’m running 13.1 with the package Virtualbox
installed, I’m sure my system did a kernel update
and now when my system starts up it reads
FAILED: failed to start virtualbox additions Linux module.
and systemctl message about the module as well,
I’m needing help to try to fix, this I tried some steps
I found through google and forum search, but I have
not yet fixed the problem.

sudo /etc/init.d/vboxdrv setup
Recompiling VirtualBox kernel module, NOT. It has been packaged.                                done

Googling your error, it confirmed my suspicion…
It’s likely you updated your kernel recently but your vbox additions weren’t updated automatically.
Updating your vbox additions depends on where you installed your vbox…
If you installed from the openSUSE repos, I haven’t personally tried but would expect that updating your system should pull down the revised additions

zypper update

Which then might require re-installing in your Guests if you don’t have DKMS installed as well.

If you installed your VBox from the Oracle site, you probably would need to do the same thing (Update VBox and if you don’t have DKMS installed, manually update each Guest).

Any additional questions, post again…

TSU

What kernel update? There was none recently.
Did you add an extra repo with newer kernels?
The openSUSE virtualbox packages only work with the kernel version they are built against, as they contain the kernel modules in pre-compiled form.

Please post your repo list:

zypper lr -d

And it’s normal that the virtualbox guest additions fail to load on your host. As the name implies, they are only to be used in the guest.
If you install from a LiveCD, they get installed as well though. Just remove the package “virtualbox-guest-kmp-xxx” (with xxx being desktop or default) to get rid of that message.

$ sudo /etc/init.d/vboxdrv setup
root's password:
Stopping VirtualBox kernel modules                                                              done
Removing old VirtualBox pci kernel module                                                       done
Removing old VirtualBox netadp kernel module                                                    done
Removing old VirtualBox netflt kernel module                                                    done
Removing old VirtualBox kernel module                                                           done
Recompiling VirtualBox kernel modules                                                           done
Starting VirtualBox kernel modules                                                              done

 

what i did was go to oracles website and downloaded the package again
and it installed with YaST, then I ran the command, and it works now,
so sometimes all it takes is a reinstall of a package it seems to make
sure everything works right.

Curious, not sure how a repo might cause a kernel update?

I had considered various other possibilities, eg

  • Hasn’t booted up in awhile
  • Manually installing or changing the kernel

But in any case, I think everyone agrees that the installed kernel is mismatched to the vbox additions.
Is why I recommended updating the entire system to acquire all latest files which should make file versions consistent again, and I expect should resolve the issue regardless how the kernel and packages inconsistency happened.
Then, if DKMS is not installed (which would auto update the additions), then the Guests would have to be updated individually.

TSU

Cool.
A very reasonable approach.

TSU

But apparently you had the openSUSE packages installed before.
Did you remove them?

Having both installed will give you problems again sooner or later.

And when using the Oracle package you have to run “/etc/init.d/vboxdrv setup” after every kernel update.

Of course, if you add a repo that contains newer kernels than the one shipped in the distribution.
Like Kernel:stable e.g.

Btw, the openSUSE packages are available for Kernel:stable as well.

I had considered various other possibilities, eg

  • Hasn’t booted up in awhile
  • Manually installing or changing the kernel

But in any case, I think everyone agrees that the installed kernel is mismatched to the vbox additions.

The problem here was about the host kernel module. As I said, it’s normal that the guest additions fail to load on the host.

But of course if you installed openSUSE as guest and install a non-standard kernel in that guest, you have the same problem with the guest kernel module there.

DKMS is a good way to automatically rebuild the kernel modules whenever the kernel is updated though, if you use Oracle’s package.
Without DKMS you have to run “/etc/init.d/vboxdrv setup” after every kernel update in that case as written above.

But apparently you had the openSUSE packages installed before.
Did you remove them?

Yes, I had the packages intalled by zypper, and i removed
them, then went to oracle and downloaded the one they
had and got some errors, so I uninstalled it, then I went ahead and reinstalled
the repository virtualbox

 sudo zypper in virtualbox

and then logged out of PC then back-in and everything seems to
be working correctly at the moment.

I think you misunderstood what wolfi posted…

Definitions:
repository - a location where many packages are stored. Is described typically as a name mapped to the location.
package - A built collection of files for a single specific use, typically a single application or library.

So, what you’re downloading from Oracle is a package, not a repository.
When wolfi suggested you might have installed from repository, he means that the <location> where you downloaded your packages from, which typically would be the repositories associated with openSUSE and are managed by openSUSE.

What you described was downloading a single package from the Oracle website, so you didn’t configure a repository.

Wolfi asked for clarification because it’s important for your application source to be consistent… You want to update and upgrade using the same source where you installed your packages. For instance it would be very bad to install Vbox from Oracle, then attempted to also install from the openSUSE repositories.

HTH,
TSU