VBox will not open after updating to Leap 42.1, suspect kernel problem

VirtualBox will not open since I’ve updated to Leap 42.1 from 13.2. I attempted to recompile the kernels as was suggested and it failed. The log file reads as follows:

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."; \

Anyone know how to fix this?

Hi and welcome to the openSUSE Forums :slight_smile:
You shouldn’t need to recompile the kernel, you only need to rebuild the drivers as root user run;


rcvboxdrv setup

Here are the results of that command:

Love:~ # rcvboxdrv setup
Stopping VirtualBox kernel modules done
Uninstalling old VirtualBox DKMS kernel modules done
Removing old VirtualBox kernel module done
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 4.1.15-8-default (x86_64)
Consult /var/lib/dkms/vboxhost/4.2.12/build/make.log for more information.
failed
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules failed
(Look at /var/log/vbox-install.log to find out what went wrong)

Here are the details from /var/log/vbox-install.log ( I had to delete much of the output because it exceeded the character limit for this post. I kept what I felt was most important, the error report):

Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.2.12


Deleting module version: 4.2.12
completely from the DKMS tree.

Done.
Attempting to install using DKMS

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

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
make KERNELRELEASE=4.1.15-8-default -C /lib/modules/4.1.15-8-default/build M=/var/lib/dkms/vboxhost/4.2.12/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/4.1.15-8-default/build modules
make -C /usr/src/linux-4.1.15-8-obj/x86_64/default KBUILD_SRC=/usr/src/linux-4.1.15-8
-f /usr/src/linux-4.1.15-8/Makefile 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 ;
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-4.1.15-8/scripts/Makefile.build obj=/tmp/vbox.0

     if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC, &papPagesIterator))
     ^

In file included from /usr/src/linux-4.1.15-8/arch/x86/include/asm/io.h:200:0,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/realmode.h:5,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/acpi.h:33,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/fixmap.h:19,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/apic.h:13,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/smp.h:12,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/mmzone_64.h:10,
from /usr/src/linux-4.1.15-8/arch/x86/include/asm/mmzone.h:4,
from /usr/src/linux-4.1.15-8/include/linux/mmzone.h:911,
from /usr/src/linux-4.1.15-8/include/linux/gfp.h:5,
from /usr/src/linux-4.1.15-8/include/linux/slab.h:14,
from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:72,
from /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:31:
/usr/src/linux-4.1.15-8/include/linux/vmalloc.h:123:12: note: expected ‘struct page **’ but argument is of type ‘struct page ***’
extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
^
if “-pg” = “-pg” ]; then if /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o != “scripts/mod/empty.o” ]; then ./scripts/recordmcount “/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o”; fi; fi;

-f /usr/src/linux-4.1.15-8/Makefile 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 ;
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-4.1.15-8/scripts/Makefile.build obj=/tmp/vbox.0

         ^

cc1: some warnings being treated as errors
/usr/src/linux-4.1.15-8/scripts/Makefile.build:274: recipe for target ‘/tmp/vbox.0/linux/VBoxNetFlt-linux.o’ failed
make[4]: *** [/tmp/vbox.0/linux/VBoxNetFlt-linux.o] Error 1
/usr/src/linux-4.1.15-8/Makefile:1410: recipe for target ‘module/tmp/vbox.0’ failed
make[3]: *** [module/tmp/vbox.0] Error 2
Makefile:146: recipe for target ‘sub-make’ failed
make[2]: *** [sub-make] Error 2
Makefile:24: recipe for target ‘__sub-make’ failed
make[1]: *** [__sub-make] Error 2
Makefile:204: recipe for target ‘vboxnetflt’ failed
make: *** [vboxnetflt] Error 2

Please show output of


zypper lr -d

Normally a new kmp package with the kernel modules for the installed kernel should be available. AFAIK it should not be necessary to rebuild the kernel module yourself.

Just to avoid confusion here:
If you installed the virtualbox packages included in openSUSE, there is no need to compile the kernel module yourself. It is included in binary form in virtualbox-host-kmp-default and matches the standard kernel. IOW, you can only use it with the kernel included in openSUSE.

