How to install vboxdrv for kernel-vanilla

How can I install the vboxdrv kernel module for kernel-vanilla (4.4.36, on Leap 42.2)?
When I do

rcvboxdrv setup

I get:

vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

But dmesg doesn’t give any hint concerning vboxdrv.

What are you doing?
Are you trying to install VBox on a 42.2, and if so are you installing using packages from the OSS, another repository or installing by downloading from the Oracle VBox site?

TSU

Yes, I have installed virtualbox from the OSS repo on 42.2 for the default kernle. But unfortunately I’m forced to use the vanilla kernel rather than the default kernel because hibernation does not work with the openSUSE default kernel. I installed the nvidia driver for the vanilla kernel manually but now I don’t know how to properly install the vboxdrv kernel module.

I don’t have the answer for what may be in the default kernel that isn’t in the vanilla kernel, and if it is relevant to what you want to do. Someone investigating might start by diffing the results from the following which returns a list of available built in kernel modules, or boot to the default kernel (It should still be a GRUB option, and then you can modprobe for vboxdrv)

cat /lib/modules/$(uname-r)/modules.builtin

I’d instead recommend that you install using the Oracle VBox binaries instead, which wouldn’t be kernel dependent (or rely on pre-built kernel modules)

Uninstall what you have now, and start over with the latest from VBox at the following page

https://www.virtualbox.org/wiki/Downloads

But, before you do all that…
I’d highly recommend you re-consider your current path.
Hibernating (or going on standby) in your HostOS is <very bad practice> no matter the virtualization technology, it’s well known that can cause unpredictable consequences in your Guests… Sometimes causing file corruption and being irrecoverable.
If you absolutely need to hibernate your HostOS, then it’s highly recommended to script the shutdown of all your Guests before your HostOS itself goes to sleep… If you do this, you should be able to Google scripts others have created for your specified virtualization (Virtualbox).

TSU

Yup, that actually works, thank you! Even though I would have hoped I could install the kernel module somehow.

No fear, I wouldn’t even have thought of that, but thanks for the warning anyway. Actually, I need the virtual machine with my w7 installation about 3-5 times a year (each time about 30 minutes), so everytime I’m done with what I have to do, I hibernate that one separately. But my host OS, I do hibernate that daily, so it’s really a bummer I have to resort to using kernel-vanilla. But at least it works!