Error building guest additions for openSUSE 13.1


I’m running openSUSE 13.1 guest OS inside virtualbox on ubuntu 12.04 host. The OS installed fine, but when I try to build the guest addons by issuing “./”, the build process fails as logged in vboxadd-install.log below. I have installed all dependencies including make, gcc and kernel-source:

vbox-install.log output

grep: /lib/modules/3.11.6-4-default/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.11.6-4-default/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-3.11.6-4-obj/i386/default \
KBUILD_SRC=/usr/src/linux-3.11.6-4 \
KBUILD_EXTMOD="/tmp/vbox.0" -f /usr/src/linux-3.11.6-4/Makefile \
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 ;                            \
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-3.11.6-4/scripts/ obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/i586-suse-linux/4.8/include -I/usr/src/linux-3.11.6-4/arch/x86/include -Iarch/x86/include/generated  -I/usr/src/linux-3.11.6-4/include -Iinclude -I/usr/src/linux-3.11.6-4/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-3.11.6-4/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-3.11.6-4/include/linux/kconfig.h   -I/tmp/vbox.0 -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 -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i586 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -fasynchronous-unwind-tables -g -fno-inline-functions-called-once -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h   -I/lib/modules/3.11.6-4-default/build/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_X86  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
/tmp/vbox.0/VBoxGuest-linux.c:206:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘g_VBoxGuestPciId’
 static const struct pci_device_id __devinitdata g_VBoxGuestPciId] =
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:78:0,
                 from /tmp/vbox.0/VBoxGuest-linux.c:28:
/usr/src/linux-3.11.6-4/include/linux/module.h:87:32: error: ‘__mod_pci_device_table’ aliased to undefined symbol ‘g_VBoxGuestPciId’
 extern const struct gtype##_id __mod_##gtype##_table  \
/usr/src/linux-3.11.6-4/include/linux/module.h:140:3: note: in expansion of macro ‘MODULE_GENERIC_TABLE’
/tmp/vbox.0/VBoxGuest-linux.c:216:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
 MODULE_DEVICE_TABLE(pci, g_VBoxGuestPciId);
make[4]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[3]: *** [_module_/tmp/vbox.0] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

You don’t have to build the guest additions, they get installed by default when you install openSUSE 13.1 in VirtualBox.

You should have the packages virtualbox-guest-kmp-desktop (or similar, depending on which kernel you have installed), virtualbox-guest-tools, and virtualbox-guest-x11 installed in the guest. You can check in YaST->Software Management, f.e.

@wolfi323 - Thanks for clearing that! The packages are indeed there, I found in yast. But then why is the guest screen resolution stuck at a small 640x480 window?
I couldn’t find anything to change that in yast or system-configuration.

Not sure at the moment.
You could try to change the “console resolution” in YaST->System->Boot Loader->Boot Loader Options.

But I think if the vbox driver is in use, the resolution should be higher anyway.

I can’t check atm, because I don’t have a 13.1 installation in VirtualBox here.
But the resolution was bigger for me when I tried the 13.1 RCs IIRC.
I have to install final in VirtualBox first, but this will take a while.

Maybe have a look in /var/log/Xorg.0.log to see if the vbox driver is actually used.
If not, the above should work in any case.

Which VirtualBox version are you using in Ubuntu?
Maybe there’s a version conflict? But I think the guest interface should be quite stable.

I found this other thread where the guy had a similar issue, albeit in 12.03 and he was running Microsoft hyperv instead of virtualbox. In Xorg.0.log he found that openSUSE was using FBDEV driver instead of vesa which was apparently supposed to cause the resolution problem. Like him, I tried to switch to vesa by editing the /etc/X11/xorg.conf.d/50-device.conf, but only in my case it didn’t work. After I changed to vesa, the guest doesn’t start. It just halts at the blank desktop that comes before user-login. Any ideas?

Well, you can’t really compare hyperv with VirtualBox, as they are completely different virtualization systems.

You should be able to get into your openSUSE installation again by selecting recovery mode in the boot menu (under Advanced options).

Then remove or change back that file again.

I think the vesa driver is not installed by default anymore in openSUSE. So setting it in an xorg.conf* file will prevent X from starting.