If you install the VirtualBox package from Oracle (virtualbox.org), you need to compile the kernel module yourself, after each kernel update.
This is what the OP apparently did, otherwise “vboxdrv setup” would just say that it won’t compile the kernel module.

The problem here seems to be that the necessary kernel development packages are missing though.
Please post the output of:

rpm -qa | grep kernel

And just to be sure, also what virtualbox packages are installed:

rpm -qa | grep -i virtualbox

You should not have both (openSUSE’s and Oracle’s versions), as they will overwrite each other’s files and that will give you problems sooner or later.

Hi, I’m puzzled by something I read here.
First question: which VirtualBox? VBox from the OpenSuse official repos doesn’t require recompiling kernel modules, as Knurpht pointed out, but the upstream Oracle VirtualBox definitely does, as Malcolm pointed out.
Then I see in post #3:

Consult /var/lib/dkms/vboxhost/4.2.12/build/make.log for more information.

So, is the OP still using VirtualBox version 4.2.12 and not the official Leap 42.1 version?
My first advice is: please disinstall any VirtualBox you have on your system; then install from the offficial Leap 42.1 repo:
virtualbox …version 5.0.10-10.1
virtualbox-host-kmp-default …version 5.0.10_k4.1.12_1-10.1

plus any dependencies that might be automatically selected.
Then report back if you still have problems, but I see no issues here with that setup.

Right, I would suggest that as well, or at least use the latest Oracle version.
4.2.12 is very old and will likely not work at all with Kernel 4.1.

Thanks for pointing that out, I didn’t notice the version… :wink:

As previously have pointed out, this sounds like Virtualbox downloaded from Oracle.

If you trace the posted log snippets, the OP is in any case missing code required to build the kernel. Was in the first post, then repeated in post #3… The problem isn’t an old version (Speculative whether an old version would have a problem), it’s just missing files and code.

So, either

  • Remove existing Virtualbox entirely and install from OSS. Remember though, unless you want to do all the work associated with upgrading to VBox 5.x, you need to be careful to install VBox 4.x packages.

  • Download VBox install from Oracle so you have a complete install package. When you run it, it should detect your existing VBox, remove it and install new with minimal effort.

TSU

The one doesn’t exclude the other. :wink:

Even missing files errors could stem from the fact that the installed VirtualBox doesn’t support Kernel 4.1.
It does happen that include files get renamed/moved around in major new Kernel releases…

And I for one am pretty sure that VirtualBox 4.2.12 (which is from 2013!) will not work or even be able to build the kernel module with Kernel 4.1, even if the necessary kernel headers are installed.

Love:~ # zypper lr -d

| Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service

