Virtualbox errors when opening or creating VM

Asked by Allen Duley

I installed Virtual-box about a week ago on Ubuntu 12.10 and now every time I either try to start a VM or create a new one I get the error listed below. I am in the vboxusers group. I completely uninstalled and re-installed the application without any change in the error. When I run the command below I receive "command not found". Then when I try to install dkms they systems says it is already installed. Right now I have removed the application and any files and would love to re-install the application again to get it working. I remove the application using:

sudo apt-get remove virtualbox* --purge

Any ideas?

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.

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

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu virtualbox Edit question
Assignee:
No assignee Edit question
Solved by:
N1ck 7h0m4d4k15
Solved:
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#1

Open a terminal and run this command

~$ sudo /etc/init.d/vboxdrv setup

Do you have a custom kernel ?

Give the results of this command

~$ lsb_release -rcd ; uname -r

Thanks

Revision history for this message
Allen Duley (allenduley) said :
#2

Thanks for the quick response. Here are the outputs of those two commands.

sudo /etc/init.d/vboxdrv setup
[sudo] password for XXXX:
sudo: /etc/init.d/vboxdrv: command not found
XXXX@alitalinux2:~$ lsb_release -rcd ; uname -r
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
3.5.0-18-generic
allen@alitalinux2:~$

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

Do you have VB installed when you ran the command ?

OK , lets take this from scratch.

Purge VB completely .

~$ sudo apt-get remove --purge virtualbox-*

Then download and install VB . Here is the link: https://www.virtualbox.org/wiki/Linux_Downloads
Version 4.2.4 is the newest. Download the appropriate architecture (32bit or 64bit)click to save the file.

When download finish , open a terminal and do (I assume that downloaded files saved to "Downloads" folder)

~$ cd Downloads
~$ sudo dpkg -i <blahblahblah.deb>
~$ sudo apt-get install -f

Where <blahblahbalh.deb> is the name of the downloaded file . Use [Tab] key to auto-fill.

If you have a problem again , then run the command
~$ sudo /etc/init.d/vboxdrv setup

OR

install linux-source and linux-headers-generic and try again

~$ sudo apt-get install linux-source
~$ sudo apt-get install linux-headers-generic
~$ sudo dpkg -i Downloads/<blahblahblah.deb>

Again: Where <blahblahblah.deb> is the name of virtualbox downloaded .deb file . Use [TAB] key to auto-fill

Thanks

Revision history for this message
Allen Duley (allenduley) said :
#4

Ok I used your link and downloaded the Virtualbox for my environment (64 bit). When I run the second command (DPKG) I get this output.

allen@alitalinux2:~/Downloads$ sudo dpkg -i virtualbox-4.2_4.2.4-81684~Ubuntu~quantal_amd64.deb
Selecting previously unselected package virtualbox-4.2.
(Reading database ... 173938 files and directories currently installed.)
Unpacking virtualbox-4.2 (from virtualbox-4.2_4.2.4-81684~Ubuntu~quantal_amd64.deb) ...
Setting up virtualbox-4.2 (4.2.4-81684~Ubuntu~quantal) ...
Adding group `vboxusers' (GID 125) ...
Done.
 * Stopping VirtualBox kernel modules [ OK ]
 * Recompiling VirtualBox kernel modules
 * Look at /var/log/vbox-install.log to find out what went wrong
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for shared-mime-info ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-central ...
allen@alitalinux2:~/Downloads$ ^C
allen@alitalinux2:~/Downloads$

Here is the output of the log file:

allen@alitalinux2:/var/log$ cat vbox-install.log
Uninstalling modules from DKMS
  removing old DKMS module vboxhost version 4.2.4

------------------------------
Deleting module version: 4.2.4
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/4.2.4/source ->
                 /usr/src/vboxhost-4.2.4

DKMS: add completed.
Failed to install using DKMS, attempting to install without
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Makefile:181: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
allen@alitalinux2:/var/log$

I am not sure I should go further. I will wait for your input.

Revision history for this message
Best N1ck 7h0m4d4k15 (nicktux) said :
#5

Yes , try to install linux-source and linux-headers and try again .

When the installation of linux-source and linux-headers-generic completed , run

~$ sudo /etc/init.d/vboxdrv setup

OR

~$ sudo dpkg -i Downloads/virtualbox-4.2_4.2.4-81684~Ubuntu~quantal_amd64.deb

Thanks

Revision history for this message
Allen Duley (allenduley) said :
#6

Hello,

I ran the last set of commands you suggested in your last update. All Seems to be running as designed. I do have a question, one I am hoping you can answer. I am fairly careful about installations and configurations of my machines as a rule. Is there an explanation why this happened or why I would have to reload the kernel and headers? Anyway, thank you for all of your time and assistance.

Revision history for this message
Allen Duley (allenduley) said :
#7

Thanks NikTh, that solved my question.

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#8

This is not a problem with VB(probably but not for sure)
This probably was a problem due to DKMS or the building modules system in Ubuntu (without DKMS).

I had this problem too , with VB. Asked me for Linux headers when the Linux headers was already installed.

Linux-source installs the "dependencies" for DKMS or Ubuntu's modules building system , and there the problem solved.

Thanks

Revision history for this message
Allen Duley (allenduley) said :
#9

Would this have anything to do with the errors I am getting installing VMware Workstation 8.0.4? Thanks again for all of your help!

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#10

Hmmm , I don't know about VMware. I never used it and don't know its behavior.

Revision history for this message
LAZA (laza74) said :
#11
Revision history for this message
Allen Duley (allenduley) said :
#12

Thank you for the post. Although my issue is resolved and I only had to rebuild the kernel one time. After that I was on the road to happiness. Yet another reason I continue to use Linux over any other O/S, the community is utterly fantastic!