VirtualBox Guest Additions on Fedora 34/33, CentOS/RHEL 8/7/6/5 - Comment Page: 13
This is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 34/33/32/31/30, CentOS 8.2/7.8/6.10/5.11, Red Hat (RHEL) 8.2/7.8/6.10/5.11.
VirtualBox Guest Additions is special software that can be installed inside Linux virtual machines to improve performance and make integration much more seamless. Among the features provided by these VirtualBox Guest Additions are mouse pointer integration and arbitrary screen solutions (e.g. by resizing the guest window).
Check video version of guide:
Watch More Videos and Subscribe to if-not-true-then-false.com Youtube Channel
Note: Fedora 34/33/32/31/30...
Great article.
On fedora 29 i had the same install issue as some posted before. The problem is the “/build” in the kernel path. Removing them fixed the issue.
KERN_DIR=/usr/src/kernels/`uname -r`
instead of
KERN_DIR=/usr/src/kernels/`uname -r`/build
Windows 10 Host – VirtualBox 6.0.6
Fedora 30 client
Had to install libxcrypt-compat so guest addtions would work correctly. Shared clipboard functionality stopped working after upgrading client to Fedora 30.
Error message in /var/log/vboxadd-setup.log after attempting to reinstall guest additions:
VBoxClient: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
Here is the relevant doc from the Fedora Project’s website talking about changes to libcrypt:
https://fedoraproject.org/wiki/Changes/FullyRemoveDeprecatedAndUnsafeFunctionsFromLibcrypt
Followed all steps successfully, unfortunately, copy & paste between host(Windows 7 Ultimate) and guest(Fedora 30) does not work. Display settings are not saved
on Fedora 30, the final step (6) is failing because libcrypt.so.1 is missing (replaced by libcrypt.so.2)
To make it work, an additional step will be to install libcrypt first:
dnf install libxcrypt-compat.x86_64
Thanks, added to guide.
Windows 10 Host – VirtualBox 6.0.6
Fedora 30 client
these are the steps that I run to install VB Additions 6.0.6 and automounted Shared Folders
= dnf install libxcrypt-compat.x86_64
= uname -r
= rpm -q kernel-devel
= dnf install kernel-devel
mounted VBox_GAs_6.0.6.iso
= ./VBoxLinuxAdditions.run
reboot
Shared Folders defined in VM manager Fedora 30 UI got automounted after reboot
= sudo usermod -aG vboxsf $(whoami)
= modprobe -a vboxguest vboxsf vboxvideo
————
other useful info that may help
https://stackoverflow.com/questions/28328775/virtualbox-mount-vboxsf-mounting-failed-with-the-error-no-such-device
Thanks, added to guide.
My output looks like this ;
[[email protected] VirtualBoxGuestAdditions]# ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 6.0.4 Guest Additions for Linux……..
VirtualBox Guest Additions installer
This system appears to have a version of the VirtualBox Guest Additions
already installed. If it is part of the operating system and kept up-to-date,
there is most likely no need to replace it. If it is not up-to-date, you
should get a notification when you start the system. If you wish to replace
it with this version, please do not continue with this installation now, but
instead remove the current version first, following the instructions for the
operating system.
If your system simply has the remains of a version of the Additions you could
not remove you should probably continue now, and these will be removed during
installation.
Do you wish to continue? [yes or no]
y
touch: cannot touch ‘/var/lib/VBoxGuestAdditions/skip-5.1.6-300.fc30.x86_64’: No such file or directory
Copying additional installer modules …
Installing additional modules …
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules. This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup
VirtualBox Guest Additions: Building the modules for kernel
5.1.6-300.fc30.x86_64.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what
went wrong
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the modules for kernel
5.1.6-300.fc30.x86_64.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what
went wrong
VirtualBox Guest Additions: modprobe vboxsf failed
You, sir, are a prince among men.
why not ?
dnf install virtualbox-guest-additions
for example: https://bugzilla.redhat.com/show_bug.cgi?id=1695377#c7
also take a look on https://bugzilla.redhat.com/show_bug.cgi?id=1723568 this is not the method anymore
Hi Sergio,
If you look Note on this guide, then you should understand why this guide exists, you can only use
dnf install virtualbox-guest-additions
on Fedora 30/29/28 and only latest version is available, if you want install testbuilds or earlier versions then you have to build modules using original installer. And VirtualBox Guest Additions is not available on Red Hat or CentOS at all.CentOS 7:
VBoxClient: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
modprobe vboxguest failed
Hello,
Try latest development version instead, looks like 6.0.13 build normally. https://www.virtualbox.org/wiki/Testbuilds
Thanks a lot, this really helped me!
All the steps here are correct :)
screen shot of error received when running Step 4 (## CentOS 7 and Red Hat (RHEL) 7 ##)
https://www.screencast.com/t/zcTPbHCH0Cl5
Any direction much appreciated
Sudsy
Hi Sydsy,
You don’t have active RHEL subscription. You have to active it first if you want use packages from RHEL repos.
Alternatively you can install and use CentOS, where you can get pretty much same Linux without support.
Using CentOS 8 with kernel 5.3.7-1.el8.elrepo.x86_64. When attempting to install ‘gcc’ it wants to install ‘kernel-headers’ from 4.18 even though I’ve already install ‘kernel-ml-headers’.
If I try to proceed it errors out saying that ‘kernel-headers’ conflicts with ‘kernel-ml-headers’
I’ve searched but cannot find a solution. Any thoughts?
Hi Allan,
If I understand right how ELRepo kernels works, then you have to remove kernel-ml-headers and install kernel-headers package instead. You need also kernel-ml-devel package.
This is described on ELRepo page:
There is no need to install the kernel-ml-headers package. It is only necessary if you intend to rebuild glibc and, thus, the entire operating system. If there is a need to have the kernel headers installed, you should use the current distributed kernel-headers package as that is related to the current version of glibc.
When you see a message like “your kernel headers for kernel xxx cannot be found …”, you most likely need the kernel-ml-devel package, not the kernel-ml-headers package.
This method does not work for RHEL 8.
Hi bittricks,
What problems you have with RHEL 8?
Hi
I have been followiny your method for years.I’ve upgraded to F31 and know Virtualbox does not open in wayland
doing some research it is the qt5 files that are not required. How to remove qt5-qtx11extras that are no longer in your F31 procedure.
Thanks
Rob
Hi Robert,
Thanks for following.
Just checked this post (VirtualBox Guest Additions) version history and I can’t see any qt5 files as dependency, but VirtualBox install guide have qt5-qtx11extras as dependency. I haven’t tested it with F31 yet, but testing now.