virtualbox problems (Error! Your kernel headers for kernel 2.6.34-12-desktop cannot be found at)

Hi all, I’m just installed OpenSuse 11.3 (64) on a 30gb SSD, hoping to get virtualbox 4.0 running to virtualize an instance of Windows 7.

I went through some pain with my Nvidia video card and actually getting vb to install, but through lots of searching and tinkering got here.

I created a vm in the vb control panel, but when I go to start it I get:

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


Result Code: 
NS_ERROR_FAILURE (0x80004005)
IMachine {662c175e-a69d-40b8-a77a-1d719d0ab062}

Then another popup:

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.

So I tried running that vboxdrv setup command as root but ran into problems:

Stopping VirtualBox kernel modules                                   done
Uninstalling old VirtualBox DKMS kernel modules                      done
Trying to register the VirtualBox kernel modules using DKMS          failed
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules                                failed
  (Look at /var/log/vbox-install.log to find out what went wrong)

Here’s vbox-install.log:

linux-dehy:~ # cat /var/log/vbox-install.log
Makefile:170: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -C /usr/src/linux modules
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;                                                           \

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*

  WARNING: Symbol version dump /usr/src/linux-
           is missing; modules will have no dependencies and modversions.

make -f scripts/ obj=/tmp/vbox.0
/tmp/vbox.0/Makefile:170: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.5/include -I/usr/src/linux- -Iinclude  -include include/generated/autoconf.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 -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -I/usr/src/linux/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
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2

Through my searching for an answer, I have installed dkms, devel_kernel, and possibly a couple other things that obviously didn’t work. I have resorted to asking for help. :slight_smile:

Oh, and I tried asking at the virtualbox forums, but there’s an anti-spam question:

Latest VirtualBox Release Version:
The last RELEASED version of VirtualBox. See our website home page. (Anti-SPAM measure)

Am I crazy, or is the answer not 4.0? Or 4. Or 4.00. Nothing works…

Anyways, this forum has always held answers for me before so I thought I’d give it a shot.

Thank you for any help.

Some additional info:

linux-dehy:/home/smith # rpm -qa | grep kernel
linux-dehy:/home/smith # uname -a
Linux linux-dehy 2.6.34-12-desktop #1 SMP PREEMPT 2010-06-29 02:39:08 +0200 x86_64 x86_64 x86_64 GNU/Linux

You may be confusing things with all those development sources you need only source and sym pus the c compiler gcc

You have the kernel sources and headers for kernel (which is right) but you’re booting kernel 2.6.34-12 (which is wrong). You should update to the latest kernel ( first. If kernel version and sources don’t match, it cannot work.
When you have fixed that issue, here’s a quick howto about VirtualBox 4.0

Mind: you need to run /etc/init.d/vboxdrv setup after updating the kernel **and **rebooting. It will still report ‘failed’ on DKMS, but will create the kernel modules fine after that.

There has been a kernel security patch today since my last post. The latest kernel version in now This is the version you should have after updating the kernel. The kernel sources should be updated as well. So you should end up with something like that (after rebooting):

rpm -qa | grep kernel

uname -r

Once you have VirtualBox installed and working, you might also install the modautocompile service to have vboxdrv (an optionally other modules) automatically recompiled after a kernel update.

Thank you for all the help - forums like this one is what is making linux adoption more possible.

I’m at work, will give this a shot and will report back with my results.

Thank you for your help, vb is working a treat now. :slight_smile:

It was the kernel version - updated it and off I go.


your discussion helped me upgrade to VirtualBox 4.0.6

I was facing a very similar mix-up : my computer was booting on kernel-desktop-2.6.34-7 while kernel-source and kernel-devel were -
In my case the problem was solved by running the yast2-bootloader module fixed the problem as I was facing the following weird situation:

rpm -qa | grep kernel-desktop gave


uname -r gave

thanks a lot to all of you !

mimis koltsakis

Helo to everyone.
Hey mimis-suse10. Can you explain more detailed how did you fixed your problem?
Cos I have a similar problem.
Thank you for your ansver.
Lp Tejca

this is a great answer, it help me today with my 4.0.6 Vbox.

though i have had to install gcc and make, probably i didn’t install these packgs when i have installed OSuse 11.4, in what category these packgs included ?


excellent – thats what i was missing - the “pam-devel”
after adding that and rebooting (which is prolly didnt need to do) the “./vboxdrv setup” finally built.

You should update your system first!

zypper update