Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install VirtualBox Guest Additions on CentOS 8 - DesignLinux

Jun 08 2020
designlinux 0 Comments

When you first install a virtual machine with a GUI on VirtualBox, the screen size is usually scaled-down and the user experience is usually quite bland. To improve the appearance and functionality of a virtual machine, VirtualBox provides a set of software packages and drivers known as VirtualBox guest additions in the form of an ISO image known as VBoxGuestAdditions.iso. The image is then mounted onto the guest system and the guest additions are thereafter installed.
The VirtualBox guest additions enable the functionalities listed below:

  • Improved the graphical display/appearance.
  • Mouse pointer integration between the host and guest machine.
  • Shared folders between the host and guest system.
  • Copy & paste and cut & paste functionality between the host and the guest system.

Requirements

  • How to Install VirtualBox in CentOS 8

VirtualBox guest additions can be installed on both Linux and Windows systems. In this guide, we will walk you through the installation of VirtualBox guest additions on CentOS 8.

Step 1: Installing EPEL on CentOS 8

To start off, begin by installing the EPEL repository, in short for Extra Packages for Enterprise Linux, which is a repository that provides extra open-source software packages for RedHat flavors such as CentOS and Fedora.

To install the EPEL repository on CentOS 8, run the following dnf command on the terminal.

$ sudo dnf install epel-release
Install Epel in CentOS 8

Install Epel in CentOS 8

Once installed, confirm the version installed by running the command.

$ rpm -q epel-release
Confirm EPEL Repository

Confirm EPEL Repository

Step 2: Installing Kernel Headers and Build Tools

With the EPEL repository installed, proceed and install the kernel headers and build tools required to install the guest additions as shown.

$ sudo dnf install gcc make perl kernel-devel kernel-headers bzip2 dkms
Install Kernel Headers in CentOS 8

Install Kernel Headers in CentOS 8

Once installed, confirm that the version of kernel-devel corresponds to the version of your Linux kernel by running these commands:

$ rpm -q kernel-devel
$ uname -r
Confirm Kernel Version

Confirm Kernel Version

The output clearly indicates a conflict between the two versions. The kernel-devel version is 4.18.0-147.8.1.el8_1.x86_64 whilst the Linux kernel version is 4.18.0-80.el8.x86_64.

To resolve the issue, update the Linux kernel by running the command:

$ sudo dnf update kernel-*
Update Kernel in CentOS 8

Update Kernel in CentOS 8

Once prompted, press 'Y' and hit ENTER to continue with the update. When the update the complete, reboot your CentOS 8 system.

$ sudo reboot

During the reboot, be sure to boot into the latest kernel entry that corresponds to the kernel-devel version. This is usually the first entry as you can see.

CentOS Grub Menu

CentOS Grub Menu

Once the system is done with booting, log in and once again confirm that the kernel-devel version now matches the version of the Linux kernel.

$ rpm -q kernel-devel
$ uname -r
Check Kernel Version

Check Kernel Version

The two versions are now in sync. Great! Now you can go ahead and install VirtualBox guest additions.

Step 3: Install VirtualBox Guest Additions in CentOS 8

There are two ways to install guest additions, and we will cover both ways here:

Install VirtualBox Guest Additions Graphically

To install the VirtualBox guest additions, Head out to the menu bar and click Devices –> Insert Guest Additions CD image.

Select Guest Additions

Select Guest Additions

A pop will appear as shown. From here, you can take two approaches:

Run Guest Additions

Run Guest Additions

You can hit ‘Run‘ and later authenticate when prompted. Thereafter, you will see some verbose output on the terminal. Once the installation is done, reboot the system and boot into a full-screen.

Install VirtualBox Guest Additions Manually

The second option is to install a command-line. To achieve this, choose ‘Cancel’ option and thereafter, open your terminal and create a mount point for the guest additions ISO image.

$ sudo mkdir -p /mnt/cdrom

Next, mount the ISO image on the mount point.

$ sudo mount /dev/cdrom /mnt/cdrom

Then finally navigate to the mount location and run the VirtualBox installer script.

$ cd /mnt/cdrom
$ sudo ./VBoxLinuxAdditions.run 

Once the script is done running, you will immediately observe the screen panning to full size. If this doesn’t happen in your case, reboot your system and finally boot into your full-screen CentOS 8 virtual machine 🙂

CentOS Desktop in Full View

CentOS Desktop in Full View

To enable mouse pointer integration, navigate to ‘Shared Clipboard‘ –> ‘Bidirectional‘. This enables you to copy and paste content between the host and guest system.

Share Clipboard in Virtualbox

Share Clipboard in Virtualbox

We hope this article has been helpful to you, If you encounter any challenges, please reach out to us. Thank you.

Sharing is Caring…
Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

Related

Tags: CentOS Tips

How to Install Vagrant on Ubuntu 20.04

Prev Post

A Beginners Guide to Snaps in Linux – Part 1

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 259
  • 614,631

DesignLinux.com © All rights reserved

Go to mobile version