Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have been using VMWare on Windows for a long time. But after a long wait, I moved to VirtualBox on Ubuntu 11.10. I installed Ubuntu, 32 Bit, installed all available updates and installed Virtual Box. When I try to create a new Windows installation inside VirtualBox, I got the following error messages.

VirtualBox - Error

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.
Details

Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Machine
Interface:
IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}

2nd error dialogue

Virtualbox - Error in suplibOsinit
Kernal driver not installed (rc--1908)
Please install the virtualbox-dkmbs package and execute 'modprobe vboxdrv' as root.
  • I have already tried reinstalling VirtualBox.
  • Google result seem to indicate the the problem happens due to Kernel updates.

Is there anyway I can get this working? I need this for malware analysis and if VirtualBox is going to crash on me all the time, then I won't be able to use Ubuntu for work.

Output to dpkg -l | grep virtual

 server
rc  virtualbox                             4.1.2-dfsg-1ubuntu1                    
x86 virtualization solution - base binaries
rc  virtualbox-qt                          4.1.2-dfsg-1ubuntu1                    
x86 virtualization solution - Qt based user interface 
cute 'modprobe vboxdrv' as root.<p>
share|improve this question
    
What is the output to dpkg -l | grep virtual? –  jippie Apr 15 '12 at 8:11
    
What is your version of Virtual Box? Where did you install it from: USC or Oracle repository? Did you try - as suggested - to install virtualbox-dkms package and sudo modprobe vboxdrv? –  Takkat Apr 15 '12 at 8:52
    
As Takkat asked, did you follow the steps on Download VirtualBox for Linux Hosts. Especially the Note: for Ubuntu/Debian users about the dkms package? –  irrational John Apr 15 '12 at 15:01
    
@jippie i have updated the question with the result. it was too big to add as comment. –  Sunil J Apr 16 '12 at 6:03
    
@Takkat I didn't add oracle repository... just did sudo apt-get install virtualbox. i removed it and tried sudo apt-get install virtualbox-dkms with no luck. sudo modprobe vboxdrv says "module vboxdrv not found" –  Sunil J Apr 16 '12 at 6:07

9 Answers 9

up vote 1 down vote accepted

I had the same problem and solved it by

  1. Purging Virtualbox:

    sudo apt-get purge virtualbox virtualbox-dkms virtualbox-ose-qt virtualbox-qt

  2. I then reinstalled;

    sudo apt-get install virtualbox virtualbox-dkms virtualbox-ose virtualbox

    and noticed:

    dependency problems prevent configuration of virtualbox-ose:
    virtualbox-ose depends on virtualbox; however:
    Package virtualbox is not configured yet.
    Package virtualbox-4.0 which provides virtualbox is not installed.
    
  3. so I tried installing virtualbox-4.0;

    sudo apt-get install virtualbox-4.0

    That worked and pulled in the correct VirtualBox DKMS kernel modules.

  4. I then had to download and install the correct version of the extension pack (Oracle_VM_VirtualBox_Extension_Pack-4.0.16-75491.vbox-extpack).

That worked, and I now have a fully functioning Virtualbox instance.

share|improve this answer

Wierdly, for me it worked by closing VirtualBox and then running

sudo modprobe vboxdrv 

from the terminal and then restarting VirtualBox

share|improve this answer
    
they key being to close the VirtualBox GUI first. Thanks @JomanJi! –  LRE Apr 23 at 8:01

Try to uninstall VirtualBox from the command line:

sudo apt-get purge virtualbox virtualbox-dkms virtualbox-ose-qt virtualbox-qt

If it succesfully uninstalled reinstall it:

sudo apt-get install virtualbox virtualbox-dkms virtualbox-ose-qt virtualbox-qt

Carefully check if the command completes succesfully.

share|improve this answer
    
Install also dkms –  gajdipajti Apr 16 '12 at 6:42
    
dkms automatically pulled in as a dependency –  jippie Apr 16 '12 at 6:48
    
Ok, I usually provide dkms also, because I had a strange experience with fedora. But I know, this is ubuntu:) –  gajdipajti Apr 16 '12 at 6:52
    
is this a problem? No suitable module for running kernel found [fail] invoke-rc.d: initscript virtualbox, action "restart" failed. –  Sunil J Apr 16 '12 at 6:57
    
With regard to the initial question, this may very well be related. Kernal driver not installed. Did you do a full patch cycle lately? for a in update upgrade dist-upgrade autoremove; do apt-get -y $a; done –  jippie Apr 16 '12 at 7:05

I had almost the same error:

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.

Then a second window appeared saying I had to run this command:

sudo /etc/init.d/vboxdrv setup

When I Issued that command the following error came out:

$ 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 2.6.38-16-generic-pae cannot be found at
/lib/modules/2.6.38-16-generic-pae/build or /lib/modules/2.6.38-16-generic-pae/source.
Failed, trying without DKMS
Recompiling VirtualBox kernel modules                                                                                    Look at /var/log/vbox-install.log to find out what went wrong

Solution

Install the appropriated linux-headers for your O.S. version. In my case was:

sudo apt-get install linux-headers-2.6.38-16-generic-pae

Ensure all VirtualBox windows are closed.

share|improve this answer

I had this issue but fortunately I solved it not from comand line but from GUI... open your home directory ~/VirtualBox VMs
open your hard disk image file
open name of your virtual machine.vbox

Your virtual box should run normally from here and that should fix your problem( if you had the same issue I had , the problem shown up when I had all data in my VirtualBox.xml in the .VirtualBox directory was gone!!!)

Another suggestion: If the previous one didn't work for you ...
go to .Virtualbox in you home directory
type the following (cp VirtualBox.xml-prev VirtualBox.xml)
I think this should do it for you too...

Good luck...

share|improve this answer

To fix this, run the following, as directed by the prompt:

sudo /etc/init.d/vboxdrv setup

If successful, the result will read * Starting VirtualBox kernel modules [ OK ]

If it fails, the reason should be logged in /var/log/vbox-install.log but it always seems to be because headers for the current (host) kernel are missing: Your kernel headers for kernel 3.5.0-22-generic cannot be found so install them then try again:

sudo apt-get install linux-headers-$(uname -r) ## e.g. 3.5.0-22-generic
sudo /etc/init.d/vboxdrv setup

Note: You will need to do this after every kernel upgrade unless package-maintainers find a solution.

share|improve this answer

I tried this : To fix this, run the following, as directed by the prompt:

sudo /etc/init.d/vboxdrv setup

If successful, the result will read Starting VirtualBox kernel modules [ OK ] and it's OK now

share|improve this answer

Solution :

sudo apt-get install virtualbox-dkms
sudo apt-get install linux-headers-generic
sudo /etc/init.d/virtualbox start
 * Starting VirtualBox kernel modules  

execute virtualbox :

/usr/bin/virtualbox or virtualbox
share|improve this answer

Something that seems to not be covered is kernel source. You need the kernel headers for your current kernel installed or it will fail to build the modules needed, resulting in this error.

share|improve this answer
    
Welcome to askubuntu, could you perhaps include a how-to to help other users that may have this problem? –  etsr Jan 8 '13 at 19:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.