The back story: I’m setting up a new laptop for evaluation. Unfortunately the hardware is very new (Kabylake, UHD, etc), and I was unable to get it usable on the default kernel (4.4). Tried 4.8, 4.10, 4.11 with limited success, but it works right out of the box with 4.12.
My problem: The last remaining issue is getting Win 10 running in a Virtualbox VM (This is a must. Dual boot or KVM isn’t an option). When I try to start loading Win 10 I get an error message indicating the need to run vboxconfig. Here’s what I’ve got so far.
linux-d3-360:~ # vboxconfig
Installing all required packages...
Building kernel modules...
Build of VirtualBox host kernel modules failed.
Look at /var/log/virtualbox.log to find reasons.
linux-d3-360:~ #
virtualbox.log shows
=== Building ‘vboxdrv’ module ===
make[1]: Entering directory ‘/usr/src/kernel-modules/virtualbox/src/vboxdrv’
make KBUILD_VERBOSE= SUBDIRS=/usr/src/kernel-modules/virtualbox/src/vboxdrv SRCROOT=/usr/src/kernel-modules/virtualbox/src/vboxdrv CONFIG_MODULE_SIG= -C /lib/modules/4.12.4-1.g2a27bf2-default/build -j4 modules
make[2]: Entering directory ‘/usr/src/linux-4.12.4-1.g2a27bf2-obj/x86_64/default’
make[3]: Entering directory ‘/usr/src/linux-4.12.4-1.g2a27bf2-obj/x86_64/default’
make[3]: *** …/…/…/linux-4.12.4-1.g2a27bf2: No such file or directory. Stop.
make[3]: Leaving directory ‘/usr/src/linux-4.12.4-1.g2a27bf2-obj/x86_64/default’
Makefile:24: recipe for target ‘__sub-make’ failed
make[2]: *** [__sub-make] Error 2
make[2]: Leaving directory ‘/usr/src/linux-4.12.4-1.g2a27bf2-obj/x86_64/default’
Makefile:305: recipe for target ‘vboxdrv’ failed
make[1]: *** [vboxdrv] Error 2
make[1]: Leaving directory ‘/usr/src/kernel-modules/virtualbox/src/vboxdrv’
Makefile:40: recipe for target ‘all’ failed
make: *** [all] Error 2
To my inexpert eye it looks like I"m missing a directory, but…
linux-d3-360:~ # ls /usr/src/linux-4.12.4-1.g2a27bf2-obj/x86_64/default/
.config .kernel-binary.spec.buildenv Makefile Module.supported Module.symvers arch include scripts tools
linux-d3-360:~ #
You should also post whether you installed Virtualbox by downloading the install from the Oracle website or if you installed from the openSUSE repositories. If you installed from the openSUSE repos, you shouldn’t need to build any modules, a pre-compiled kernel should be provided to you with all that’s necessary.
As for building kernel modules, you need
The kernel-devel package for your kernel. Technically, it should be the exact package for your kernel but I’ve been successful in the past with only the generic package by running the following in an elevated console
zypper in kernel-devel
You need to install the usual C build tools… the following are most important
I should have included that info. Installed from the openSUSE repos. I stopped downloading from Oracle a long time ago. It’s just easier from the repos, and I can’t tell the difference in my usage.
Usually updating your system resolves these kinds of kernel inconsistencies.
In fact, updating your system should be a SOP before major system changes like installing Virtualbox, and only rarely afterwards
If you prefer the Virtualbox app from the Virtualization repo, don’t remove the repo.
The repo is probably providing more than just the Virtualbox modified kernel.
I’m running virtulabox installed from the leap updates repo btw
So I can see that the kernel-default version is a newer version than the virtualbox-host-kmp-default package, what I don’t know is where to get the correct version of virtualbox-host-kmp-default
If that’s even the best way to go about fixing this
Be much appreciated if anyone’s able to point me in the right direction
Stuff like sound are usually related to Guest Tools/Additions.
So, if you create an openSUSE Guest, those should be installed automatically and there shouldn’t be a problem.
If you create any other distro or a Windows Guest,
Then you’ll probably have to install drivers manually.
I have virtualbox-guest-kmp-default, virtualbox-guest-tools and virtualbox-guest-X11 installed in the Leap 42.3 vm, and I also installed the Extension Pack from the Virtualbox website in a bid to get usb and sound support working (vbox was asking for it)
I’m using vbox from the Virtualization repo because I couldn’t get the vbox guest additions to install in any opensuse vm using the virtualbox rpm from their website, though I’m going to try their rpm again as I’ve discovered a possible cause for the guest additions failure with their rpm, on my system etc/init.d/vboxdrv did not get installed so I added a symlink in /etc/initit.d pointing to /usr/lib/virtualbox/vboxdrv.sh
Plan on seeing if that solves the problem after work tonight