Can't start VirtualBox VM in stock version 4.2.18 on openSUSE 13.1

My steps:

  1. Upgraded from openSUSE 12.3 x86_64 to openSUSE 13.1 x86_64 using the DVD upgrade path.
  2. Removed, then reinstalled VirtualBox 4.2.18 from the official repos (OSS, an now Update), using “sudo zypper install virtualbox-qt”.
  3. Started “VirtualBox”
  4. Created a new VM, pick a live CD (I had existing VMs, but wanted to be sure it wasn’t a problem there)
  5. Started VM

Error message:
Failed to open a session for the virtual machine Ubuntu Live CD.

The virtual machine ‘Ubuntu Live CD’ has terminated unexpectedly during startup with exit code 1.

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Machine
Interface: IMachine {22781af3-1c96-4126-9edf-67a020e0e858}

Kernel driver not installed (rc=-1908)

I do know how to do this manually, but was expected the stock packages to work out of the box.
Obviously, running sudo /etc/init.d/vboxdrv setup gives this:

Recompiling VirtualBox kernel module, NOT. It has been packaged.

These packages are installed:
i | virtualbox | paquet | 4.2.18-2.5.1 | x86_64 | openSUSE-13.1-Update
i | virtualbox-host-kmp-desktop | paquet | 4.2.18_k3.11.6_4-2.5.1 | x86_64 | openSUSE-13.1-Update
i | virtualbox-qt | paquet | 4.2.18-2.5.1 | x86_64 | openSUSE-13.1-Update

uname -a
Linux myhostname 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux

Existing VMs also don’t start.
The same happens with the virtualbox packages from the “Virtualization” community repo, which seem to be the same version.

I investigated my kernels, and for some reason I have two kernels installed: (zypper search -s kernel-desktop)
i | kernel-desktop | paquet | 3.7.10-1.16.1 | x86_64 | (Paquets système)
i | kernel-desktop | paquet | 3.11.6-4.1 | x86_64 | openSUSE-13.1-Oss

The active kernel is 3.7.10 but the module is for 3.11.

I’ll try to uninstall that one and hope it will switch me to the new one.

Now that I analyed the issue I will keep this post in case other people have the same issue.

3.7.10 is the kernel from 12.3. Why are you booting this one?
Select 13.1’s kernel 3.11.6 at the boot menu and VirtualBox will work.
Or uninstall kernel 3.7.10 if you want to. But it shouldn’t be necessary, it should get removed automatically when the first kernel update for 13.1 will arrive.

Yes, just spotted that. It’s weird that I still had that kernel installed.
I had the NVIDIA proprietary drivers from the repo still installed. After the upgrade, I was surprised to still see them work.
Maybe those packages have kept the kernel installed, and it somehow automatically booted it…

I’ve uninstalled it, and now I have:
Linux myhostname 3.11.6-4-desktop #1 SMP PREEMPT Wed Oct 30 18:04:56 UTC 2013 (e6d4a27) x86_64 x86_64 x86_64 GNU/Linux

Virtualbox works again!!

By default two kernels are kept installed. That’s done so that you can switch back to a working kernel easily if there’s a kernel update that gives you problems.
When you upgrade to the next openSUSE version, the latest kernel from the previous version will be kept as well (until the first kernel update of course).
One could argue that on upgrade all old kernels should be deleted, but this isn’t done at the moment (there is a bug report about that).