Your cart is currently empty!
How to Install VirtualBox Guest Additions on CentOS 8
If you’ve ever run CentOS 8 as a virtual machine in VirtualBox, you know the default setup can feel clunky. Guest Additions fixes that. It gives you better screen resolution, shared clipboard, drag-and-drop support, and seamless folder sharing. Here’s how to get it installed without headaches.
💡 Related: How to Enlarge a Virtual Machine’s Disk in VirtualBox or VMware
Prerequisites
Before you start, make sure:
- CentOS 8 is up and running inside VirtualBox.
- You’re logged in as a user with sudo privileges.
- The VM has internet access.
Step 1: Update the System
First, bring everything up to date.
sudo dnf update -y
sudo dnf install -y epel-release
Then reboot:
sudo reboot
Step 2: Install Required Packages
Guest Additions needs kernel headers, development tools, and a few other packages.
sudo dnf install -y gcc kernel-devel kernel-headers make perl elfutils-libelf-devel
Check that the kernel version matches the installed headers:
uname -r
rpm -q kernel-devel
If they don’t match, run:
sudo dnf update -y
sudo reboot
Step 3: Mount the Guest Additions ISO
- In the VirtualBox menu, go to Devices > Insert Guest Additions CD Image.
- CentOS should auto-mount the disc. If not, do it manually:
sudo mount /dev/cdrom /mnt
Step 4: Run the Installer
Run the installation script from the mounted ISO:
sudo sh /mnt/VBoxLinuxAdditions.run
Watch for errors. If everything goes well, you’ll see messages saying modules were successfully installed.
Step 5: Reboot and Verify
After installation, reboot the VM:
sudo reboot
Now test:
- Resize the VM window – the desktop should resize with it.
- Try copy/paste between host and guest.
- Check shared folders (if configured).
Troubleshooting Tips
- Still stuck in 800×600? Check that your VirtualBox VM settings have Display > Graphics Controller set to VBoxSVGA.
- Errors during build? Make sure kernel-devel version matches the running kernel.
- No shared clipboard? Enable it under Devices > Shared Clipboard > Bidirectional.
Wrapping Up
Installing VirtualBox Guest Additions on CentOS 8 is a bit manual, but once done, your VM will feel a lot smoother and more integrated. If you run into issues, check logs in /var/log/VBoxGuestAdditions.log
for clues.
Have a bloated or undersized virtual disk? Check out this quick guide: How to Enlarge a Virtual Machine’s Disk in VirtualBox or VMware
Let me know in the comments if you hit any snags or need help with a specific error.