In this guide, we are going to learn how to install VirtualBox Guest Addition on Fedora 31/32. When installed on a VirtualBox, Fedora VM doesn’t display in full-screen view by default neither does the vm support other important features. VirtualBox Guest additions provides quite a number of features;
- Mouse pointer integration
- Shared folders for easy sharing of files between the host and the guest
- Ensures better and accelerated video performance.
- Seamless windows integration
- Generic host/guest communication channels that enables you to control and manage guest execution.
- Provides Host-Guest time synchronization.
- Shared clipboard between host and guest vm.
- Automated logins.
Read more on VirtualBox Guest addition features on the VirtualBox User Manual.
Installing VirtualBox Guest Additions on Fedora
Add an Empty Optical Drive to VM
In order to be able to install the Guest Additions, ensure that you have an empty optical drive attached to the virtual machine.
Install Kernel Headers and Required Build Tools
Installation of VirtualBox guest additions requires that the kernel headers for the target system kernel be installed. To simplify kernel upgrades, you need to install Dynamic Kernel Module Support (DKMS).
Therefore, run the command below to install DKMS, Kernel development package and other required build tools;
dnf install dkms kernel-devel gcc make bzip2 perl
Verify Installed Kernel Headers
Once the installation of the kernel build tools above is done, verify that the version of the running kernel headers matches the version of the installed kernel development (kernel-devel
) tool installed.
To check the version of the running kernel;
hostnamectl | grep Kernel
Kernel: Linux 5.3.7-301.fc31.x86_64
Check version of installed kernel;
rpm -qa kernel-devel
kernel-devel-5.5.11-200.fc31.x86_64
If the versions match, proceed to install VirtualBox guest additions.
If they do not match as in our case above, update your kernel headers;
dnf update kernel-*
Once the update is done, reboot the system and re-verify the kernel versions;
uname -r
5.5.11-200.fc31.x86_64
rpm -qa kernel-devel
kernel-devel-5.5.11-200.fc31.x86_64
Installing VirtualBox Guest Additions on Fedora
You can now proceed to install Guest Additions on your VM. The installation can be done from the terminal or from the graphical user interface.
Install Guest Additions via the GUI
Click Devices > Insert Guest Additions CD image on the VM Menu bar to mount the VirtualBox guest addition disk file.
You are prompted whether to automatically run the installation.
Click Run. Authorize the installation by authenticating as the user with privileges to run the installer to proceed with installation.
Restart the system to apply the changes by clicking on the dropdown button at the top right corner close to the battery icon > power button > restart system.
And boom, you are now on Fedora 31/32 full screen on VirtualBox.
Install Guest Additions via the Terminal
To install VirtualBox guest additions via the terminal, insert the Guest Addition iso file as done above and when prompted on whether to automatically run the installation, simply cancel the installer.
Next, mount the guest additions iso file on your preferred directory, for example, /run/media/
.
mount /dev/cdrom /run/media/
This will mount the guest addition installers under the /run/media/
directory.
ls /run/media/
AUTORUN.INF NT3x TRANS.TBL VBoxLinuxAdditions.run VBoxWindowsAdditions.exe
autorun.sh OS2 VBoxDarwinAdditions.pkg VBoxSolarisAdditions.pkg VBoxWindowsAdditions-x86.exe
cert runasroot.sh VBoxDarwinAdditionsUninstall.tool VBoxWindowsAdditions-amd64.exe
Execute the Linux Guest Additions installer;
/run/media/VBoxLinuxAdditions.run
Once the installation completes, restart the system to effect the changes. When the system boots, you should now be on full screen.
That marks the end of our guide on how to installing VirtualBox Guest Additions on Fedora.
Related Tutorials
Install VirtualBox Guest Additions on Ubuntu 20.04
Install VirtualBox Guest Additions on CentOS 8
Thank you so much for writing this! I was struggling with trying to get VirtualBox installed as a host in Fedora for hours. It turned out that the version of kernel-headers was more recent than the actual kernel running, so running dnf update kernel-* fixed it.
Hi
I am trying linux, Iam new user, I have some problemms to install anything in Fedora 32, virtualbox 6.1.6.
Any command I give, command not found.
sudo, sudo dfn, sudo install, sudo cp, etc.
Will you please help me to update the system, install samba?
Are there a list of commands for Fedora 32, 64 bits?
I thank you in advance. Please excuse my english
Best regards,
Lino Mota
Hello Lino, what do exactly want to do?
As of this date, the recent kernel for Fedora 32 Workstation, it 5.7.11-200.fc32.x86_64