Problem Statement:
#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. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
#2
Failed to open a session for the virtual machine “Windows XP”.
The virtual machine ‘Windows XP’ has terminated unexpectedly during startup with exit code 1.
(Running a virtual machine on VirtualBox the two dialogues would say that)
The cause — as the VirtualBox page states it:
Ubuntu/Debian users might want to install the dkms package to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade.
The Fix:
The dkms package can be installed through the Synaptic Package manager or through the following command:
sudo apt-get install dkms
Running `virtualbox` in the terminal says almost the same thing…
$ virtualbox 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.
# You have heard the man! $ sudo /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules [ OK ] * Uninstalling old VirtualBox DKMS kernel modules [ OK ] * Trying to register the VirtualBox kernel modules using DKMS Error! Your kernel headers for kernel 3.5.0-18-generic cannot be found. Please install the linux-headers-3.5.0-18-generic package, or use the --kernelsourcedir option to tell DKMS where it's located * Failed, trying without DKMS * Recompiling VirtualBox kernel modules * Look at /var/log/vbox-install.log to find out what went wrong
# Downloading the Linux Headers now # sudo apt-get install linux-headers-3.5.0-18-generic $ sudo apt-get install linux-headers-`uname -r`
# Running it again $ sudo /etc/init.d/vboxdrv setup * Stopping VirtualBox kernel modules [ OK ] * Uninstalling old VirtualBox DKMS kernel modules [ OK ] * Trying to register the VirtualBox kernel modules using DKMS [ OK ] * Starting VirtualBox kernel modules [ OK ]
All good!


Thank you so much! When entered correctly, unfortunately needing to use sudo, it works. In five minutes you have solved the problem that 100 other google results couldn’t. Live long and prosper.
Absolutely. That’s the “catch”.
The dialogue doesn’t show “sudo” & a regular user wouldn’t have permissions to do that. I am happy that it helped you.
not working bro… plz help
sudo: /etc/init.d/vboxdrv: command not found
Are you not using Ubuntu?
Try a couple of things for me.
Instead of sudo, go to su directly. And then try to follow the steps mentioned (without sudo)
If that doesn’t work, try to uninstall virtualbox and install it back. Try to build the module now.
Otherwise check as root if this /etc/rc.d/vboxdrv exists. Use it instead.
I downloaded the .deb directly from virtualbox website, instead of from the software channel.
i’ll try..i’m using ubuntu…12.10… now feeling very bad about 12.10…very hard to handle..12.04LTS was working fine & smoothly..even hard to handle touchpad..tried changing settings .but didnt..anyway i’ll try …thank you
I know. My thoughts exactly. Let me know if you could sort this out. Did you install a fresh copy of Virtualbox for the website?
Same problem here with 12.10. Have DKMS installed and header files but there is no vboxdrv file in init.d.
sudo find / | grep vboxdrv
/usr/src/virtualbox-4.1.18/vboxdrv
/usr/src/virtualbox-4.1.18/vboxdrv/include
/usr/src/virtualbox-4.1.18/vboxdrv/version-generated.h
/usr/src/virtualbox-4.1.18/vboxdrv/SUPDrv.c
/usr/src/virtualbox-4.1.18/vboxdrv/do_Module.symvers
/usr/src/virtualbox-4.1.18/vboxdrv/math
/usr/src/virtualbox-4.1.18/vboxdrv/linux
/usr/src/virtualbox-4.1.18/vboxdrv/linux/SUPDrv-linux.c
/usr/src/virtualbox-4.1.18/vboxdrv/common
/usr/src/virtualbox-4.1.18/vboxdrv/SUPDrvIDC.h
/usr/src/virtualbox-4.1.18/vboxdrv/SUPDrvInternal.h
/usr/src/virtualbox-4.1.18/vboxdrv/Makefile
/usr/src/virtualbox-4.1.18/vboxdrv/SUPDrvIOC.h
/usr/src/virtualbox-4.1.18/vboxdrv/VBox
/usr/src/virtualbox-4.1.18/vboxdrv/product-generated.h
/usr/src/virtualbox-4.1.18/vboxdrv/SUPDrvSem.c
/usr/src/virtualbox-4.1.18/vboxdrv/r0drv
/usr/src/virtualbox-4.1.18/vboxdrv/generic
There is a virtualbox file in init.d but no setup command for it.
Oh if that’s the case then what does the dialogue box tell you? Does it still say vboxdrv in “init.d“?
I scanned the forums and found out that relying on software release channel is not a good idea. So, go ahead and download that latest version of Virtualbox from the website. I did that too. Currently, I am running RC2 for 4.2!
Also, I think “sudo find / -name vboxdrv” would be a more efficient way to find files. What say?
Hi @All
[b]sudo apt-get purge virtualbox-dkms
sudo apt-get update
sudo apt-get install virtualbox-dkms
[/b]
Works fine for me (without rebooting)
@ John Doe
Thanks! Solved my problem!
This is the only solution that worked for me. Thank you !!!
Thank you so much! Helped me after a couple of hours of headache!
That’s great! 🙂
Thanks it worked 😀
🙂
shit
i doesn’t work with me
Good that it finally worked for you.
finally i installed virtual box in ubuntu 12.10
1-uname -r
take the result and put it in the blow commend instead of uname -r
sudo apt-get install linux-headers-`uname -r`
Yeah well done mate 🙂
Finally, is working now…
W00t! W00t!
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get remove virtualbox-dkms
sudo apt-get install virtualbox-dkms
Thanks Dann.
This is more Generic (no pun intended)!
I will incorporate this 😀
Cheers!!
Thanks a lot, but why not using sudo apt-get install linux-headers-generic
Greets Tom
🙂 yes whatever works!
same problem with Virtual Box in RHEL 6.. any solutions
I understand sudo apt-get wouldn’t work!
Go to the package manager and install the kernel headers. Then try to run VirtualBox from a shell. 🙂
hola yo les voy a contar mi experiencia
Primero yo note que terminado de instalar ubuntu 12.10 quita o des-habilita las
kernel headers.
Así que las instale desde el centro de sofwere de ubunto ( los chistos es que al reiniciar me deshabilitaba todos los dispositovos de red entonces antes que reiniciara corria los siguientes comandos desde una terminal.
Abre una terminal
sudo
apt-get update
apt-get install gnome-system-tools
Busca Usuarios y grupos —- Ajustes avanzados —- Privilegios del usuario
Marca la casilla donde dice:
Usar la solución de virtualizacion de VirtualBox
hay tambien puedes habilitar los dispositovos de red audio y video q se deshabilitan cuando instalas las headers kernel
Saludos.
Thank You for the text. I could translate. Thanks for sharing.
Thanks alot Nikunj
🙂
Many, many thanks!
Worked like a charm on Ubuntu 14.04, following your commands to the letter.
Was having a miserable time until then.
Glad to hear that Greg. Tx