Linux, virtualbox

HOW TO MOUNT SHARED FOLDER FOR VIRTUAL BOX ON OEL 7

When I selected Device –> Share Folder Settings. Folder name : oracle

Screen Shot 2017-07-12 at 11.06.56

So I had to install the Guest Additions. First select Devices and the “Insert Guest Additions CD image :

Screen Shot 2017-07-12 at 11.08.33.png

Connect to the linux server and mount the CD-image :

[root@ermankara oracle]# mkdir /mnt/cdrom

[root@ermankara oracle]# mount /dev/cdrom /mnt/cdrom/
mount: block device /dev/sr0 is write-protected, mounting read-only

[root@ermankara oracle]# cd /mnt/cdrom/
[root@ermankara cdrom]# ls
32Bit        cert                    VBoxSolarisAdditions.pkg
64Bit        OS2                     VBoxWindowsAdditions-amd64.exe
AUTORUN.INF  runasroot.sh            VBoxWindowsAdditions.exe
autorun.sh   VBoxLinuxAdditions.run  VBoxWindowsAdditions-x86.exe


[root@ermankara cdrom]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.22 of VirtualBox Guest Additions...
vboxadd.sh: Stopping VirtualBox Additions.
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.

The first time the installer will fail because of a missing package. So next we install the missing package

So next we install the OS kernel


[root@ermankara cdrom]# uname -a
Linux ermankara 4.1.12-94.3.8.el6uek.x86_64 #2 SMP Fri Jun 30 11:00:28 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@ermankara cdrom]# yum install kernel-uek-devel-4.1.12-94.3.8.el6uek.x86_64
Loaded plugins: refresh-packagekit, ulninfo
Setting up Install Process
public_ol6_UEKR4                                         | 1.2 kB     00:00
public_ol6_latest                                        | 1.4 kB     00:00
public_ol6_latest/primary                              |  64 MB     00:0
public_ol6_latest                                       39194/39194
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek-devel.x86_64 0:4.1.12-94.3.8.el6uek will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package            Arch     Version                   Repository          Size
================================================================================
Installing:
kernel-uek-devel   x86_64   4.1.12-94.3.8.el6uek      public_ol6_UEKR4    11 M

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 11 M
Installed size: 38 M
Is this ok [y/N]: y
Downloading Packages:
kernel-uek-devel-4.1.12-94.3.8.el6uek.x86_64.rpm         |  11 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : kernel-uek-devel-4.1.12-94.3.8.el6uek.x86_64   1/1
Verifying  : kernel-uek-devel-4.1.12-94.3.8.el6uek.x86_64   1/1

Installed:
kernel-uek-devel.x86_64 0:4.1.12-94.3.8.el6uek 

Complete!

 

So next we install the VBoxLinuxAdditions.run


[root@ermankara cdrom]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.22 of VirtualBox Guest Additions...
vboxadd.sh: Stopping VirtualBox Additions.
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.

Now we go back to our Linux vm and check if we can access the shared folder :

Now we go back to our Linux vm and check if we can access the shared folder.


[root@ermankara cdrom]# cd
[root@ermankara ~]# mkdir -p /mnt/oracle/

[root@ermankara ~]# mount -t vboxsf oracle /mnt/oracle/
[root@ermankara ~]# cd /mnt/oracle/
[root@ermankara oracle]# ls
linuxamd64_11102_database_se2_1of2.zip
linuxamd64_11102_database_se2_2of2.zip

[root@ermankara oracle]#

we have a folder shared from our Host-system to our VirtualBox

Advertisements
Standard