Top 60 Oracle Blogs

Recent comments

Installing Virtualbox Guest Additions for Oracle Linux 8.2

Since I can never remember how to install Virtualbox Guest Additions I thought I’d write it down. Maybe it’ll save you a few minutes; I know it will save me a lot of time ;)

For this post I used the latest versions at the time of writing:

  • Virtualbox 6.1.10 for Linux (my host is running Ubuntu 20.04 LTS)
  • Oracle Linux 8.2 (V996906-01.iso)

The VM was installed using the “minimal-environment” group and booted into UEK 6. I believe this change came with Oracle Linux (OL) 8.2 and I seem to remember OL 8.1 used the Red Hat Compatible Kernel (RHCK) by default. There’s nothing wrong with that of course, it’s just an observation. I am going to stick with UEK 6 in my lab, instructions are different from using RHCK.

As usual I run a “dnf update -y” (in a tmux session of course) to upgrade the software release to the latest and greatest software. After this completed, it’s time for a reboot and the installation of the Guest Additions. I hope you forgive me for not sharing screen output from the system upgrade, I thought it would have been boring …

Right after the system comes back online after the reboot, you might notice a new kernel: 5.4.17-2011.3.2.1.el8uek.x86_64 is now the default, previously it was 5.4.17-2011.1.2.el8.

Before you can install the Guest Additions a few additional packages are required.

[root@ol8base ~]# dnf install perl make bzip2 gzip unzip kernel-uek-devel-$(uname -r) tar
Last metadata expiration check: 0:22:15 ago on Fri 29 May 2020 14:11:17 BST.
Package gzip-1.9-9.el8.x86_64 is already installed.
Dependencies resolved.
 Package                      Arch   Version            Repository         Size
 bzip2                        x86_64 1.0.6-26.el8       ol8_baseos_latest  60 k
 kernel-uek-devel             x86_64 5.4.17-2011.3.2.1.el8uek
                                                        ol8_UEKR6          17 M
 make                         x86_64 1:4.2.1-10.el8     ol8_baseos_latest 498 k
 perl                         x86_64 4:5.26.3-416.el8   ol8_appstream      72 k
 tar                          x86_64 2:1.30-4.el8       ol8_baseos_latest 838 k
 unzip                        x86_64 6.0-43.el8         ol8_baseos_latest 196 k
Installing dependencies:
 annobin                      x86_64 8.90-1.el8         ol8_appstream     202 k
 binutils                     x86_64 2.30-73.0.1.el8    ol8_baseos_latest 5.8 M
 binutils-devel               x86_64 2.30-73.0.1.el8    ol8_appstream     1.1 M
 cpp                          x86_64 8.3.1-5.0.3.el8    ol8_appstream      10 M
 dtrace                       x86_64 2.0.0-1.0.el8      ol8_UEKR6         1.3 M




The next step is to mount the Guest Additions (virtual) CD and run the installer:

[root@ol8base ~]# mount /dev/sr0 /mnt
mount: /mnt: WARNING: device write-protected, mounted read-only.
[root@ol8base ~]# /mnt/ 
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.10 Guest Additions for Linux................
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup 
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 

This seems to have gone well, let’s check if the necessary kernel modules are present:

[root@ol8base ~]# lsmod  | egrep -i 'Module|vbox'
Module                  Size  Used by
vboxsf                 81920  0
vboxguest             339968  2 vboxsf
vboxvideo              36864  0
drm_kms_helper        184320  2 vmwgfx,vboxvideo
ttm                   106496  2 vmwgfx,vboxvideo
drm                   516096  5 vmwgfx,drm_kms_helper,vboxvideo,ttm
[root@ol8base ~]#  

This is it! Guest additions ready and working with Oracle Linux 8.2/ UEK 6