If Not True Then False

VirtualBox Guest Additions on Fedora 26/25, CentOS/RHEL 7.3/6.9/5.11 - Comment Page: 6

This is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 26/25/24/23/22/21/20/19/18/17/16, CentOS 7.3/6.9/5.11, Red Hat (RHEL) 7.3/6.9/5.11. VirtualBox Guest Additions is special software that can be installed inside Linux virtual machines to improve performance and make integration much more seamless. Among the...
Categories:

242 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Input your comment.
help

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.

Gabriel Bautista

Hi Barry.

Try it in command line

KERN_DIR=/usr/src/kernels/$(uname -r)
export Kern_DIR

./VBoxLinuxAdditions.run

reply Reply
Desi

Excellent…worked like a charm for me on Centos 5.4 and VB 4.3.6 R91406

I had to make one change for the export KERN_DIR to work.
export KERN_DIR=’/usr/src/kernels/’`uname -r`-`uname -m`

The closing single quote before first `uname

reply Reply
ms

Thank you! This is exactly what I was looking for and so straight-forward! I spent hours last night scouring official install instructions to no avail, and this morning your instructions got it done in minutes!

reply Reply
TheodoreC

I was having a number of errors pertaining to OpenGL module getting installed:

Building OpenGL support module … failed

I looked into this further from some of the posts in this thread and what helped me was this :

[snip]
$ yum whatprovides “*drm/drm.h”
kernel-devel installed
kernel-headers installed
libdrm-devel installed
[/snip]

i didn’t have the libdrm-devel package installed. once i installed it…boom. works, thought i’d add this comment for anyone else that encounters this error.

reply Reply
JR

Hi TheodoreC,

Thank you for your input! What host OS you are using?

reply Reply
Alex

Hi,

Have installed centos6.5 on virtual machine, but when restarting the VM the installed gcc/g++ are not found.

suggestions?

reply Reply
RS

Has anyone of you can tell if the “Fullscreen” mode is functional after applying the procedures described here?

Thanks in advance.

reply Reply
JR

Hi RS,

Yes, full screen should work after installing VirtualBox Guest Additions.

reply Reply
whocares

anyone have this working on CentOS 7?

has no member named ‘numa_next_reset’

reply Reply
BF

I don’t believe CentOS/RHEL 7 is supported in the current stable Virtualbox release (4.3.12). I run into the same error.

Apparently this will be solved in 4.3.14, the release candidate is already available and should fix the issue. Unfortunately I need it to be available in the stable branch to make any use of it as I need to provide it for multiple users. Guess we’ll just have to wait for 4.3.12 to reach stable. :-(

reply Reply
I47

hi. i have same issue.please help

[root@localhost yum.repos.d]# uname -a
Linux localhost.localdomain 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost yum.repos.d]# rpm -qa kernel\* |sort -V
kernelshark-2.2.1-3.fc20.x86_64
kernel-3.11.10-301.fc20.x86_64
kernel-3.15.6-200.fc20.x86_64
kernel-debug-3.15.6-200.fc20.x86_64
kernel-debug-devel-3.15.6-200.fc20.x86_64
kernel-debug-modules-extra-3.15.6-200.fc20.x86_64
kernel-devel-3.15.6-200.fc20.x86_64
kernel-doc-3.15.6-200.fc20.noarch
kernel-headers-3.15.6-200.fc20.x86_64
kernel-modules-extra-3.11.10-301.fc20.x86_64
kernel-modules-extra-3.15.6-200.fc20.x86_64
kernel-tools-3.15.6-200.fc20.x86_64
kernel-tools-libs-3.15.6-200.fc20.x86_64
kernel-tools-libs-devel-3.15.6-200.fc20.x86_64

reply Reply
JR

Hi I47,

Please boot using latest kernel 3.15.6-200.fc20.x86_64, then try again.

reply Reply
Ricardo

Hello, someone could help?

[root@localhost ~]# service vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)

[root@localhost ~]# cat /var/log/vbox-install.log
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
Makefile:183: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

uname -r
3.8.13-35.3.3.el6uek.x86_64

echo $KERN_DIR
/usr/src/kernels/2.6.32-431.23.3.el6.x86_64/

I’m new to Linux.
Thanks.

reply Reply
tricky

I followed your install process and this is what i got. I couldnt start up VB from the command line(although i was able to start using the front).
I also hav a problem when i was trying to mount the cdrom as additional mount.
Below is what i got. PLease help.

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
VirtualBox-4.3 x86_64 4.3.14_95030_el6-1 virtualbox 75 M
Installing for dependencies:
SDL x86_64 1.2.14-3.el6 public_ol6_latest 192 k

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

Total download size: 75 M
Installed size: 151 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): SDL-1.2.14-3.el6.x86_64.rpm | 192 kB 00:00
(2/2): VirtualBox-4.3-4.3.14_95030_el6-1.x86_64.rpm | 75 MB 01:36
——————————————————————————–
Total 790 kB/s | 75 MB 01:37
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Retrieving key from https://www.virtualbox.org/download/oracle_vbox.asc
Importing GPG key 0x98AB5139:
Userid: “Oracle Corporation (VirtualBox archive signing key) ”
From : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : SDL-1.2.14-3.el6.x86_64 1/2
Installing : VirtualBox-4.3-4.3.14_95030_el6-1.x86_64 2/2

Creating group ‘vboxusers’. VM users must be member of that group!

No precompiled module for this kernel found — trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-358.el6.x86_64 cannot be found at
/lib/modules/2.6.32-358.el6.x86_64/build or /lib/modules/2.6.32-358.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
Verifying : SDL-1.2.14-3.el6.x86_64 1/2
Verifying : VirtualBox-4.3-4.3.14_95030_el6-1.x86_64 2/2

Installed:
VirtualBox-4.3.x86_64 0:4.3.14_95030_el6-1

Dependency Installed:
SDL.x86_64 0:1.2.14-3.el6

Complete!
[root@new-host-2 yum.repos.d]# service vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.32-358.el6.x86_64 cannot be found at
/lib/modules/2.6.32-358.el6.x86_64/build or /lib/modules/2.6.32-358.el6.x86_64/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@new-host-2 yum.repos.d]# usermod -a -G vboxusers tricky
[root@new-host-2 yum.repos.d]# VirtualBox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.32-358.el6.x86_64) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.
No protocol specified
Failed to open the X11 display!
[root@new-host-2 yum.repos.d]# KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`
[root@new-host-2 yum.repos.d]# KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64
[root@new-host-2 yum.repos.d]# export KERN_DIR
[root@new-host-2 yum.repos.d]# cd ~
[root@new-host-2 ~]# mkdir /media/VirtualBoxGuestAdditions
[root@new-host-2 ~]# mount -r /dev/cdrom /media/VirtualBoxGuestAdditions
mount: you must specify the filesystem type
[root@new-host-2 ~]# mount -r /dev/cdrom /media/VirtualBoxGuestAdditions
mount: you must specify the filesystem type

reply Reply
JR

Hi tricky,

Could you first post output of following commands:


rpm -qa gcc kernel\* dkms make bzip2 perl |sort -V

uname -a
reply Reply
Paul Emerson

Hi, I know this is an old post but wanted to let you know I have been trying for 5 days to install VirtualBox Guest Additions on Centos 6. I have only had about 5 hrs sleep in those 5 days but your post did it for me. Thank you. At 3:32 am on the west coast I can finally get about 3 more hrs sleep then its back to work.
Great Post and thanks again
Paul

reply Reply
BT

It seems like you should mount the Guest Additions CD image at the very end – since there are several reboot steps that would unmount the CD right? I noticed that once it came to actually running the installer from the CD, there was nothing in the previously mounted directory.

reply Reply