click on insert guest edition CD image

click on autorun

provide root password

in my case it din’t completed sucessfully anf thrown error for missing kernel header packages

Run these commands

cd /etc/yum.repos.d

downlaod the yum reposiory file from public-yum.oracle.com

wget http://public-yum.oracle.com/public-yum-ol6.repo

[root@oel6-rac01 VBox_GAs_6.1.6]# cd /etc/yum.repos.d



[root@oel6-rac01 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2020-05-06 15:18:09--  http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 104.74.21.171
Connecting to public-yum.oracle.com|104.74.21.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12045 (12K) [text/plain]
Saving to: “public-yum-ol6.repo.1”

100%[===================================================================================================================================================>] 12,045      --.-K/s   in 0.01s

2020-05-06 15:18:09 (970 KB/s) - “public-yum-ol6.repo.1” saved [12045/12045]

run yum update

Yum update is the command used to update applications installed on a system. If the command is run without any package names specified, it will update every currently installed package on the system.

[root@oel6-rac01 yum.repos.d]# yum update
Freeing read locks for locker 0x5: 3465/140586242905856
Freeing read locks for locker 0x7: 3465/140586242905856
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package adcli.x86_64 0:0.8.1-2.el6 will be updated
---> Package adcli.x86_64 0:0.8.1-3.el6_10 will be an update
---> Package autofs.x86_64 1:5.0.5-139.0.1.el6 will be updated
---> Package autofs.x86_64 1:5.0.5-140.0.1.el6_10.1 will be an update
---> Package bind-libs.x86_64 32:9.8.2-0.68.rc1.el6 will be updated
---> Package bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.3 will be an update
....................
....................

IMPORTANT: A legacy Oracle Linux yum server repo file was found. Oracle Linux yum server repository configurations have changed which means public-yum-ol6.repo will no longer be updated. New repository configuration files have been installed but are disabled. To complete the transition, run this script as the root user:

/usr/bin/ol_yum_configure.sh

See https://yum.oracle.com/faq.html for more information.

  Installing : oraclelinux-release-el6-1.0-6.el6.noarch                                                                                                                               41/248
  Updating   : rhn-client-tools-1.0.0.1-45.0.5.el6.noarch                                                                                                                             42/248
  Updating   : rhn-setup-1.0.0.1-45.0.5.el6.noarch                         
......................
......................
 x11-server-common.x86_64 0:1.17.4-17.0.2.el6          yum-plugin-security.noarch 0:1.1.30-42.0.1.el6_10
  yum-utils.noarch 0:1.1.30-42.0.1.el6_10

Failed:
  java-1.7.0-openjdk.x86_64 1:1.7.0.181-2.6.14.10.0.1.el6                                      java-1.7.0-openjdk.x86_64 1:1.7.0.261-2.6.22.1.0.1.el6_10

Complete!

yum update gave an error messsage in between and says to run below as root user

[root@oel6-rac01 yum.repos.d]# /usr/bin/ol_yum_configure.sh
php nodejs epel gluster oci-included ksplice spacewalk.*server spacewalk.*client mysql software openstack oraclelinux_developer patch developer oracle
php
nodejs
epel
gluster
oci-included
ksplice
spacewalk.*server
spacewalk.*client
mysql
software
openstack
oraclelinux_developer
patch
developer
oracle
ol6_UEKR4 already enabled
ol6_latest already enabled

install gcc

The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain and the standard compiler for most projects related to GNU and Linux, including the Linux kernel.

[root@oel6-rac01 yum.repos.d]# rpm -qa|grep gcc
libgcc-4.4.7-23.0.1.el6.x86_64
[root@oel6-rac01 yum.repos.d]# yum install gcc
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
ol6_UEKR4                                                                                                                                                             | 2.5 kB     00:00
ol6_UEKR4/primary_db                                                                                                                                                  | 2.4 MB     00:14
.........................
........................                                                                                                             |  93 kB     00:00
(2/5): cpp-4.4.7-23.0.1.el6.x86_64.rpm                                                                                                                                | 3.7 MB     00:13
(3/5): gcc-4.4.7-23.0.1.el6.x86_64.rpm                                                                                                                                |  10 MB     00:46
(4/5): mpfr-2.4.1-6.el6.x86_64.rpm                                                                                                                                    
................
................

[root@oel6-rac01 yum.repos.d]# rpm -qa|grep gcc
gcc-4.4.7-23.0.1.el6.x86_64
libgcc-4.4.7-23.0.1.el6.x86_64

After this i did a complete install of kernel. It may not be necessary for every case.

yum install kernel*

[root@oel6-rac01 yum.repos.d]# yum install kernel*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Package kernel-headers-2.6.32-754.29.1.el6.x86_64 already installed and latest version
Package kernel-2.6.32-754.29.1.el6.x86_64 already installed and latest version
.................
....................
kernel-uek-devel.x86_64 0:4.1.12-124.38.1.el6uek            kernel-uek-doc.noarch 0:4.1.12-124.38.1.el6uek
  kernel-uek-headers.x86_64 2:1-3.el6

Dependency Installed:
  libdtrace-ctf.x86_64 0:0.8.0-1.el6

Complete!
[root@oel6-rac01 yum.repos.d]#

for OEL7 i did this addtional step

[root@ol7-n1 VirtualBoxGuestAdditions]# yum install kernel-uek-devel-$(uname -r)
Loaded plugins: langpacks, ulninfo
Repository ol7_latest is listed more than once in the configuration
Repository ol7_u0_base is listed more than once in the configuration
Repository ol7_u1_base is listed more than once in the configuration
Repository ol7_u2_base is listed more than once in the configuration
Repository ol7_u3_base is listed more than once in the configuration
Repository ol7_u4_base is listed more than once in the configuration
Repository ol7_u5_base is listed more than once in the configuration
Repository ol7_u6_base is listed more than once in the configuration
Repository ol7_u7_base is listed more than once in the configuration
Repository ol7_security_validation is listed more than once in the configuration
Repository ol7_optional_latest is listed more than once in the configuration
Repository ol7_addons is listed more than once in the configuration
Repository ol7_MODRHCK is listed more than once in the configuration
Repository ol7_latest_archive is listed more than once in the configuration
Repository ol7_optional_archive is listed more than once in the configuration
Repository ol7_UEKR5 is listed more than once in the configuration
Repository ol7_UEKR4 is listed more than once in the configuration
Repository ol7_UEKR3 is listed more than once in the configuration
Repository ol7_UEKR3_OFED20 is listed more than once in the configuration
Repository ol7_UEKR5_RDMA is listed more than once in the configuration
Repository ol7_UEKR4_OFED is listed more than once in the configuration
Repository ol7_UEKR4_archive is listed more than once in the configuration
Repository ol7_UEKR5_archive is listed more than once in the configuration
Repository ol7_kvm_utils is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek-devel.x86_64 0:5.4.17-2011.6.2.el7uek will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                         Arch                                  Version                                                Repository                                Size
=============================================================================================================================================================================================
Installing:
 kernel-uek-devel                                x86_64                                5.4.17-2011.6.2.el7uek                                 ol7_UEKR6                                 16 M

Transaction Summary
=============================================================================================================================================================================================
Install  1 Package

Total download size: 16 M
Installed size: 72 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for ol7_UEKR6
kernel-uek-devel-5.4.17-2011.6.2.el7uek.x86_64.rpm                                                                                                                    |  16 MB  00:00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-uek-devel-5.4.17-2011.6.2.el7uek.x86_64                                                                                                                            1/1
  Verifying  : kernel-uek-devel-5.4.17-2011.6.2.el7uek.x86_64                                                                                                                            1/1

Installed:
  kernel-uek-devel.x86_64 0:5.4.17-2011.6.2.el7uek

Complete!

Try to install the guest edition again and once it is done reboo the machine. If you still see any error message just ignore and reboot the machine.

[root@oel6-rac01 yum.repos.d]# cd /media/VBox_GAs_6.1.6
[root@oel6-rac01 VBox_GAs_6.1.6]# ls
AUTORUN.INF  cert  OS2           TRANS.TBL                VBoxDarwinAdditionsUninstall.tool  VBoxSolarisAdditions.pkg        VBoxWindowsAdditions.exe
autorun.sh   NT3x  runasroot.sh  VBoxDarwinAdditions.pkg  VBoxLinuxAdditions.run             VBoxWindowsAdditions-amd64.exe  VBoxWindowsAdditions-x86.exe
[root@oel6-rac01 VBox_GAs_6.1.6]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.1.6 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.1.6 of VirtualBox Guest Additions...
Building the modules for kernel 2.6.32-754.29.1.el6.x86_64.
Building the modules for kernel 4.1.12-124.38.1.el6uek.x86_64.
You may need to restart your guest system to finish removing guest drivers.
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 <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
4.1.12-124.16.4.el6uek.x86_64. Please install them and execute
  /sbin/rcvboxadd setup
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.
Building the VirtualBox Guest Additions kernel modules.  This may take a while.
To build modules for other installed kernels, run
  /sbin/rcvboxadd quicksetup <version>
or
  /sbin/rcvboxadd quicksetup all
Kernel headers not found for target kernel 4.1.12-124.16.4.el6uek.x86_64.
Please install them and execute
  /sbin/rcvboxadd setup
vboxadd-service.sh: Starting VirtualBox Guest Addition service.
VirtualBox Additions module not loaded!
[root@oel6-rac01 VBox_GAs_6.1.6]# reboot

Broadcast message from root@oel6-rac01.localdomain
        (/dev/pts/0) at 16:48 ...

The system is going down for reboot NOW!
[root@oel6-rac01 VBox_GAs_6.1.6]#

After reboot machine can be in full screen mode and your cursor is also free to move in and out of machine.

now we will create a shared folder

create a directory on linux machine

[root@oel6-rac01 ~]# mkdir /shared_dir
[root@oel6-rac01 ~]#

mount the shared folder.

[root@oel6-rac01 shared_dir]# mount -t vboxsf Software /shared_dir
[root@oel6-rac01 shared_dir]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_oel6rac01-lv_root
                      144G  4.3G  132G   4% /
tmpfs                 872M  224K  872M   1% /dev/shm
/dev/sda1             477M  226M  222M  51% /boot
/dev/mapper/vg_oel6rac01-lv_home
                       50G   53M   47G   1% /home
/dev/sr0               57M   57M     0 100% /media/VBox_GAs_6.1.6
Software              932G   82G  850G   9% /shared_dir
[root@oel6-rac01 shared_dir]# cd /shared_dir
[root@oel6-rac01 shared_dir]# ls
12c_db_grid  12c_OEM  OEL6  sqldeveloper  sqldeveloper-19.2.1.247.2212-x64.zip