HOW TO INSTALL VIRTUALBOX GUEST ADDITIONS ON CENTOS 9

Published: July 15, 2023 (Updated: Jul 15, 2023)

Enjoying this content? Subscribe to the Channel!

Maximize Your CentOS 9 Experience: How to Install VirtualBox Guest Additions (and Get Fullscreen!)


Hi there, tech enthusiasts! Darren O’Neil here from Darren’s Tech Tutorials.

If you’re running CentOS 9 Stream inside Oracle VirtualBox, you know the pain: a tiny window resolution, jerky mouse movements, and generally feeling like your powerful Linux distribution is trapped in a postage stamp.

The solution? VirtualBox Guest Additions.

Guest Additions are essential drivers and system applications that create a seamless bridge between your virtual machine (CentOS 9) and the host environment (VirtualBox). Once installed, you unlock features like dynamic screen resizing (hello, fullscreen!), shared clipboards, and better overall performance.

Ready to liberate your CentOS 9 VM? Follow this simple, step-by-step guide!


Prerequisites

Before we start, make sure you have:

  • A running installation of CentOS 9 Stream in VirtualBox.
  • An active internet connection within your CentOS VM.
  • Sudo access (you’ll need your password handy).

Step 1: Update Your CentOS 9 System

Before installing any new packages or kernel modules, it is absolutely critical that your system is fully up to date. This ensures compatibility and avoids potential errors during the installation of kernel headers.

Open your Terminal and run the following command:

sudo yum update

Enter your password and press Y when prompted to confirm the update process. This may take a few minutes depending on how recently your VM was installed.

Step 2: Install the EPEL Repository

Many essential Linux tools and packages required for compiling the Guest Additions software aren’t available in the default CentOS repositories. We need to install the Extra Packages for Enterprise Linux (EPEL) repository.

Run this command in the Terminal:

sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

Confirm the installation when prompted.

Step 3: Install Required Build Packages (GCC, Kernel Headers, etc.)

VirtualBox Guest Additions are not just simple applications; they often require compiling kernel modules specific to your running system. For this compilation to happen successfully, we need the build tools (make) and the C compiler (gcc), along with the current kernel development headers.

Install these dependencies by running:

sudo yum install gcc kernel-devel kernel-headers make bzip2 perl

Press Y to confirm the installation of these necessary packages. This is usually the longest step, so grab a coffee!

Step 4: Mount and Run the Guest Additions CD Image

Now that our CentOS system is fully prepped with all the necessary dependencies, we can load the actual Guest Additions installation media.

  1. In the VirtualBox Menu Bar (on your host machine), navigate to Devices.
  2. Click Insert Guest Additions CD Image…

You should see a pop-up window appear inside your CentOS 9 VM asking what you want to do with the newly inserted media.

  1. Click the Run option within the prompt.
  2. You will be asked to enter your root password one last time.

The system will now run the installer script, compiling the necessary modules and installing the drivers. Once the process is complete, you will be prompted to press ENTER to close the window.

Step 5: Reboot and Enjoy Fullscreen!

The new drivers and kernel modules won’t fully take effect until the system reboots.

  1. Go to the system menu in the top right corner of CentOS.
  2. Click the Power/Log Off option.
  3. Select Restart.

Once your CentOS 9 machine has fully rebooted, you should immediately notice the difference! Try maximizing the VirtualBox window, and the CentOS desktop should dynamically resize to fill the entire screen. Congratulations, you’ve achieved seamless fullscreen integration!


Wrapping Up

That’s all there is to it! By installing VirtualBox Guest Additions on CentOS 9 Stream, you’ve dramatically improved your workflow and made your virtualized environment feel much more like a native installation.

If this tutorial helped you unlock fullscreen mode and improve your VM experience, please show your support! Don’t forget to Like and Subscribe to Darren’s Tech Tutorials on YouTube for more clear and accessible technology guides. And if you want to support my work further, please check out my Patreon linked in the description!

Happy configuring, and thank you for watching!