[Solved] Problem Installing CentOS-8 in Virtualbox-6.1

Learned the hard way

The Problem

The Error

Today I spent a few hours to understand the problem that I faced post-installation of CentOS 8. What I was doing was I was installing the VirtualBox Guest Additions in CentOS which was my guest OS. The error I received every time on running "Install Guest Additions CD Image" was modprobe vboxguest failed. See the above screen.

System Details:

CentOS kernel-version:

[osboxes@osboxes -]$ uname -a
Linux osboxes 4.18.-193.el8.x86_64 #1 SMP Fri May 8 10:59:10 UTC 2020 x86_64 x8
6_64 x86_64 GNU/Linux

VirtualBox version -> Version 6.1.14 r140239 (Qt5.6.2)

Resolution: Run these commands in your guest OS (CentOS).

sudo yum update

sudo yum install gcc

sudo yum install make perl

sudo shutdown -r now

sudo yum update

sudo yum install kernel-devel-$(uname -r)

sudo yum install elfutils-libelf-devel

Now try re-installing the VirtualBox Guest Additions. If it doesn't still work then Remove disk from virtual drive.

And, then, reboot. Thereafter, just try re-installing VirtualBox Guest Additions and, it should work out of the box. Otherwise, force it to go Full-screen Mode.

That's all! Hope it was helpful!