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 information attached. This package contains the symbol versions for the standard kernels. Installing this package before compiling kernel modules outside of the kernel source tree adds symbol version information in these modules. Modules without symbol version information can only be loaded on exactly the kernel version for which they were compiled. Modules with symbol version information can also be loaded into more recent kernels as long as none of the symbols exported by the kernel changes. (This provides 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.

Advertisements

4 comments


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s