—±------------------------------------±----------------------------------------±--------±----------±--------±---------±-------±--------------------------------------------------------------------------------------±-------
1 | download.opensuse.org-Extra | openSUSE BuildService - KDE:Extra | No | ---- | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/KDE:/Extra/openSUSE_leap/42.1/ |
2 | download.opensuse.org-oss | Main Repository (DEBUG) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/debug/distribution/leap/42.1/repo/oss/ |
3 | download.opensuse.org-oss_1 | Main Repository (Sources) | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/source/distribution/leap/42.1/repo/oss/ |
4 | download.opensuse.org-update | Update Repository (DEBUG) | No | ---- | Yes | 99 | rpm-md | http://download.opensuse.org/debug/update/leap/42.1/ |
5 | fontfixrepos | fontfixrepos | No | ---- | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/home:/namtrac:/subpixel/openSUSE_leap/42.1/ |
6 | ftp.gwdg.de-suse | Packman Repository | No | ---- | Yes | 99 | rpm-md | http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_leap/42.1/ |
7 | http-download.opensuse.org-4de203b1 | X11:Bumblebee | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/X11:/Bumblebee/openSUSE_Leap_42.1/ |
8 | http-ftp.uni-erlangen.de-cd592d70 | Packman Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | Index of /packman/suse/openSUSE_Leap_42.1 |
9 | multimedia:apps | multimedia:apps | No | ---- | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/multimedia:/apps/openSUSE_leap/42.1/ |
10 | multimedia:libs | multimedia:libs | No | ---- | Yes | 99 | rpm-md | http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_leap/42.1/ |
11 | openSUSE-leap/42.1-1.10 | openSUSE-leap/42.1-1.10 | No | ---- | No | 99 | yast2 | cd:///?devices=/dev/disk/by-id/ata-hp_DVD_A_DS8A9SH_653302064918 |
12 | repo-debug | openSUSE-leap/42.1-Debug | No | ---- | Yes | 99 | NONE | http://download.opensuse.org/debug/distribution/leap/42.1/repo/oss/ |
13 | repo-debug-update | openSUSE-leap/42.1-Update-Debug | No | ---- | Yes | 99 | NONE | http://download.opensuse.org/debug/update/leap/42.1/ |
14 | repo-debug-update-non-oss | openSUSE-leap/42.1-Update-Debug-Non-Oss | No | ---- | Yes | 99 | NONE | http://download.opensuse.org/debug/update/leap/42.1-non-oss/ |
15 | repo-non-oss | openSUSE-leap/42.1-Non-Oss | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/leap/42.1/repo/non-oss/ |
16 | repo-oss | openSUSE-leap/42.1-Oss | Yes | (r ) Yes | Yes | 99 | yast2 | http://download.opensuse.org/distribution/leap/42.1/repo/oss/ |
17 | repo-source | openSUSE-leap/42.1-Source | No | ---- | Yes | 99 | NONE | http://download.opensuse.org/source/distribution/leap/42.1/repo/oss/ |
18 | repo-update | openSUSE-42.1-Update | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.1/oss/ |
19 | repo-update-non-oss | openSUSE-42.1-Update-Non-Oss | Yes | (r ) Yes | Yes | 99 | rpm-md | http://download.opensuse.org/update/leap/42.1/non-oss/ |

Yes, you all are correct. I initially installed Vbox from Oracle back in 2013 (I believe it was the only option then) and have just floated it over to every upgrade, not aware of the consequences. Downloading from Oracle is tempting, as it sounds much easier. However if it will make future upgrades smoother, then I would rather install from OSS. If that understanding is correct, can someone please post the commands for this procedure? I normally only use the konsole if I’m copying the commands from a clear tutorial.

Virtualbox was definitely included in the distribution already in 2013.

The package’s changelog even dates back to 2009, but I don’t know when it got added to the standard repos.

Downloading from Oracle is tempting, as it sounds much easier.

How is that easier than just installing the package that is in the standard repos?
You have to download the rpm and install it manually, or add an additional repo, whereas using the openSUSE package just means installing it with YaST or zypper.

However if it will make future upgrades smoother, then I would rather install from OSS. If that understanding is correct, can someone please post the commands for this procedure?

zypper rm VirtualBox-4.1
zypper in virtualbox

The first command is to remove the Oracle package, I’m not sure whether the package name is correct. You could also just use YaST for both, searching for “virtualbox” there should ease things.

From what I see, the correct name should be:

zypper rm **VirtualBox-4.2**
zypper in virtualbox

Yeah, right.
I somehow had 4.1.12 in my mind, but that’s the kernel version… :shame:

Success. Thanks for the troubleshooting for all involved.

I suspect the code above would have worked, but I ended up achieving success this way:

  1. Yast: searching virtualbox > found VirtualBox 4.2 and clicked the icon until it switched from a “check” to an “x” > clicked next which uninstalled it using Yast

  2. Went here: openSUSE Software > and used the one click install technique to download and install the updated copy.

I also needed to update my virtualbox extensions which I did in the VirtualBox GUI > File > Preferences > Extensions > Clicked on small icon to right with an triangle and added followed the procedure to add the extension.

In the GUI, I also needed to go to Settings > USB > and change from 2.0 to 1.1 for it to successfully open my Windows OS.

Thanks again for the help

  •  		 			:)
    

Hi :wink:

may i ask my question here as i have a similar question/error :

when i try to run vbox i have this error :


# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                                                                                                                                                                      done
Recompiling VirtualBox kernel modules                                                                                                                                                                   failed
  (Look at /var/log/vbox-install.log to find out what went wrong)
openSUSE421:~ # cat /var/log/vbox-install.log
Makefile:188: 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 CONFIG_MODULE_SIG= -C /usr/src/linux 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 ;                                                      \
/bin/false)

  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:188: 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.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -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 -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -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_SSSE3=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 --param=allow-store-data-races=0 -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 -include /tmp/vbox.0/include/VBox/SUPDrvMangling.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/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 -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -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
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:274: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
Makefile:1410: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:298: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2
Makefile:188: 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 CONFIG_MODULE_SIG= -C /usr/src/linux 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 ;                                                      \
/bin/false)

  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:188: 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.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -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 -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -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_SSSE3=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 --param=allow-store-data-races=0 -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 -include /tmp/vbox.0/include/VBox/SUPDrvMangling.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/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 -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -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
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:274: recipe for target '/tmp/vbox.0/linux/SUPDrv-linux.o' failed
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
Makefile:1410: recipe for target '_module_/tmp/vbox.0' failed
make[1]: *** [_module_/tmp/vbox.0] Error 2
Makefile:298: recipe for target 'vboxdrv' failed
make: *** [vboxdrv] Error 2


openSUSE421:~ # whereis kernel-source
kernel-source:

openSUSE421:~ # find kernel-source
find: ‘kernel-source’: No such file or directory

openSUSE421:~ # rcvboxdrv setup
Stopping VirtualBox kernel modules                                                                                                                                                                      done
Recompiling VirtualBox kernel modules                                                                                                                                                                   failed
  (Look at /var/log/vbox-install.log to find out what went wrong)

openSUSE421:~ # rpm -qa | grep -i virtualbox

