HOW TO INSTALL VIRTUALBOX GUEST ADDITIONS ON CENTOS 9
Enjoying this content? Subscribe to the Channel!
Go Full Screen! How to Install VirtualBox Guest Additions on CentOS 9 Stream
Hi there, tech fans! Darren O’Neil here from Darren’s Tech Tutorials.
If you’ve just installed CentOS 9 Stream in VirtualBox, you’ve probably noticed one major frustration: the tiny screen resolution! That’s where VirtualBox Guest Additions come in. This essential software package fixes resolution scaling, enables seamless mouse integration, allows for shared clipboards, and drastically improves overall performance.
This comprehensive guide takes you step-by-step through installing the necessary dependencies and getting Guest Additions running smoothly on CentOS 9. By the time we’re done, you’ll be running CentOS 9 in beautiful full-screen mode!
Let’s dive in!
Introduction: Why Guest Additions are a Game Changer
VirtualBox Guest Additions are device drivers and system applications that optimize the guest operating system (in this case, CentOS 9) for better performance and usability within the VirtualBox environment.
Before we can install the Guest Additions software itself, we need to ensure our CentOS 9 system has the correct development tools and kernel headers installed.
Step 1: Update and Prepare Your CentOS 9 System
The very first step is crucial: we must ensure that all existing packages and, most importantly, the kernel headers, are fully up-to-date. If the kernel headers do not match the running kernel version, the Guest Additions installation will fail.
Open your Terminal and run the following command:
sudo yum update
You will be prompted to enter your password. Depending on how long it’s been since you last updated, this process may take several minutes. When prompted, type y to confirm the updates.
Step 2: Install the EPEL Repository
Many of the build tools we need are not available in the default CentOS repositories. The Extra Packages for Enterprise Linux (EPEL) repository provides high-quality additional packages for RHEL-based distributions like CentOS.
Install the EPEL repository using the following command:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Confirm the installation when prompted.
Step 3: Install Essential Build Packages and Kernel Headers
Now that we have the EPEL repository enabled, we can install the crucial development tools required to build the Guest Additions kernel modules. These packages include the GNU Compiler Collection (gcc) and the necessary kernel development files (kernel-devel).
Execute the following command in your terminal:
sudo yum install gcc kernel-devel kernel-headers make bzip2 perl
Again, confirm the installation when prompted (y). This step will download several packages and may take a few minutes.
Step 4: Insert and Run the Guest Additions CD Image
With all the prerequisites installed, we can finally proceed with the installation of the VirtualBox Guest Additions software.
- Insert the CD Image: In the VirtualBox menu bar, navigate to Devices and click Insert Guest Additions CD image…
- Run the Installer: CentOS 9 should detect the inserted image and prompt you to run the installer script. Click the Run button.
- Authentication: You will be prompted to enter your administrative password one last time.
- Wait for Completion: The installation script will now compile and install the new kernel modules (drivers). This process will scroll through several output lines in the terminal window. Wait for the script to finish and display the prompt asking you to press RETURN to close the window.
Step 5: Reboot Your CentOS 9 System
For the newly installed kernel modules and drivers to be loaded and activated, you must restart your virtual machine.
- In the CentOS desktop environment, click on the Power Icon in the top-right corner.
- Select Power Off / Log Out.
- Choose Restart.
Success! Enjoy Full-Screen CentOS 9
Once your CentOS 9 machine reboots, log back in. The moment you try to maximize the VirtualBox window or manually resize it, you should see the CentOS desktop instantly snap to the correct resolution. Congratulations—you have successfully installed VirtualBox Guest Additions!
Conclusion and Next Steps
That’s all there is to it! By following these five simple steps, you have transformed your limited CentOS 9 VM into a flexible, fully functional development environment with seamless integration.
If this tutorial helped you get CentOS 9 running smoothly, please consider hitting the like button and subscribing to Darren’s Tech Tutorials—it truly helps the channel grow!
And if you want to support more tutorials like this, check out my Patreon page below:
Support Darren’s Tech Tutorials on Patreon!
Happy computing, and thanks for watching!