Once I run it and try to start a VM it gives me an error that /sbin/vboxconfig needs to be run.
This command however I cannot run because some packages are missing. But even after installing them /sbin/vboxconfig fails because:
=== Building 'vboxdrv' module ===
make[1]: Entering directory '/usr/src/kernel-modules/virtualbox/src/vboxdrv'
/usr/src/kernel-modules/virtualbox/src/vboxdrv/Makefile.include.header:141: *** Error: unable to find the headers of the Linux kernel to build against. Specify KERN_VER=<version> (currently 4.15.1-1-default) and run Make again. Stop.
make[1]: Leaving directory '/usr/src/kernel-modules/virtualbox/src/vboxdrv'
make: *** [Makefile:49: all] Error 2
The error is probably due to a mismatch of Kernel versions:
How can I fix this and why is this happening with the official TW repo? Is there a way to prevent this from happening in the future?
And on a technical side note, what does this have to do with the kernel? Why doesn’t this happen on Windows for instance?
To install the development headers of anything, you need to install the “devel” packages.
In your case, you should install the following packages for the default kernel which you are running (Exact versions will be matched automatically)
kernel-devel
kernel-default-devel
Then you should be able to build your kernel modules.
When you install VBox from teh OSS instead of the Oracle download, you shouldn’t need to build these modules, but you may want to add your User to the vboxuers group so you can run VBox as a normal user without elevated permissions.
If you aren’t able to install and run VBox from the OSS, perhaps you didn’t upgrade your TW just before installing VBox?
That shouldn’t be necessary if you install the openSUSE packages though.
These do contain a precompiled kernel module.
And that should be preferred especially on Tumbleweed anyway IMHO, because of the many kernel updates.
IOW, if you install the virtualbox packages from the standard repos, you don’t have to (and shouldn’t) run /sbin/vboxconfig…
If VirtualBox asks you to run it, please post the exact message from VirtualBox.
> And on a technical side note, what does this have to do with the kernel?
> Why doesn’t this happen on Windows for instance?
The networking drivers are implemented as kernel modules. Windows’
kernel is very different architecturally from the Linux kernel.
What I found over the weekend was that if the running kernel and the
installed kernel dev packages don’t match, you’ll have problems
compiling. Make sure you’ve got the right version installed.
Installed Virtualbox via Yast/Softwaremanager (from vendor openSUSE)
Added my user david to vboxusers
rebootet
Started Virtualbox and set up a virtual drive and I get the following error:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/sbin/vboxconfig'
as root.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
I followed the hint in the error message, ran /sbin/vboxconfig which also failed because of missing packages. I copied the packages that were mentioned in the bash error message and ran /sbin/vboxconfig again which failed again - see first post.
No update candidate for 'kernel-devel-4.15.2-1.4.noarch'. The highest available version is already installed.
'kernel-default-devel' is already installed.
No update candidate for 'kernel-default-devel-4.15.2-1.4.x86_64'. The highest available version is already installed.
Resolving package dependencies...
Seems like I cannot find a matching version for kernel-devel and kernel-default?
That shouldn’t cause an error about the vboxdrv kernel module though.
Btw, to use VirtualBox (as user), the user needs to be a member of the group “vboxusers”. Is that the case?
You should get a specific error message if not though, at least that’s how it was in the past.
Likely because openSUSE keeps the latest two kernels installed by default…
Although, it would probably be a good idea to check whether 4.15.2 is actually used, as virtualbox-host-kmp-default is only installed for that one and might not work with the previous one.
again, then reboot. Next use YaST - System - Servicesmanager to start the Virtualbox service. And, indeed make sure your user is a member of the vboxusers group
Thanks for all your help. I don’t know, it works now. I reinstalled it like three times, rebooted, used three zypper dups and now it works.
It must have been the kernel. Maybe when I installed the first time I ran zypper dup after I had installed virtualbox and then at this moment came a new kernel and things got messed up?
So for the future (assuming I have not added any repositories) I should do it this way: