Install VirtualBox Guest Additions on Rocky Linux 8

|
Last Updated:
|
|

In this tutorial, you will learn how to install VirtualBox guest additions on Rocky Linux 8. In our previous guide, we learnt how to Install Rocky Linux 8 on VirtualBox. However, it doesn’t display in full-screen view by default.

Installing VirtualBox Guest Additions on Rocky Linux

The Guest Additions offer the following 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.

Install Kernel Headers and Required Build Tools

After mounting ISO file, be sure to install the kernel headers and required build tools. Some of the required tools are available on the EPEL repos, hence begin by installing the EPEL repos on Rocky Linux 8

dnf install epel-release -y

Next, install the kernel headers and build tools by executing the command below;

dnf install dkms kernel-devel kernel-headers gcc make bzip2 perl elfutils-libelf-devel

Next, ensure that the version of kernel-devel installed does match the version of your running kernel. You can verify by running the commands below.

rpm -q kernel-devel

Sample output;

kernel-devel-4.18.0-240.22.1.el8.x86_64
uname -r

Sample output;

4.18.0-240.22.1.el8.x86_64

If they do not match, update your kernel by running;

dnf update kernel-*

Next, reboot the system and verify the kernel versions again.

Install VirtualBox Guest Additions

VirtualBox guest additions can be installed via the command line or via GUI.

We will only discuss how to install VirtualBox guest additions via command line interface for now.

VirtualBox guest additions via Command Line

Check the current version of your VirtualBox on your host;

VBoxManage --version

Sample output;

6.1.22r144080

Download VirtualBox Guest Additions ISO file of the same version as your installed VirtualBox.

wget http://download.virtualbox.org/virtualbox/6.1.22/VBoxGuestAdditions_6.1.22.iso -P /tmp

Mount the guest addition iso under the /run/media/ directory.

mount /tmp/VBoxGuestAdditions_6.1.22.iso /run/media/

Next, navigate to the mount directory and execute the Linux guest addition installer

cd /run/media/
./VBoxLinuxAdditions.run

Or simply run;

/run/media/VBoxLinuxAdditions.run

Reboot Rocky Linux 8

Once the installation completes, reboot the system to effect the changes.

When the system boots, you should be on full-screen view.

If the system do not auto-resize the screen, toggle it on the VM menu by clicking View > Auto-resize Guest Display.

And there you go.

Install VirtualBox Guest Additions

Congratulations. You have successfully set the Rocky Linux 8 full-screen display on VirtualBox.

You can now enable other features such as shared clipboard, drag and drop between the host and virtual machine.

Other Tutorials

Install VirtualBox Guest Additions on Ubuntu 21.04

Install VirtualBox Guest Additions on Kali Linux 2020.3

Install VirtualBox Guest Additions on Fedora 31/32

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

Leave a Comment