openSUSE421:~ # rpm -qa | grep -i kernel
kernel-syms-4.1.17-3.1.gbedbb26.x86_64
kernel-syms-4.1.17-1.1.g0718627.x86_64
kernel-firmware-20150925git-1.1.noarch
kernel-xen-devel-4.2.3-2.1.g202286f.x86_64
kernel-default-4.3.0-1.1.g7b374a4.x86_64
kernel-syms-4.1.18-3.1.g94887d3.x86_64
kernel-default-devel-4.2.1-1.1.g9c7cacf.x86_64
kernel-xen-devel-4.2.0-7.1.g2d05727.x86_64
kernel-xen-devel-4.3.0-1.1.g7b374a4.x86_64
kernel-default-devel-4.1.17-6.1.g79b9217.x86_64
kernel-source-4.2.3-4.1.g549889b.noarch
kernel-xen-devel-4.1.13-5.1.x86_64
kernel-xen-devel-4.2.1-1.1.g9c7cacf.x86_64
kernel-devel-4.2.5-2.1.g0491388.noarch
kernel-default-devel-4.1.17-3.1.gbedbb26.x86_64
kernel-pv-devel-4.2.4-1.1.g6ae5577.x86_64
kernel-pv-devel-4.2.5-2.1.g0491388.x86_64
kernel-xen-devel-4.2.3-1.1.gef1562d.x86_64
kernel-devel-4.1.17-3.1.gbedbb26.noarch
kernel-pv-devel-4.2.3-4.1.g549889b.x86_64
kernel-source-4.1.12-1.1.noarch
kernel-default-4.2.3-5.1.gc229932.x86_64
kernel-default-devel-4.1.17-4.1.g9550abf.x86_64
kernel-default-devel-4.1.12-1.1.x86_64
kernel-default-4.3.0-2.1.g9a3f7f0.x86_64
kernel-xen-devel-4.2.4-1.1.g6ae5577.x86_64
kernel-xen-devel-4.2.3-5.1.gc229932.x86_64
kernel-pv-devel-4.2.3-1.1.gef1562d.x86_64
kernel-xen-devel-4.3.0-2.1.g9a3f7f0.x86_64
kernel-source-4.1.15-8.1.noarch
kernel-source-4.2.3-2.1.g202286f.noarch
kernel-xen-devel-4.1.18-3.1.g94887d3.x86_64
kernel-pv-devel-4.1.13-5.1.x86_64
kernel-pv-devel-4.2.5-1.1.g27d2719.x86_64
kernel-default-4.1.12-1.1.x86_64
kernel-pv-devel-4.1.17-4.1.g9550abf.x86_64
kernel-devel-4.1.13-5.1.noarch
kernel-xen-devel-4.2.5-2.1.g0491388.x86_64
kernel-default-4.2.3-2.1.g202286f.x86_64
kernel-source-4.2.3-1.1.gef1562d.noarch
kernel-macros-4.1.18-3.1.g94887d3.noarch
kernel-devel-4.2.2-4.1.gad49492.noarch
kernel-source-4.3.0-2.1.g9a3f7f0.noarch
kernel-pv-devel-4.2.3-2.1.g202286f.x86_64
kernel-pv-devel-4.1.18-3.1.g94887d3.x86_64
kernel-devel-4.2.5-1.1.g27d2719.noarch
kernel-pv-devel-4.2.0-7.1.g2d05727.x86_64
kernel-devel-4.1.17-1.1.g0718627.noarch
kernel-source-4.2.0-7.1.g2d05727.noarch
kernel-source-4.3.0-1.1.g7b374a4.noarch
kernel-syms-4.1.17-6.1.g79b9217.x86_64
kernel-xen-devel-4.2.2-4.1.gad49492.x86_64
kernel-devel-4.2.4-1.1.g6ae5577.noarch
kernel-default-devel-4.1.15-8.1.x86_64
kernel-default-4.2.3-4.1.g549889b.x86_64
kernel-pv-devel-4.1.17-3.1.gbedbb26.x86_64
kernel-default-4.1.15-8.1.x86_64
kernel-xen-devel-4.1.17-4.1.g9550abf.x86_64
kernel-xen-devel-4.1.17-6.1.g79b9217.x86_64
kernel-source-4.2.2-4.1.gad49492.noarch
kernel-xen-devel-4.1.12-1.1.x86_64
patterns-openSUSE-devel_kernel-20150918-12.1.x86_64
kernel-default-4.2.4-1.1.g6ae5577.x86_64
kernel-default-4.2.5-1.1.g27d2719.x86_64
kernel-devel-4.1.15-8.1.noarch
kernel-source-4.2.3-5.1.gc229932.noarch
kernel-xen-devel-4.1.15-8.1.x86_64
kernel-devel-4.1.17-4.1.g9550abf.noarch
kernel-xen-devel-4.1.17-1.1.g0718627.x86_64
kernel-default-4.1.13-5.1.x86_64
kernel-source-4.2.5-2.1.g0491388.noarch
kernel-devel-4.2.1-1.1.g9c7cacf.noarch
kernel-default-4.2.3-1.1.gef1562d.x86_64
kernel-xen-devel-4.2.5-1.1.g27d2719.x86_64
kernel-pv-devel-4.1.17-1.1.g0718627.x86_64
kernel-default-4.2.5-2.1.g0491388.x86_64
kernel-source-4.1.13-5.1.noarch
kernel-devel-4.2.3-4.1.g549889b.noarch
kernel-pv-devel-4.1.15-8.1.x86_64
kernel-devel-4.2.3-1.1.gef1562d.noarch
kernel-xen-devel-4.1.17-3.1.gbedbb26.x86_64
kernel-devel-4.1.17-6.1.g79b9217.noarch
kernel-devel-4.2.0-7.1.g2d05727.noarch
kernel-devel-4.3.0-1.1.g7b374a4.noarch
kernel-pv-devel-4.1.17-6.1.g79b9217.x86_64
kernel-xen-devel-4.2.3-4.1.g549889b.x86_64
kernel-pv-devel-4.2.2-4.1.gad49492.x86_64
kernel-pv-devel-4.1.12-1.1.x86_64
kernel-devel-4.1.12-1.1.noarch
kernel-devel-4.2.3-5.1.gc229932.noarch
kernel-pv-devel-4.3.0-1.1.g7b374a4.x86_64
kernel-devel-4.3.0-2.1.g9a3f7f0.noarch
kernel-source-4.2.4-1.1.g6ae5577.noarch
kernel-pv-devel-4.2.3-5.1.gc229932.x86_64
kernel-devel-4.1.18-3.1.g94887d3.noarch
kernel-default-devel-4.1.13-5.1.x86_64
kernel-source-4.2.5-1.1.g27d2719.noarch
kernel-default-devel-4.1.17-1.1.g0718627.x86_64
kernel-pv-devel-4.3.0-2.1.g9a3f7f0.x86_64
kernel-devel-4.2.3-2.1.g202286f.noarch
kernel-default-devel-4.2.0-7.1.g2d05727.x86_64
kernel-default-devel-4.1.18-3.1.g94887d3.x86_64
kernel-default-devel-4.2.2-4.1.gad49492.x86_64
kernel-source-4.2.1-1.1.g9c7cacf.noarch
kernel-syms-4.1.17-4.1.g9550abf.x86_64
kernel-pv-devel-4.2.1-1.1.g9c7cacf.x86_64
openSUSE421:~ # 


