VirtualBox on sc64's Kernel 5.10.x
Hi,
Virtualbox 6.1.16 kernel modules did not compile against the latest 5.10.x kernel in slackware64-current. The attached patch worked for me. More details can be found upstream, here: https://www.virtualbox.org/ticket/20055 with the patch here: https://www.virtualbox.org/raw-attac...j-fix-r0.patch sha1: ee313af087310b4d2f7126fb74710360c9f1fddf The 6.1.17 testbuild (as others have pointed out) is available here: https://www.virtualbox.org/wiki/Testbuilds This is a patch for 5.10.x as a host. Guests running 5.10.x kernels with VB Guest Additions, may need further tweaking. Look at Sérgio Basto's comment #12 (and following) at the link above. Sergio (sergiomb2 on github) has a nice git clone of the VB repo, which seems to be up to date. The patch at: https://github.com/sergiomb2/Virtual...5fb495e2d04e97 (the patch now in the vb svn trunk) is substantially similar to the one attached here, but for a comment: Code:
/** @def IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC Code:
- uint32_t idxPg = (uAddr - (unsigned long)pMemLnx->Core.pv) >> PAGE_SHIFT; I haven't tested any vb guest running 5.10.x with vb guest additions. I have tested a Slackware-current guest with the standard, vboxsf, vboxguest, vboxvideo, in tree kernel based modules: most things substantially work. Just load the modules (you may need to kick them into action with an xradr -s trickery). For full functionality, you might have to mess with the guest addition scripts, a little so as not to attempt to build the already built in-tree modules. Cheers, ===Rich File: linux-5.10-r0drv-memobj-fix-r0.patch Code:
Index: src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c |
the problem with VB development and testbuilds is that all this randomly crashes VB client kernel (at boot time) 5.10.x (no problems with VB host)
Is you patchset better in the terms of VB client stability? |
Hello,
Firstly, 'my patchset' is *not* mine! I just lifted it from the VB ticket site. I take no credit for the code. I've run vb for a couple of days with this one patch. I have had no stability issues with a Slackware64-current host running Pat's 5.10.4 generic kernel with any of these guest OSs: Linux Mint 20.0 running: 5.8.0-33-generic kernel and VB 6.1.16 guest additions. Ubuntu 20.04 running 5.4.0-59-generic kernel and VB 6.1.16 guest additions. Slackware64-current running: 5.10.4 generic kernel with NO guest additions installed.** Windows 10 with VB 6.1.16 guest additions. ** I have experimented with with VB 6.1.16 guest additions under a slackware64-current snapshot, but kept the kernel modules from Pat's kernel (ie Linus' release kernel with no 3rd party code, and no VB module code from the VB guest additions package). I had no crashes, but didn't test extensively. I could provoke no crashes; I had VB file sharing, screen resizing working, under xfce and kde. If you are having stability problems, I'd be interested to know: What graphics chipset your host is running? Have you enabled 3D Acceleration (generally not good)? What VB video driver you are using? Can you reproduce the 'random' crashes with any sort of consistency (is there any way you can exacerbate the crashes)? ===R |
Quote:
If I get a free moment or two I will try applying the patch. Alex |
ok, so instead of patching, just download dev/test from VirtualBox site.
my VB host (Slackware-current) runs 5.10.x VB clients (e.g. Slackware-current, Gentoo, antiX Artix, Venom) run without issues 5.10.x as long as VirtualBox additions are not installed. Adding VB additions makes kernel unstalble. This situation is long known. |
Quote:
With 5.10.6 and VBoxGuestAdditions_6.1.16 installed I was getting this error recorded in file /var/log/vboxadd-setup.log Quote:
as root
Now get this error recorded in /var/log/vboxadd-setup.log Quote:
Was there anything else I was supposed to do? Alex |
I don't know if the stable release supports the 5.10.x kernel yet, but the testbuilds should. Here's the link for Guest additions v6.1.17-141968
|
Hi,
== Intro The patch above is for the *host*, it is *not* for the guests. I've included more instructions, below, on how to use the patch for the host. The rationale for the patch is to compile virtualbox 6.1.16 host drivers. This obviates use of test build which has *many* patches and may be unstable. It *only* patches one file. That's all you need to get vb 6.1.16 going as a host on 5.10.x kernels. That said, here's a bit on Slackware guests. I've also included full instructions on patching. == VB Guests Linux, the kernel at least, runs fine under vb without any other additions. However, for added functionality, VB provides guest additions. The file, VBoxLinuxAdditions.run contains and installs, amongst other stuff, i) user programs to allow certain functions (like screen resizing under X, file sharing between guest and host, and shared clipboard), and ii) source for kernel modules for the *guest* kernel. These guest kernel modules provide the kernel support for the functions in i). The kernel modules are: vboxguest.ko vboxvideo.ko and vboxsf.ko. Before some kernel revision (5.6 perhaps???) vboxsf.ko and vboxvideo.ko were not included in the mainline kernel. With kernel 5.10.x, (and maybe 5.9.x??) all three modules are in the kernel. The code bases between what's in the VBoxLinuxAdditions.run and the mainline kernel might be different, but some versions of those modules are now in the kernel. So, my assumption is don't bother with with the installation of the kernel modules included in the VBoxLinuxAdditions.run script, just install the other stuff, and most things will work. On installation of VBoxLinuxAdditions.run, all the other stuff will be installed, you'll get the error message when the installer tries to install the kernel modules, but it doesn't matter. Guest additions should still work. To stop the errors, just do this at the command prompt: Code:
export INSTALL_NO_MODULE_BUILDS=true Code:
./VBoxLinuxAdditions.run Code:
export INSTALL_NO_MODULE_BUILDS=true Code:
export LC_ALL=C Code:
/etc/rc.d/init.d/vboxadd Then restart the guest. Everything seems to work bar drag and drop (which, I never use). == VB Hosts Getting hosts going with vb 6.1.16 whilst running 5.10.x kernels was the main purpose of my original post. Here's it is again in more detail. This has only been tested for 5.10.x and vb 6.1.16 only. Check the integrity of the patch Code:
sha1sum linux-5.10-r0drv-memobj-fix-r0.patch Code:
cd /opt/VirtualBox/src/vboxhost/vboxdrv Code:
Hmm... Looks like a unified diff to me... If that doesn't happen then the something is wrong with the patch or command. That command was a dry run, it didn't actually patch the files. ### Once you have checked that the patch works, patch for real with this command: Code:
patch -p3 --verbose --backup < path_to_patch/linux-5.10-r0drv-memobj-fix-r0.patch Now run: Code:
cd /opt/VirtualBox/src/vboxhost Code:
ls -la /lib/modules/5.10.6/misc Code:
-rw-r--r-- 1 root root 732928 Jan 10 15:10 vboxdrv.ko You can then just do Code:
sh /opt/VirtualBox/vboxdrv.sh start Then start vb and you are away. You will have to run: Code:
sh /opt/VirtualBox/vboxdrv.sh start Cheers, ===Rich |
On my guest using the 5.10.7 kernel without VBoxGuestAdditions I
Would like to get copy/paste working. This worked well before the 5.10.x kernels but I had to install VBoxGuestAdditions. So followed rahrah's instructions for VB Guests Quote:
Used VBoxGuestAdditions_6.1.17-141968.iso. Didn't get any error messages. My guest is running 5.10.7 kernel with VBoxGuestAdditions-6.1.17. I get the shares as expected. I get this
Alex |
Hi,
It was not my intention to post regarding test builds. It was only my intention to post regarding getting vb 6.1.16 going on 5.10.x kernels. I hadn't tested any of the test builds. There are far too many patches for my liking. VB is a part of my daily workflow and stability is important. It was my intent to just show the patch for getting 6.1.16 going on later host kernels on sc. All the stuff I posted re VB Hosts was for 6.1.16. When the next release comes out, I'll dump the patch and go with mainline. Yesterday, I successfully replicated your issue regarding shared files. Consequently, I would strongly advise you not to mix the stuff I posted here with any test build stuff, unless you are on a snapshot and/or only want to test. Use the test builds in their entirety, or use 6.1.16 as per this post. I could not replicate your clipboard problem: the bidirectional cut and pasting worked fine for me using the test build method you describe. I would agree with the point, should it be made, that the in kernel modules might not be fully compatible with later guest addition software. But while the test of test build may corroborate that, it doesn't prove it. The in kernel guest modules do seem to be compatible with 6.1.16 guest additions. For me, there's no need or wish to use test builds. All I want is a working system. I get that with sc and vb 6.1.16 with the patch in the original post. The guest addition chicanery was really just a kludge just to demonstrate that 6.1.16 guest additions work with *existing* in kernel modules. Cheers, ===Rich |
6.1.18 is now out, which should be working out of the box with 5.10.x
|
Quote:
Alex |
All times are GMT -5. The time now is 03:59 AM. |