VirtualBox suddenly isn't running in fedora

Discussions related to using VirtualBox on Linux hosts.
Post Reply
sza
Posts: 5
Joined: 13. Jul 2012, 01:33

VirtualBox suddenly isn't running in fedora

Post by sza »

Hello everyone,
I am working with Fedora 17 KDE for a couple of month with VirtualBox.
I have a Windows guest OS in it.
Today, after updating fedora - I suddenly discovered that I can't run my VirtualBox's Windows guest OS.
When I'm typing "virtualbox" in terminal window I get the following message: (and I can see the window with my Windows guest OS)

Code: Select all

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.4.6-2.fc17.x86_64) or it failed to
         load. Reboot the computer, or insert the kernel module by executing

           '/etc/sysconfig/modules/VirtualBox.modules' (as root)

         You will not be able to start VMs until this problem is fixed.
When I'm trying to start my guest machine I get 2 error messages:

The first one:

Code: Select all

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is probably not loaded.

If you installed or VirtualBox package recently you need to restart the computer for the driver to load.

Alternatively, you may attempt to load the driver by issuing the following command with system administrator (root) privileges:

'/etc/sysconfig/modules/VirtualBox.modules'
The second one:

Code: Select all

Failed to open a session for the virtual machine Win7.
The virtual machine 'Win7' has terminated unexpectedly during startup with exit code 1.
Info:

Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
Machine
Interface: 
IMachine {5eaa9319-62fc-4b0a-843c-0cb1940f8a91}
I also tried the terminal's error message advice and this is the answer:

Code: Select all

# /etc/sysconfig/modules/VirtualBox.modules
ERROR: Module vboxdrv not found.
ERROR: Module vboxnetflt not found.
ERROR: Module vboxnetadp not found.
What can I do about it?

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

Re: VirtualBox suddenly isn't running in fedora

Post by Perryg »

You need to first install the kernel-headers to match the new kernel and then you can compile the VirtualBox kernel modules by running the following:

Code: Select all

/etc/init.d/vboxdrv setup
Note: if you had install dkms this would have been do for you when the kernel was updated.
sza
Posts: 5
Joined: 13. Jul 2012, 01:33

Re: VirtualBox suddenly isn't running in fedora

Post by sza »

Hi
Thank you for your reply.
Unfortunately, I am a linux newbie.
I'll be more than glad if you could told me how to install kernel headers ?

I've googled this problem before posting and saw someone advising to install dkms. i've installed it and yet nothing happent.

Can you please give me more detailed instructions ?

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

Re: VirtualBox suddenly isn't running in fedora

Post by Perryg »

If dkms was not installed previous to the upgrade it would do nothing, but should on the next upgrade.

as su/sudo type in a terminal.

Code: Select all

yum install kernel-headers
If that fails then the following:

Code: Select all

yum install kernel-headers-$(uname -r)
Then once it is successfully installed run the vboxdrv setup I posted earlier.
sza
Posts: 5
Joined: 13. Jul 2012, 01:33

Re: VirtualBox suddenly isn't running in fedora

Post by sza »

Code: Select all

Package kernel-headers-3.4.6-2.fc17.x86_64 already installed and latest version
.
.

Code: Select all

# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox suddenly isn't running in fedora

Post by Perryg »

What version of VirtualBox are you using and where did you get the install from? Was it Fedora or VirtualBox.org?
sza
Posts: 5
Joined: 13. Jul 2012, 01:33

Re: VirtualBox suddenly isn't running in fedora

Post by sza »

I don't remember for sure where did I install it from.
But I assume it was thrue YUM.

The VirtualBox version is: 4.1.18_rpmFusion r78361 .
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox suddenly isn't running in fedora

Post by Perryg »

Well it looks like it did not come from here. Given that you don't see /etc/init.d/vboxdrv
Sorry to say I have no idea what to tell you to do. You have two choices the way I see it. Continue to use the rpmfusion version or switch to the VirtualBox.org version. If you decide to continue with the rpmfusion package you would need to get assistance from them. If you decide to switch you would need to remove the already installed version before you install the one from VirtualBox. All guests should remain intact but a good backup would be in order.
sza
Posts: 5
Joined: 13. Jul 2012, 01:33

Re: VirtualBox suddenly isn't running in fedora

Post by sza »

Well, thank you very much for your support.
I have no idea what have I done (it included reinstalling VirtualBox thrue YUM)
but now it works just fine.
Hope it will remain this way.

Thanks alot!
Erebus671
Posts: 3
Joined: 21. Aug 2012, 12:25

Re: VirtualBox suddenly isn't running in fedora

Post by Erebus671 »

I have a similar issue... The only difference is I do see a "vboxdrv" in my /etc/init.d folder. I'll show you my "vbox-install.log" file, hopefully someone can help me out here...

Code: Select all

Uninstalling modules from DKMS
  removing old DKMS module vboxhost version  4.1.18

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

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

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=3.5.2-1.fc17.x86_64 -C /lib/modules/3.5.2-1.fc17.x86_64/build M=/var/lib/dkms/vboxhost/4.1.18/build....(bad exit status: 2)
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.5.2-1.fc17.x86_64/build modules
/usr/src/kernels/3.5.2-1.fc17.x86_64/arch/x86/Makefile:81: stack protector enabled but no compiler support
make[1]: gcc: Command not found
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
echo;								\
echo "  ERROR: Kernel configuration is invalid.";		\
echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo;								\
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem  -I/usr/src/kernels/3.5.2-1.fc17.x86_64/arch/x86/include -Iarch/x86/include/generated -Iinclude  -include /usr/src/kernels/3.5.2-1.fc17.x86_64/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/3.5.2-1.fc17.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
/bin/sh: gcc: command not found
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 127
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2
I hope someone can get something out of this, I'm really new to Linux, I just started using Fedora 3 days ago. I need my windows for my Networking classes, but I don't want to dual boot... Thanks in advanced...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox suddenly isn't running in fedora

Post by Perryg »

gcc: command not found

Looks like missing gcc and maybe more depencencies. You can try installing them and then run the /etc/init.d/vboxdrv setup

64 bit version

Code: Select all

yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
or 32 bit version

Code: Select all

yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-pae-devel
You may also need to update to the version released yesterday 4.1.20 if you still have issues with Fedora.
Erebus671
Posts: 3
Joined: 21. Aug 2012, 12:25

Re: VirtualBox suddenly isn't running in fedora

Post by Erebus671 »

Thanks Perry,

I'm going to try this out and I'll let you know, thanks for the quick reply.

-Erebus
Erebus671
Posts: 3
Joined: 21. Aug 2012, 12:25

Re: VirtualBox suddenly isn't running in fedora

Post by Erebus671 »

Thanks! The gcc worked great! I had a little bit of trouble installing windows on it, but one quick reboot and it worked perfectly.
Post Reply