# uname -r
4.3.0-2.g9a3f7f0-default




do i need to run the given commands (Run ‘make oldconfig && make prepare’ on kernel src to fix it)
then where should i run this ?

or do i miss some packages ?

thanks :wink:

If you are running your compilation with the current kernel (4.3.0-2.g9a3f7f0-default apparently), you are obviously missing 4.3.0-2 versions at least of the following:
kernel-default-devel
kernel-syms
kernel-macros.

Be sure to have “Install recommended” set active, to ensure that other possibly missing matching packages are installed as well.

IMO
You should specify “kernel-devel” instead of “kernel-default-devel”
Generally, by not specifying a specific kernel flavor, the generic “kernel-devel” should automatically select the correct package for the detected kernel flavor. This might be more important if multiple kernels and kernel flavors are installed.

I’d also highly recommend running “zypper up” <after> installing all dependencies and <before> any script re-building kernel modules (like installing VBox) to verify and ensure internal system consistency… for example that the kernel version matches the kernel developer header versions.

TSU

Correct, generally speaking, but from the posted list of installed packages while I see** kernel-devel-4.3.0-2.1.g9a3f7f0.noarch**, I see no “kernel-default-devel” matching the currently running kernel.
My guess is that kernel-devel-4.3.0-2.1.g9a3f7f0.noarch was installed with “Install recommended” unset, or from a test repo ignoring dependencies.
Apparently, installing **kernel-source-4.3.0-2.1.g9a3f7f0.noarch **is no substitute.


openSUSE421:~ # rpm -qa | grep -i kernel
<snip>
kernel-default-4.3.0-1.1.g7b374a4.x86_64
kernel-xen-devel-4.3.0-1.1.g7b374a4.x86_64
**kernel-default-4.3.0-2.1.g9a3f7f0.x86_64**
**kernel-xen-devel-4.3.0-2.1.g9a3f7f0.x86_64**
**kernel-source-4.3.0-2.1.g9a3f7f0.noarch**
kernel-source-4.3.0-1.1.g7b374a4.noarch
kernel-devel-4.3.0-1.1.g7b374a4.noarch
kernel-pv-devel-4.3.0-1.1.g7b374a4.x86_64
**kernel-devel-4.3.0-2.1.g9a3f7f0.noarch**
**kernel-pv-devel-4.3.0-2.1.g9a3f7f0.x86_64**
<snip>

Taking a look at <https://software.opensuse.org/package/virtualbox&gt; the current “official” Oracle VirtualBox version for Leap 42.1 is 5.0.10 (or 5.0.8) {confusing}.
But, I can recommend to use the “Virtualisation” build version <https://build.opensuse.org/package/show?project=Virtualization&package=virtualbox&gt;: 5.0.14I must admit that I’m running the 5.0.14 version [Windows 10 inside] on 13.2 - no real experience with VirtualBox on Leap 42.1.

[Need to watch out for the Extensions updates with the upgrade from 5.0.10 to 5.0.14.]