/ openSUSE

Virtualbox on OpenSUSE 13.1: vboxdrv troubles and troubleshooting

I installed Virtualbox on my openSUSE 13.1 system using the following command

sudo zypper in virtualbox

I created a Windows 7 VM. Everything worked. I updated the system later and found Virtualbox reluctant to start. It simply said

Kernel driver not installed (rc=-1908)”

AND

WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (3.5.0-18-generic) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup You will not be able to start VMs until this problem is fixed.

The kernel was definitely updated and the Dynamic Kernel Module Support (DKMS) did not work. If it had I would not have seen the above errors. I tried running

sudo /etc/init.d/vboxdrv setup

This failed. I understood from the logs that there was no make module installed on my system. I read further and understood that I was missing quite a lot of packages essential for compiling the driver. I did the following:

sudo  zypper install make gcc  gcc-c++ kernel-source kernel-syms

The log had mentioned about the KERN_DIR parameter(kernel directory) being indeterminate. This meant I needed the kernel-source package. kernel-syms(kernel symbols version) package is needed for the following reason:

Kernel symbols such as functions and variables have version informationattached. This package contains the symbol versions for the standard kernels.Installing this package before compiling kernel modules outside of thekernel source tree adds symbol version information in these modules.Modules without symbol version information can only be loaded onexactly the kernel version for which they were compiled. Modules withsymbol version information can also be loaded into more recent kernelsas long as none of the symbols exported by the kernel changes. (Thisprovides a reasonable level of confidence but does not guarantee that**the module will still work.)

Once this was done, I executed

sudo /etc/init.d/vboxdrv setup

Virualbox has no starting troubles now.