VirtualBox on Kernel 5.4.x
Hi,
Virtualbox 6.0.14 kernel modules did not compile against the latest 5.4.x kernel in slackware-current. The attached patch worked for me. There are multiple copies of cdefs.h and the-linux-kernel.h, os if your copies aren't hard linked, you may have to copy the patched file over the other copies. More details can be found here: https://www.virtualbox.org/ticket/18...=0&cnum_hist=2 I note there are other builds on the VB site that that fix this, too. Cheers, ===Rich Code:
diff -ur vboxhost.old/vboxdrv/include/iprt/cdefs.h vboxhost/vboxdrv/include/iprt/cdefs.h |
Kudos to you @rahrah! For pointing out the upstream discussion, for the patch which have worked great and for bringing my dev env back on duty.
Others have pointed that VirtualBox 6.0.15 testbuild also worked with kernel 5.4.1. But to install a testbuild one need to uninstall the stable one then install the testbuild. Once the stable build is released from the testbuild, then the testbuild should also be uninstalled so the stable can be installed again. Too much hassle... The patch you suggest does the job for VirtualBox 6.0.14 with no testbuild involved, which is a much more elegant solution IMHO. For future reference, to apply the patch, copy de contents of the OP, save to "/opt/VirtualBox/src/vboxhost/kernel541.patch" then run: Code:
# cd /opt/VirtualBox/src/vboxhost |
Pleased it worked out for you!
===Rich |
https://www.linuxquestions.org/questions/slackware-14/virtualbox-on-kernel-5-4-x-4175665409
Thanks a lot, Rahrah!
The patch works fine with vbox 6.0.14 and kernel 5.4.1 |
@denydias
Quote:
just install 6.0.15 over 6.0.14. No need to uninstall first old (stable) and install next a new version (testbuild) and then when it come repead uninstall/install with new stable version. |
The above patch appears to be written for the host.
I think I've got this problem on a guest. Is their a patch readily available for the guest or do I need to hack the patch? Alex |
I decided to download https://www.virtualbox.org/download/....15-135274.iso
Problem fixed. Will try and remember to uninstall/install 6.0.15 when it comes out of test. |
Quote:
Installing Linux test builds Test builds for Linux hosts are generally packed up in a shell script installer with the extension ".run". To install them, you first need to remove your existing VirtualBox installation (but not your virtual machines - they will continue to work with the test build) and then execute the installer. To remove the test build again, execute the installer with the parameter "uninstall" on the command line. Edit: btw, I tried to install 6.0.15 testcase on top of 6.0.14 stable without uninstalling it first. It doesn't worked for me tough. |
Quote:
|
I followed the uninstall/install route. It eventually worked for me.
On two guests the uninstall took about 20 minutes to run. When finished it appeared to have removed a lot more than what I was expecting. I got ktown installed on these failing VirtualBox hosts. I'd lost the following -
A sorry mess. At this stage I thought I should try to reinstall the kernel packages by running Code:
slackpkg reinstall kernel* Rebooted and all the above problems went away, though when I booted to init 4 just got a black screen. Booted to init 3 which now allowed me to
Rebooted to init 4 everything now in working order. |
Quote:
attached VBoxGuestAdditions_6.0.15-134636.iso through VM host to all VM clients (3xlinux, and Windows 8.1, BSDs either do not support VB or require different setup for the upgrade) start VM client mount iso from iso run sudo sh VBoxLinuxAdditions.run Installer automatically removed previous version of VBoxGuestAdditions and installed new (6.0.15) version. reboot That is all, took 5 min without any issues. I run VM on a 5yrs old laptop and VM host is Slackware-current, though I doubt that distro matters. I don't know why @aikempshall have so much trouble or why @denydias could not update VM host without uninstalling previous version first (this actually seems fishy). Unless you are running VM installation from sbo, I don't see why you would have so much problems. |
Quote:
Maybe, and just maybe, VirtualBox 6.0.15 is a testbuild at this moment because the varying results it produces. Also maybe, and just maybe, the definition of testbuild is something that works for you in a different way that works for others. |
Quote:
For me it could have been because of one or more of these -
Agreed should be a short task and complete without issue. In Slackware we seem to be ahead of the crowd here - no complaints. The post I'm sure will help people. I'd never heard of testcase VBoxGuestAdditions builds before. Certainly helped me. Don't know how many minutes it took me on the final guest, it wasn't long. |
virtualbox on kernel 5.4.xx
Quote:
Thank you both, rahrah and denydias: with your patch and instructions, now VirtualBox 6.0.14 play very very well for me. |
Just thought I'd throw this in. I running VirtualBox Version 6.1.0 r135406 with kernel 5.4.3 no issues. This is on a Slackware64-current host and using a clean Slackware64-current guest. I previously had testing 6.0.15-135299 installed.
|
For as long as I have been using it, installing VirtualBox from the .run file "for all distributions" first removes the old installation from /opt/VirtualBox and that has not changed. Moreover, it unconditionally uninstalls it, whether upgrading or downgrading, it runs the uninstaller.
What the advice is probably trying to cover is VirtualBox installed from another source. You wouldn't want to have, say, a clever distro package (or their rpms or debs) installed then use their .run file to install the official binaries to /opt. |
If you have shares to access them easily don't forget to
sudo adduser <username> vboxsf If it fails the guest additions are not in place do shutdown -r 0 If adduser works also do a shutdown -r 0 This needs to be done. This will fix your shares, screen resolution, mouse integration <copy/paste> Ken |
Works on other Linux distros as well!
I registered to give a big Thank You to the OP. I had the issue that the 6.0.14 virtualbox kernel modules would not build for Linux kernel 5.4.10 on Artix Linux (Arch without systemd). While the kernel modules would build for Virtualbox 6.1.0, this is a no-go for me as the new VboxSVGA driver simply does not work for my Windows 7 virtual machines (3D acceleration completely broken for me).
The patch here worked like a charm! |
|
All times are GMT -5. The time now is 07:28 PM. |