OS 13.2 / Win7 x86_64 / Guest Addition Installation Issue

Hi I just installed OpenSUSE 13.2 yesterday on my laptop running Windows 7 64 bit.
VirtualBox Version: v4.3.26 r98988
This is the error I was getting after running the ./VBoxLinuxAdditions.run

/tmp/vbox.0/Makefile.include.header:100: 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.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /usr/src/linux SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                            \
echo >&2 "  ERROR: Kernel configuration is invalid.";        \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
echo >&2 ;                            \

  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 ./Module.symvers
           is missing; modules will have no dependencies and modversions.

make -f scripts/Makefile.build obj=/tmp/vbox.0
/tmp/vbox.0/Makefile.include.header:100: 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.
grep: /usr/src/linux/include/linux/version.h: No such file or directory
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.8/include -I./arch/x86/include -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -m64 -mno-mmx -mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 -fno-stack-protector -Wno-unused-but-set-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -Wno-declaration-after-statement -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/usr/src/linux/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
In file included from <command-line>:0:0:
././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
 #include <generated/autoconf.h>
compilation terminated.
scripts/Makefile.build:273: recipe for target '/tmp/vbox.0/VBoxGuest-linux.o' failed
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
Makefile:1359: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
/tmp/vbox.0/Makefile.include.footer:79: recipe for target 'vboxguest' failed
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

What package am I missing?

Thank you in advance for helping out.


You don’t need to compile / install those on your own, they’re already included in the distribution ( virtualbox-guest-kmp-desktop etc.)

If they aren’t automatically installed for some reason, simply run:

zypper in virtualbox-guest-kmp-desktop virtualbox-guest-tools  virtualbox-guest-x11

or install them via YAST.

Thanks a lot Miuku!! :slight_smile: it worked!!

Glad to hear it worked.
AFAIK this solution works only as long as the the VBox versions in the OSS (Guest) and VBox install (Host) are identical.

You shouldn’t have seen your error, I use the Guest Additions that’s distributed by the HostOS install (install files available as a virtual CDROM mount) to ensure success and don’t see your error.


I saw the same problem as the first poster when trying to install quest additions on OpenSuse 13.2 for the latest non-beta VirtualBox (4.3.26), from the virtual CDROM mount.
I tried adding kernel-devel, but it did not help, version.h is not there. A solution should be found, as the additions depend on the VirtualBox version, and it is hard to see if the problem is in VirtualBox, OpenSuse kernel-devel packaging, or a real change in kernel that the VirtualBox should take into account. I suspect the kernel-devel packaging. From some web pages (eg linux - how to install 'version.h' in ubuntu ? - Super User) I get the idea that version.h is generated when a kernel is compiled, it is not part of the kernel sources as such. But it is quite combersome to instal 3.party kernel modules, if the requirement is not only to install kernel-devel, but to actually aso rebuild the kernel, so kernel-devel should contain the generated version.h that matches the kernel.

Or you could just use the Virtualization repository and install the Guest/Host additions from there as they offer the latest KMPs; https://build.opensuse.org/package/show?project=Virtualization&package=virtualbox

“Do it the right way.”

You need kernel-desktop-devel as well (if you use kernel-desktop, for kernel-default it would be kernel-default-devel and so on).
That includes the generated version.h.

But, as Miuku indicated, you don’t have to install the guest additions in an openSUSE guest. openSUSE includes the guest additions and installs them by default.
And no, the additions do not really depend on the VirtualBox version (at least not strictly). The ones included in openSUSE 13.2 work fine in the latest VirtualBox 4.3.26.

That might currently be true, but as I suggested it’s <safest> to use the Guest Additions that come with the app distribution.
So, if you downloaded from Oracle, then you should use the Guest Additions with that download as all parts of that download should be internally consistent.

If you installed your VBox from the OSS (or virtualization repo), then you should probably use the Guest Additions from that same source (repository).

Sure, there may be times when there can be mis-matched versions that are still compatible but why take a chance?

wolfi is entirely correct that you need the proper kernel devel package for whatever is the running kernel (in the Guest) if you are compiling instead of using pre-compiled packages.


If the guest interface would be that unstable, it would make absolutely no sense to include the guest additions in the distribution and add them to the LiveCDs in particular.