Install 4.0.8 fails - cannot access kernel driver

Discussions related to using VirtualBox on Windows hosts.

Re: Install 4.0.8 fails - cannot access kernel driver

Postby JWSmythe » 26. May 2011, 21:23

I'm having the same problem here.

I start up VirtualBox. I can start up two images that were working before. I added another today. For some reason, when I was creating the image, it had permissions problems, although the entire tree is owned by the same user. It created the machine directory, and created the vbox file, but then complained about it. I chmod 777 all the directories, and chmod 666 all the files (bad security, but I'm the only user on this machine).

Now when I try to start the VM, I see a box titled "GP: Starting VM". In the box, it says:

Creating process for virtual machine "GP" (GUI/Qt) ... (1/2)

Clicking the X for cancel (not X for close window), it switches dialogue under the status bar to "Canceling...", and again hangs.

It sat for a while. I killed it, shut down VirtualBox, set the permissions again (for fun), and went back through the routine. It's again hung at the same spot.

I'm on the 4th cycle of this. I guess

I'm trying to convert a bunch of old hardware machines over to a pair of servers I have for virtual machines. I've been *very* happy with VirtualBox. I used VMWare for years, and when I first heard about VirtualBox (before the Sun acquisition), I was impressed and switched over. So, I have lots of experience with it.

My platform is Slackware64 13.1.0, patched up as of two days ago.

VirtualBox was upgraded today. Version 4.0.8 r71778

If there are two of us, one on Windows (the original poster), and me on Linux, I'd be willing to bet that it's a general code problem in this version, and not something specific to his platform.
Posts: 5
Joined: 21. Jan 2009, 17:30

Re: Install 4.0.8 fails - cannot access kernel driver

Postby JWSmythe » 26. May 2011, 22:04

I always feel dumb when I post a problem, and then figure out the solution a few minutes later.

This fix apparently works on Linux. I have absolutely no idea how you'd implement it on Windows. I pretty much pulled the numbers I used out of thin air. Someone else may have a more educated opinion on the "right" values. I have lots of memory in this machine, so I don't really care if I take up a few extra KB (or even GB).

The main question would be, was something different done with semaphores in 4.0.8?

Here's what I did. I trimmed out a few mistakes, and irrelevant steps. My comments are prefixed with "#".


# The VM isn't running. According to the manager window, it's stopped, but settings, run, and discard
# are all grayed out, as if it was running. So I'll try to stop it.

root @ vm1 (/host/VirtualBox/GP controlvm GP shutdown
VBoxManage: error: Cannot create IPC semaphore because the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS) would be exceeded. The current set of SysV IPC semaphores can be determined from the file /proc/sysvipc/sem
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component SessionMachine, interface IMachine, callee nsISupports
Context: "LockMachine(a->session, LockType_Shared)" at line 84 of file VBoxManageControlVM.cpp

# Voila! The problem! Now lets go confirm the settings, and fix it.
# These are the current system settings.

root @ vm1 (/host/VirtualBox/GP /proc/sys/kernel/sem
250 32000 32 128

# Lets see how many semaphores currently are in use.

root @ vm1 (/host/VirtualBox/GP /proc/sysvipc/sem | wc -l

# That's 128 semaphores, and 1 header. The fourth column on the step before shows our limit by default is 128.
# Lets crank up the numbers. I'm planning for a whole lot of VMs.
root @ vm1 (/host/VirtualBox/GP "2048 65535 1024 32767" > /proc/sys/kernel/sem

# Verify my changes
root @ vm1 (/host/VirtualBox/GP /proc/sys/kernel/sem
2048 65535 1024 32767

# I then started up the troublesome VM. It boots perfectly! Lets see how many semaphores are being used now.
root @ vm1 (/host/VirtualBox/GP /proc/sysvipc/sem | wc -l
# That's 176 semaphores, and one header line.

I hope this helps. It appears VirtualBox needs approx 48 semaphores per VM. I didn't bother with finding a more accurate number, it's just obvious that the OS default number of semaphores is too low if you're trying to run more than 2 VMs.
Posts: 5
Joined: 21. Jan 2009, 17:30

Re: Install 4.0.8 fails - cannot access kernel driver

Postby 0riginalex » 24. Mar 2014, 14:05

I just had the error that jflanner reported following an update to 4.3.8.

> I immediately get a popup - Cannot access the kernel driver. Make sure the kernel module has been loaded successfully. A second popup I have never seen before also comes up. It reads Creating process for virtual machine "machine name" with 0% in the progress bar. The progress bar never changes until I hit cancel.

> I have read several posts that suggest I should run repair so - I do. Repair looks normal. It "deletes files" ... "copying new files" ....

Unlike jflanner, a repair did work for me. I just downloaded an ran the installer, it completed fine, started fine and none of my VMs were adversely affected.
Posts: 1
Joined: 24. Mar 2014, 14:03


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 21 guests