Install VirtualBox Guest Additions on AlmaLinux

|
Last Updated:
|
|

Follow through this tutorial to learn how to install VirtualBox guest additions on AlmaLinux. We are installing the VirtualBox Guest additions on AlmaLinux Desktop.

Installing VirtualBox Guest Additions on AlmaLinux

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

A successful installation of kernel headers on AlmaLinux requires kernel headers and other build tools. Thus, 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 AlmaLinux

dnf install epel-release -y

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

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

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

rpm -q kernel-develuname -r
kernel-devel-5.14.0-162.18.1.el9_1.x86_645.14.0-162.6.1.el9_1.x86_64
compare kernel version numbers

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

dnf update kernel-*

Next, reboot the system;

sudo systemctl reboot -i

and verify the kernel versions again.

rpm -q kernel-develuname -r
kernel-devel-5.14.0-162.18.1.el9_1.x86_645.14.0-162.18.1.el9_1.x86_64
compare kernel version numbers

Installing VirtualBox Guest Additions on AlmaLinux

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

Install VirtualBox Guest Additions via GUI

To install VirtualBox guest additions via GUI, on the VM menu, click Device > Insert Guest Additions CD Image

Install VirtualBox Guest Additions on AlmaLinux

The installer then prompts you whether to run it.

Install VirtualBox Guest Additions on AlmaLinux

Confirm the same and proceed to install VirtualBox guest additions;

Once the installation is done, reboot the system;

sudo systemctl reboot -i

Install VirtualBox Guest Additions via Command Line

Check the current version of your VirtualBox on your host;

VBoxManage --version

Sample output;

7.0.6r155176

On the AlmaLinux vm, download VirtualBox Guest Additions ISO file of the same version as your installed VirtualBox.

wget http://download.virtualbox.org/virtualbox/7.0.6/VBoxGuestAdditions_7.0.6.iso -P /tmp

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

sudo mount /tmp/VBoxGuestAdditions_7.0.6.iso /run/media/

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

cd /run/media/
sudo ./VBoxLinuxAdditions.run

Or simply run;

/run/media/VBoxLinuxAdditions.run

Sample installation output;

Verifying archive integrity... All good.
Uncompressing VirtualBox 7.0.6 Guest Additions for Linux  100%
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
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 <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 
5.14.0-162.18.1.el9_1.x86_64.

Reboot AlmaLinux

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.

auto resize guest display

And there you go.

Congratulations. You have successfully set the AlmaLinux full-screen display on VirtualBox.

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

That concludes our guide on installing VirtualBox Guest Additions on AlmaLinux.

Other Tutorials

Install VirtualBox Guest Additions on Kali Linux 2021.3

Install VirtualBox Guest Additions on Debian 11

Install VirtualBox Guest Additions on Rocky Linux 8

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
Kifarunix
Linux Certified Engineer, with a passion for open-source technology and a strong understanding of Linux systems. With experience in system administration, troubleshooting, and automation, I am skilled in maintaining and optimizing Linux infrastructure.

Leave a Comment