Install Virtualbox guest additions on CentOs 8

Published: December 1, 2025 (Updated: Dec 1, 2025)

Enjoying this content? Subscribe to the Channel!

Make CentOS 8 Full Screen: The Complete Guide to Installing VirtualBox Guest Additions

Hi there! This is Darren O’Neill from Darren’s Tech Tutorials.

One of the most frustrating things about setting up a fresh CentOS 8 Virtual Machine (VM) in VirtualBox is dealing with the fixed, tiny screen resolution. You try to resize the window, but the operating system just refuses to adjust!

The solution to this common headache is simple, but the process can be tricky: you need to install VirtualBox Guest Additions. This software package adds crucial drivers to your guest OS (CentOS 8), enabling features like dynamic resizing, shared clipboard functionality, and seamless mouse integration.

I’ve run into a few hurdles getting this set up recently, so I’ve compiled a definitive, step-by-step guide—including the vital troubleshooting step I had to take—to ensure your installation is successful.

Let’s dive in and get your CentOS 8 VM running in beautiful, full-screen glory!


Step 1: Update Your CentOS 8 Operating System

Before installing any new kernel modules or drivers, it’s best practice to ensure your operating system is fully up to date. This prevents conflicts and ensures we are working with the latest stable kernel headers.

Open your terminal and run the standard update command:

sudo yum update

This may involve downloading and installing hundreds of megabytes of packages, so give it time. Once the updates are complete, proceed to the next step.

Step 2: Install Essential Dependencies

VirtualBox Guest Additions requires several development packages, compilers (like GCC), and kernel headers to properly compile and install the necessary drivers into the CentOS 8 kernel.

Run the following critical command to install all required dependencies in one go.

Note: We are installing tar, bzip2, kernel-headers, perl, gcc, make, and elfutils-libelf-devel.

sudo yum install tar bzip2 kernel-headers perl gcc make elfutils-libelf-devel

When prompted, press Y to confirm the installation of these packages.

Step 3: Initial System Reboot

Now that all the prerequisites (especially the new kernel headers) are installed, it is essential to reboot your VM before attempting the Guest Additions installation. This ensures the system recognizes the new packages and loads the correct modules.

In your terminal, run:

sudo reboot

Wait for the system to restart and log back into your CentOS 8 desktop.

Step 4: Mount and Run the Guest Additions CD Image

This step involves telling VirtualBox to insert the installation media into your virtual CD-ROM drive, which the CentOS guest can then access and execute.

  1. In the VirtualBox menu bar (on your host machine, outside the CentOS VM window), click Devices.
  2. Select Insert Guest Additions CD Image…

CentOS 8 should automatically detect the virtual CD and prompt you to run the software installer.

  1. When the dialog box appears asking if you want to run the installer, click Run.
  2. Enter your system password and click Authenticate.

The installation process will now compile and install the Guest Additions drivers. This typically only takes a minute or two. Once finished, you will be prompted to press ENTER to close the window.

Step 5: Final Reboot and Testing

While the installation is technically complete, the changes to the graphical environment often require a final restart to take effect fully.

In your terminal, run the reboot command one last time:

sudo reboot

After the VM restarts and you log back in, test the results! You should now be able to:

  • Resize your VirtualBox window dynamically: As you drag the corners of the window, the CentOS 8 desktop environment will scale perfectly to fill the space—enabling true full-screen mode.
  • Use Shared Clipboard: Copy text from your host OS (Windows, macOS) and paste it directly into your CentOS VM, and vice versa.

Troubleshooting: Did the Installation Fail? (Read This!)

If you followed the steps exactly and still cannot resize the screen, you are likely running into the same issue I spent hours trying to solve!

The problem might not be with your CentOS guest, but with your VirtualBox host software on your main machine (Windows/macOS). If your VirtualBox installation is not fully updated, it can cause the Guest Additions installation in the VM to fail silently.

Here’s the fix:

  1. Power down your CentOS 8 VM.
  2. On your host machine, go to the official VirtualBox website and download the latest version of the main VirtualBox software (the executable for your operating system).
  3. Run the downloaded installer. If it prompts you to “Repair” or “Upgrade,” proceed with the update/repair process.
  4. Once the host software is updated, start your CentOS 8 VM again and re-run Step 4 (Mount and Run the Guest Additions CD Image) and Step 5 (Final Reboot).

Updating the host software usually solves any lingering installation errors and allows the Guest Additions to properly initialize.

Ready to Go Full Screen!

Congratulations! You now have a fully functional CentOS 8 Virtual Machine that is a pleasure to work with. No more tiny, fixed windows—just seamless, dynamic resizing and clipboard sharing to boost your productivity.

If this guide helped you conquer those frustrating resolution issues, please let me know in the comments below! Don’t forget to like this post and subscribe to Darren’s Tech Tutorials for more clear, practical technology guides.

Happy virtualizing!