/dev/vboxdrv disappearing

Discussions related to using VirtualBox on Linux hosts.
Post Reply
vberic
Posts: 22
Joined: 27. Nov 2009, 18:00
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: XP SP3

/dev/vboxdrv disappearing

Post by vberic »

Each time I restart Ubuntu and then try to open the VM in VB, it demands that I run '/etc/init.d/vboxdrv setup' again.

I'm running Ubuntu 11.04 on Lenovo X120e.
I've made sure 'eric' is a member of vboxusers group.
I've installed the extension pack.
I've set the BIOS to support the hardware virtualization.
I've installed and run dkms--in fact, VB demands that it be run each time I restart the computer:
eric@x120e:~$ sudo /etc/init.d/vboxdrv setup
[sudo] password for eric:
* 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 ]
eric@x120e:~$
Once I run this, VB will open the VM. But after restarting Ubuntu and restarting VB, I get this error:
Failed to open a session for the virtual machine Windows7.

The virtual machine 'Windows7' has terminated unexpectedly during startup with exit code 1.

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: Machine
Interface: IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}
And this:
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 vboxcrv kernel module if necessary.
Abort
There is no /dev/vboxdrv once I restart Ubuntu, although it is there after I run 'etc/init.d/vboxdrv setup'.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: /dev/vboxdrv disappearing

Post by frank »

You didn't tell us which version of VirtualBox you are using (the package from the Ubuntu repository or the package from www.virtualbox.org).
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: /dev/vboxdrv disappearing

Post by Perryg »

Post the contents of /etc/udev/rules.d/10-vboxdrv.rules
vberic
Posts: 22
Joined: 27. Nov 2009, 18:00
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: XP SP3

Re: /dev/vboxdrv disappearing

Post by vberic »

Downloaded from VirtualBox site:
virtualbox-4.1_4.1.2-73507~Ubuntu~natty_amd64.deb
"Rules"

Code: Select all

eric@x120e:~$ sudo cat /etc/udev/rules.d/10-vboxdrv.rules
[sudo] password for eric: 
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
eric@x120e:~$
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: /dev/vboxdrv disappearing

Post by Perryg »

This happens so rare that it is difficult to say just do this.
I know that vboxdrv needs to also be in /etc/init.d/ and that a symlink needs to be in rc*.d by means of the installer running the proper code.
Since you state the version can I also assume this is from VirtualBox.org and not the Ubuntu repo?
You may just need to actually re-install VirtualBox instead of running the /etc/init.d/vboxdrv setup which has actually fixed this for at least one other user.
vberic
Posts: 22
Joined: 27. Nov 2009, 18:00
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: XP SP3

Re: /dev/vboxdrv disappearing

Post by vberic »

can I also assume this is from VirtualBox.org and not the Ubuntu repo?
Yes. "Downloaded from the VirtualBox site."
re-install VirtualBox instead of running the /etc/init.d/vboxdrv setup which has actually fixed this for at least one other user.
Do I have to uninstall first? Will my VM be affected by the re-install?

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: /dev/vboxdrv disappearing

Post by Perryg »

You probably don't need to uninstall it and no your guests should stay intact.
But I tell everyone to backup first as you know you should anyway to be safe.
vberic
Posts: 22
Joined: 27. Nov 2009, 18:00
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: XP SP3

Re: /dev/vboxdrv disappearing

Post by vberic »

backup first
Will rdiff-backup of my home directory include the VM guest or do I have to do the "clone" procedure separately for the VM?
Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: /dev/vboxdrv disappearing

Post by Perryg »

A good backup is all you need. It really should not cause an issue but a good backup never hurts even for later.
vberic
Posts: 22
Joined: 27. Nov 2009, 18:00
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: XP SP3

Re: /dev/vboxdrv disappearing

Post by vberic »

Reinstalling ("sudo dpkg -i virtualbox*") did not solve the problem. I still need to re-run 'sudo /etc/init.d/vboxdrv setup' when I restart the host computer.
cgacimartin
Posts: 3
Joined: 28. Nov 2011, 23:03
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Debian

Re: /dev/vboxdrv disappearing

Post by cgacimartin »

i´m having the same issue than vberic (with an Ubuntu 11.10, 64bits), my VB version is from the Oracle´s repos, i have tested all the purposed solutions and still i need to run a "sudo /etc/init.d/vboxdrv setup" each time I restart the computer, any other idea?
thanks.
swampy
Posts: 1
Joined: 2. Apr 2012, 21:35

Re: /dev/vboxdrv disappearing

Post by swampy »

I am also having the same issue VirtualBox 4.1.10 installed from oracle site.

Using Debian testing (I know its unstable however this appears to be a VB issue)

Same again every reboot requires
'/etc/init.d/vboxdrv setup' to start a vm.

Cheers
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: /dev/vboxdrv disappearing

Post by frank »

To debug this problem it is necessary to find out the reason what actually happens. Either the VirtualBox module isn't loaded (that is, /dev/vboxdrv does not exist after the host booted) or /dev/vboxdrv has the wrong permissions. If the module is not loaded it might be possible that /etc/init.d/vboxdrv start is not executed during boot. If the module is loaded and /dev/vboxdrv exists, a wrong udev rule might be responsible for wrong permissions.

So which of these two problems do you experience?
PolishSolaris
Posts: 1
Joined: 20. Apr 2012, 20:06

Re: /dev/vboxdrv disappearing

Post by PolishSolaris »

Hi. I'm seeing the same thing on my Debian Linux (Wheezy) install with the latest Virtualbox 4.1.12. After every reboot, I must re-run the setup command. I already checked all permissions. It looks to me like the call it missing during boot-up. I checked all my run-levels and I don't see it being called at boot-up.

On a side note, all the old cures for making mounting the USB drive from a guest os are failing as well right now:).

Respectfully,

PolishSolaris...
madpentiste
Posts: 3
Joined: 7. Mar 2012, 06:37

Re: /dev/vboxdrv disappearing

Post by madpentiste »

I have had the same problem under Ubuntu 12.04.1 LTS (Precise Pangolin): each and every new computer boot would require to re-run the 'etc/init.d/vboxdrv setup' (to be accurate, for an unknwn reason, the file 'etc/init.d/vboxdrv' did not exist on my machine, I had only 'etc/init.d/vboxdrv-dpkg.bak', but issuing 'etc/init.d/vboxdrv-dpkg.bak setup' would work).

I had installed a previous version of VirtualBox, but I had uninstalled it by the adequate actions with Dash, and installed the new package directly with the file downloaded from the VirtualBox website (virtualbox-4.1_4.1.20-80170~Ubuntu~precise_i386.deb).

As suggested above, uninstalling VirtualBox is not enough. Some configuration files remain, from the previous version, and these are the one that create the problem. In order to get a complete removal of them, I used the Synaptic Package Manager, which offers to either remove the package(s) only, or to remove the package(s) AND all configuration files. I chose to remove VirtualBox AND the configuration files, then reinstalled VirtualBox, and since then the problem have disapeared.

RE the issue with USB: after the regular installation, one have to install the extension pack (in my case, it was Oracle_VM_VirtualBox_Extension_Pack-4.1.20-80170.vbox-extpack, installed by right-clicking on it and opening it with VirtualBox).

Cheers,
Madpentiste.
Post Reply