Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Cdm208
Posts: 2
Joined: 15. Sep 2016, 22:14

Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Post by Cdm208 »

rpm -qa|grep kernel
kernel-uek-3.8.13-98.7.1.el7uek.x86_64
kernel-headers-3.10.0-327.el7.x86_64
kernel-devel-3.10.0-327.el7.x86_64
kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch
kernel-tools-3.10.0-327.el7.x86_64
kernel-tools-libs-3.10.0-327.el7.x86_64
kernel-3.10.0-327.el7.x86_64

echo $KERN_DIR
/usr/src/kernels/3.10.0-327.el7.x86_64

./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.6 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.6 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.

cat /var/log/VBoxGuestAdditions.log

chcon: can't apply partial context to unlabeled file ‘/usr/lib64/VBoxGuestAdditions/mount.vboxsf’
vboxadd.sh: failed: modprobe vboxguest failed.


uname -a
Linux 3.8.13-98.7.1.el7uek.x86_64 #2 SMP Wed Nov 25 13:51:41 PST 2015 x86_64 x86_64 x86_64 GNU/Linux

Here is additional information

systemctl status vboxadd.service

vboxadd.service
Loaded: loaded (/opt/VBoxGuestAdditions-5.1.6/init/vboxadd; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2016-09-15 16:07:30 EDT; 14min ago

Sep 15 16:07:30 vboxadd[20534]: vboxadd.sh: Starting the VirtualBox Guest Additions.
Sep 15 16:07:30 vboxadd[20534]: vboxadd.sh: Building Guest Additions kernel modules.
Sep 15 16:07:30 vboxadd[20534]: vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
Sep 15 16:07:30 vboxadd[20534]: vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..
Sep 15 16:07:30 vboxadd[20534]: vboxadd.sh: failed: modprobe vboxguest failed.
Sep 15 16:07:30 systemd[1]: vboxadd.service: control process exited, code=exited status=1
Sep 15 16:07:30 systemd[1]: Failed to start vboxadd.service.
Sep 15 16:07:30 systemd[1]: Unit vboxadd.service entered failed state.
Sep 15 16:07:30 systemd[1]: vboxadd.service failed.
Sep 15 16:16:16 systemd[1]: Stopped vboxadd.service.


which gcc
/usr/bin/gcc

which make
/usr/bin/make
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Post by Perryg »

  • kernel-uek-3.8.13-98.7.1.el7uek.x86_64
    kernel-headers-3.10.0-327.el7.x86_64
    kernel-devel-3.10.0-327.el7.x86_64
It appears your headers and devel do not match your running kernel. Fix that and recompile the guest additions.
Cdm208
Posts: 2
Joined: 15. Sep 2016, 22:14

Re: Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Post by Cdm208 »

But I used distribution Linux iso image from Oracle V1000082-1 .....

That means there is a problem with ISO image?


-rw-rw-r-- 1 root root 34622392 Nov 20 2015 kernel-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 2418844 Nov 20 2015 kernel-abi-whitelists-3.10.0-327.el7.noarch.rpm
-rw-rw-r-- 1 root root 36326644 Nov 20 2015 kernel-debug-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 11534380 Nov 20 2015 kernel-debug-devel-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 11470272 Nov 20 2015 kernel-devel-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 14052012 Nov 20 2015 kernel-doc-3.10.0-327.el7.noarch.rpm
-rw-rw-r-- 1 root root 3325584 Nov 20 2015 kernel-headers-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 2498448 Nov 20 2015 kernel-tools-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 root root 2417348 Nov 20 2015 kernel-tools-libs-3.10.0-327.el7.x86_64.rpm
-rw-rw-r-- 1 1039 1039 33409956 Nov 25 2015 kernel-uek-3.8.13-98.7.1.el7uek.x86_64.rpm
-rw-rw-r-- 1 1039 1039 32778176 Nov 25 2015 kernel-uek-debug-3.8.13-98.7.1.el7uek.x86_64.rpm
-rw-rw-r-- 1 1039 1039 9534948 Nov 25 2015 kernel-uek-debug-devel-3.8.13-98.7.1.el7uek.x86_64.rpm
-rw-rw-r-- 1 1039 1039 9522864 Nov 25 2015 kernel-uek-devel-3.8.13-98.7.1.el7uek.x86_64.rpm
-rw-rw-r-- 1 1039 1039 11642560 Nov 25 2015 kernel-uek-doc-3.8.13-98.7.1.el7uek.noarch.rpm
-rw-rw-r-- 1 1039 1039 2227016 Nov 25 2015 kernel-uek-firmware-3.8.13-98.7.1.el7uek.noarch.rpm
[root@dm2 Packages]# uname -a
3.8.13-98.7.1.el7uek.x86_64 #2 SMP Wed Nov 25 13:51:41 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Post by Perryg »

That means there is a problem with ISO image?
No it means that you need to have matching headers and devel. The first post you made did not show as much as this post but look for the headers. Do you find ones that match you running kernel?

You need to install them if you find they are missing. I suggest using the wildcard $(uname -r) to do this. In case you don't know what this means see the following
  • as root/su/sudo
    yum or dnf install kernel-headers-$(uname -r)
FlavioGCMelo
Posts: 4
Joined: 31. Jul 2012, 16:57

Re: Oracle Linux 7.2 - VBoxGuestAdditions issue - shared directory is not mounted

Post by FlavioGCMelo »

Hi, I solve this problem by enabling de ol7_UEKR3, on /etc/yum.repos.d/public-yum-ol7.repo. After that I did the same steps you listed.

yum install kernel-uek-devel
yum install kernel-devel

[root@hsrv1 ~]# yum list kernel*
Loaded plugins: ulninfo
Installed Packages
kernel.x86_64 3.10.0-327.el7 @anaconda/7.2
kernel.x86_64 3.10.0-327.36.3.el7 @ol7_latest
kernel-devel.x86_64 3.10.0-327.36.3.el7 @ol7_latest
kernel-headers.x86_64 3.10.0-327.36.3.el7 @ol7_latest
kernel-tools.x86_64 3.10.0-327.36.3.el7 @ol7_latest
kernel-tools-libs.x86_64 3.10.0-327.36.3.el7 @ol7_latest
kernel-uek.x86_64 3.8.13-98.7.1.el7uek @anaconda/7.2
kernel-uek-debug.x86_64 3.8.13-98.7.1.el7uek @ol7_UEKR3
kernel-uek-debug-devel.x86_64 3.8.13-98.7.1.el7uek @ol7_UEKR3
kernel-uek-devel.x86_64 3.8.13-98.7.1.el7uek @ol7_UEKR3
kernel-uek-devel.x86_64 3.8.13-118.14.1.el7uek @ol7_UEKR3
kernel-uek-firmware.noarch 3.8.13-98.7.1.el7uek @anaconda/7.2
Available Packages
kernel-abi-whitelists.noarch 3.10.0-327.36.3.el7 ol7_latest
kernel-debug.x86_64 3.10.0-327.36.3.el7 ol7_latest
kernel-debug-devel.x86_64 3.10.0-327.36.3.el7 ol7_latest
kernel-doc.noarch 3.10.0-327.el7 ol7_latest
kernel-transition.x86_64 3.10.0-0.0.0.1.el7 ol7_latest
kernel-uek.x86_64 3.8.13-118.14.1.el7uek ol7_UEKR3
kernel-uek-debug.x86_64 3.8.13-118.14.1.el7uek ol7_UEKR3
kernel-uek-debug-devel.x86_64 3.8.13-118.14.1.el7uek ol7_UEKR3
kernel-uek-doc.noarch 3.8.13-118.14.1.el7uek ol7_UEKR3
kernel-uek-firmware.noarch 3.8.13-118.14.1.el7uek ol7_UEKR3

[root@hsrv1 ~]# export KERN_DIR=/usr/src/kernels/$(uname -r)
[root@hsrv1 ~]# echo $KERN_DIR
/usr/src/kernels/3.8.13-98.7.1.el7uek.x86_64
[root@hsrv1 ~]# uname -a
Linux hsrv1 3.8.13-98.7.1.el7uek.x86_64 #2 SMP Wed Nov 25 13:51:41 PST 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@hsrv1 ~]# /media/cdrom/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.8 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.
[root@hsrv1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 48G 2.8G 45G 6% /
devtmpfs 992M 0 992M 0% /dev
tmpfs 1002M 0 1002M 0% /dev/shm
tmpfs 1002M 8.5M 993M 1% /run
tmpfs 1002M 0 1002M 0% /sys/fs/cgroup
/dev/sda1 497M 181M 316M 37% /boot
tmpfs 201M 0 201M 0% /run/user/0
/dev/sr0 57M 57M 0 100% /media/cdrom
[root@hsrv1 ~]# mount -t vboxsf Install /media/sf_install/
[root@hsrv1 ~]# cd /media/sf_install/
[root@hsrv1 sf_install]# ll
total 12
drwxrwxrwx 1 root root 4096 Oct 25 23:13 ISO
drwxrwxrwx 1 root root 4096 Oct 25 23:13 OInstall
drwxrwxrwx 1 root root 0 Oct 25 23:13 VirtualBox
Post Reply