Trying to use Virtual Box 4 on a Fedora 14 installation receives these errors in succession when starting a virtual machine:
Failed to open a session for the virtual machine [machine name].
The virtual machine ‘[machine name]’ has terminated unexpectedly during startup with exit code 1.
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 ‘/etc/init.d/vboxdrv setup’ as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
This sounds too simple, but it is potentially the solution: Make sure that you are running the latest version of VirtualBox straight from the VirtualBox website and not just the latest version from whatever repositories you’re using. In my case, I was running VirtualBox 4.0.2 which had some issues with my latest Fedora kernel. I had to go to the Virtual Box website and download the RPM for version 4.0.4.
There’s something of a mystery as to why this even works for me since I can’t see that any Virtual Box kernel modules have been installed. Read on for more.
The Long Story:
Trying to get a Windows 7 VM running on Fedora, I launched Virtual Box and made a new virtual machine. When starting it, I received the errors above. I took the advise of the second error dialog box and installed the Dynamic Kernel Module Support Framework (dkms-184.108.40.206-1.fc12). Supposedly, the kernel module needed for Virtual Box to work will need to be recompiled after every kernel update. DKMS helps that. Being a Linux noob, I learned about DKMS for the first time through this. I rebooted thinking that would force the rebuild (based on something I read), but that was not the case.
I checked for the existence of the Virtual Box KMOD. lsmod did not show anything that matched *vb* which worried me. Just to make sure, cat /proc/modules | grep *vbox* was also empty. Trying to build the kernel module with vbox_build_module received the dreaded “command not found” error. Many, many different suggestions are made about this error online and different ones work for different situations. Reading on some forums, it appeared that some have had this issue and had to make sure they had the latest version of virtualbox to be compatible with the latest kernel. I was running 4.0.2 and 4.0.4 was out. I uninstalled and then installed the latest version. Voilà! I could launch a VM.
However, I probed a bit more and found something puzzling. I checked the installed kernel modules but found none relating to Virtual Box. vbox_build_module was still not found when run as root in the terminal. No idea yet why this all worked for me in spite of no visible kernel modules. Nonetheless, my ultimate solution was to go directly to Virtual Box’s site and get the latest package for my OS. Don’t rely on your repository to have the latest and greatest version.