If fbdev is in use, the boot loader options change as I suggested should work.

  1. In 12.3, I remember that openSUSE initially booted in Vesa mode(likely), but once the Desktop loads you should get higher resolution automatically. With 13.1, I only get VGA 640x480 on my “minimal server” installs, I’ve been seeing high resolution displays in all my 13.1 Desktop Guests. If you’re seeing something different, then I’d ask whether you’re really installing new Guests using the DVD ISO (or some other source?). The xorg file should be removed, I doubt there is any file in existence that’s likely going to help on a default install.

  2. When openSUSE installs (in any virtualization technology) the open source versions of the Guest Additions for that technology are automatically installed. But, since I’ve found so far that all Open Source versions don’t support Shared Folders which I use extensively, I’ve installed the proprietary versions in all my Guests. You may find other reasons to use the Proprieatary versions, but AFAIK display resolution isn’t likely going to be improved (is the same for both open source and proprietary). IMO it’s more likely you have a wonky setting in your Virtualbox settings on the Host, but that’s only a guess.

  3. Installing Guest Additions
    IIRC it was fairly straightforward to initially setup, read the instructions in your Virtualbox Help for Linux Guests. You should be able to simply click the Devices > Insert Guest Additions CD Image link and it should appear on your Desktop. Open it and run the install script (.sh) If you’re running a minimal server (without Desktop) you may want to manually mount the ISO instead so you know where it is.


Well, I’m installing 13.1 in VirtualBox 4.3.6 right now, and I already have 1024x768 resolution during the installation.

More infos later…
But I’m suspecting it will start up in 1024x768 as well, which would match my memory about the RCs.

The system boots to 1024x768 as expected. (default installation without changing anything)
Yeou can even set any arbitrary resolution by just resizing the VirtualBox window (this even gets saved).

And the vesa driver is automatically installed as well, so your 50-device.conf should actually work. But you may have to add “nomodeset” to the kernel boot options for vesa. Or try the “modesetting” driver instead.

As I said the fbdev driver should respect the “Console Resolution” setting in YaST->System->Boot Loader->Boot Loader Options.

Could you upload /var/log/Xorg.0.log (from the guest of course) to and post a link, please?
This should show which driver is actually in use, and might even give a hint why vboxdrv is not working/the resolution is too low.

Oh, and you do have 13.1 final installed, right?
vboxdrv did not work in some of the Betas because it was still compiled against an older Xorg by mistake.

I haven’t run into any video problems installing any 13.1 Guest running any Desktop (KDE, LXDE, XFCE) in any virtualization technology I’ve run (KVM, VMware, Virtualbox). IIRC 13.1 grub loads the vesa driver (all situations, both bare metal and virtualization) by default.

I’ve found that disabling KMS during boot has been an issue only when installing on bare metal, and at least in my case after the install I can manually switch back to enabling KMS.

Video in Guests should “just work”


Grub doesn’t load any driver. It includes its own.
How should it load the vesa driver anyway. It’s started before even the kernel is loaded (obviously, since it’s grub’s purpose to load the kernel).

I’ve found that disabling KMS during boot has been an issue only when installing on bare metal, and at least in my case after the install I can manually switch back to enabling KMS.

AFAIK vboxdrv doesn’t use KMS, so it doesn’t matter whether KMS is enabled or disabled, since in the case of VirtualBox no KMS module gets loaded automatically anyway.

Video in Guests should “just work”

Yes. But if the wrong driver is used (i.e. not vboxdrv in this case), not all features are available of course.

Re: Grub loading VESA driver, I’m just going by what I read in my GRUB config. I was curious when I started seeing higher resolution than simple VGA on boot. I agree that Grub is loading whatever driver it is being packaged with and not any drivers which are configured during the time Plymouth loads.

Re: KMS. What you say about whether it makes a diff in VBox may be true, I haven’t looked at that.


I’m not quite following you here.
What do you mean with GRUB config?

I have this in /boot/grub2/grub.cfg:

function load_video {
  if  x$feature_all_video_module = xy ]; then
    insmod all_video
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus

No mention of VESA…

But yes, my boot menu shows up in 1280x1024. You can configure the resolution in /etc/default/grub or YaST->Boot Loader->Boot Loader Options, the default is “Autodetect” which correctly determines the monitor’s preferred resolution on both my radeon and my intel systems.
It doesn’t work on an nvidia system, you have to specify a higher resolution there manually. It only uses 640x480 there by default. And the same is true for VirtualBox.