Every other time I try to run a VirtualBox OS, I’ll get this notice:
VirtualBox - Error In suplib0sInit:
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 vboxdrv kernel module if necessary.
I’ve tried reinstalling the driver using the method mentioned in the error:
Stopping VirtualBox kernel modules done
Uninstalling old VirtualBox DKMS kernel modules done
Trying to register the VirtualBox kernel modules using DKMS done
Starting VirtualBox kernel modules done
but the problem still persists!
Before I waste another 3 hours trying to get this working I figured I’d ask here.
First of all which version of VirtualBox are you running?
Did you install VirtualBox PUEL from Oracle or OSE from openSUSE?
Which version of openSUSE are you running?
Make sure that you have added yourself to vboxusers group via:
Yast → Security and Users → User and Group Management.
I just did all that but I still got the error when I rebooted.
I guess I could just have the “/etc/init.d/vboxdrv setup” run at start up as a last resort, but I have no clue how to set that up properly.
Or if opensuse has the option to save my session on logout/shutdown I guess I could live with that.
Hehe, it’s funny how I’m just now thinking about these.
The VirtualBox kernel driver error from the first post, although I just realized that I only get that error whenever I have it run at startup. Could it be that VirtualBox starts running before the driver gets a chance to load? And if that’s true is there any way to have the driver start first?
Maybe creating a script that executes the driver, and then starts the application would be a viable option. I don’t know how you would get a driver running though, I’m assuming you can’t just run it like an executable.
I’m using the “VBoxManage startvm” command and switch to run the VM directly, not “VirtualBox” by the way.
Yes, you have to start the VM after the driver is loaded. You should adjust your init script so that it Requires the vboxdrv capability in the metadata at the top of the file. But I’m guessing you aren’t using an init script but putting it in boot.local or something. That gets run too early in the boot sequence.
Everything works now, thanks guys. (And I understand that having my password visible in a script like that isn’t exactly the safest way to go around it, but, considering how I really only use this computer for music and schoolwork, I don’t mind the risk.)
This is off-topic, but I’d also like to know how run the command {VBoxManage controlvm “Windows XP” savestate} automatically whenever I click the shutdown button. Is there a configuration script I need to edit to do this? What is it called and where is it located?
If you are talking about the host OS and you are running KDE then this is what I would do:
kwrite ~/bin/savexpstate.sh
Add this in that text file and save:
VBoxManage controlvm "Windows XP" savestate
Then give it executable rights
chmod +x ~/bin/savexpstate.sh
Then in KDE control center go to Startup and Shutdown -> Autostart -> Add script -> Browse to your home folder, click bin, then click on savexpstate.sh. Then hit OK. Then change run on for savexpstate.sh to Shutdown
It says it’s been running on those run levels. I’m guessing it just doesn’t run quick enough for the VM to start, but when I did it manually it only took a second to start up so that can’t be it. I’m using the “Startup Applications” application in control center to configure these startups by the way.
If you are running GNOME I think you can add something to /etc/gdm/PostSession/Default. Let me power up my GNOME machine and I will investigate. Give me about 20 minutes
No, it didn’t work, although when I ran {su xypher -c ‘/usr/bin/VBoxManage controlvm “Windows XP” savestate’} in terminal I noticed it prompted me for a password before it executed. That could be what’s stopping it, but wouldn’t that have stopped the shutdown process from completing? It’s still giving me the “Waiting for the program to finish” notice.
That script (/etc/gdm/PostSession/Default) runs as root so when when you do su as root it doesn’t ask for password. How long does it take for the Windows XP Virtual Machine to save state when you do it manually via command line?