If you decided to use Redhat based Linux distribution inside Virtualbox Virtual Machine on Windows 7 / 8, first thing to do right after installing the Linux guest OS is to install Virtualbox Guest Additions. Earlier I've blogged How to enable virtualbox VM Windows XP fullscreen mode on Virtualbox running on Ubuntu now I need it vice versa a Linux OS living inside Virtual Machine running on top of Windows 7 Enterprise. need to enable Full-screen mode. Another reason why Vboxadditions should be installed right after Linux install is complete is for performance reasons and better integration between host OS and guest OS. Virtualbox Guest Additions enables mouse's copy / paste functions to work between Win and Virtualized Linux as well as enables arbitrary screen resolutions (resizing VM guest window) etc. On Windows versions of Virtualbox to install Vbox Guest Additions it is no longer necessery to download and mount a separate vbox-guest-additions ISO file, this is handled by Virtualbox itself.
The steps described here for installation of VirtualBox Guest Additions are tested and prooved as working on current latest CentOS 6.5, however they should be working (with or without minor modifications) in rest of RPM based Linux distributions
Fedora 20, 19, 18, 17, 16, 15, 14, 13, 12, CentOS 6.5, 6.4, 6.3, 6.2, 6.1, 6.0, 5.10 and Redhat Enterprise Linux (RHEL) 6.5, 6.4, 6.3, 6.2, 6.1, 6, 5.10 VirtualBox version installed on Windows 7 host is 4.3.14 build.
Devices -> Drag'n'Drop (Bidirectional)
Devices -> Share Clipboard (Bidirectional)
1. Installing VirtualBox GuestAdditions on CentOS 7, Redhat, Fedora
a) become superuser
su root
[root@centos~:]#
b) Mount Virtualbox provided Guest additions into virtual cdrom /dev/cdrom
From VirtualBox click on
Devices -> Install Guest Additions
mkdir /media/VirtualBoxGuestAdditions
mount -r /dev/cdrom /media/VirtualBoxGuestAdditions
c) Update to the latest Linux kernel with yum
yum -y update kernel*
Then to boot up into the updated kernel – restart the system
shutdown -r now
d) Install Kernel headers bzip dkms bzip2
yum install -y gcc kernel-devel kernel-headers dkms make bzip2 perl
…
If you're installing VirtualBox Guest Additions on CentOS 6 or RHEL 5, you will have to install also below 2 rpms:
## CentOS 6 and Red Hat (RHEL) 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
## CentOS 5 and Red Hat (RHEL) 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
e) export KERN_DIR to just installed kernel source
For CentOS 7 export following KERN_DIR
## Current running kernel on Fedora, CentOS 7 and Red Hat (RHEL) 7 ##
KERN_DIR=/usr/src/kernels/`uname -r`
export KERN_DIR
For older CentOS and RHEL 5 export
## Current running kernel on CentOS 5 and Red Hat (RHEL) 5 ##
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`
export KERN_DIR
f) Download VBoxAdditions 4.3.14 iso from Virtualbox website
I've made mirror of VBoxGuestAdditions_4.3.14.iso for download here:
mkdir /usr/share/virtualbox
cd /usr/share/virtualbox
wget http://dlc.sun.com.edgesuite.net/virtualbox/4.3.14/VBoxGuestAdditions_4.3.14.iso
…
g) Mount the iso
mount -t iso9660 VBoxGuestAdditions_4.3.14.iso /media/VirtualBoxGuestAdditions/
h) Compile and Install Virtualbox GuestAdditions kernel modules
For both 32-bit and 64-bit systems run one and the same shell script:
cd /media/VirtualBoxGuestAdditions
./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.3.14_RC1 Guest Additions for Linux…………
VirtualBox Guest Additions installer
Removing installed version 4.3.14_RC1 of VirtualBox Guest Additions…
Copying additional installer modules …
Installing additional modules …
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Building the OpenGL support module [ OK ]
Doing non-kernel setup of the Guest Additions [ OK ]
You should restart your guest to make sure the new modules are actually usedInstalling the Window System drivers
Installing X.Org Server 1.15 modules [ OK ]
Setting up the Window System to use the Guest Additions [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.Installing graphics libraries and desktop services componen[ OK ]
l) Restart the CentOS Virtual Machine
reboot
Now get a beer and celebrate the full-screen / USB / Webcamera enabled support ! 🙂
This article is possible thanks to earlier article called Virtualbox guest additions on Fedora CentOS and Redhat.
http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/
More helpful Articles
Tags: building, CentOS, copy paste, Linux, Redhat, rhel, right, rpm, screen resolutions, shared folder, Virtualbox Guest Additions, VirtualBoxGuestAdditions, Window System, Windows, working
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) WhiteHat Aviator/35.0.1916.114 Chrome/35.0.1916.114 Safari/537.36
Used this advice to install VirtualAdditions CentOs7 Guest Mac OSX Mavericks host (just swapped out 4.13.14 for 4.3.18. It succeeded where elsewhere I had failed. Thanks a lot; you are a star.
View CommentView CommentMozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36
Awesome .. the only place that worked.
View CommentView CommentMozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Works! Thanks!! Your instructions were great and the everything worked just as you provided. Given that no cut and paste worked, I made a lot of typos. Next step… automate this more to take the human (me) out of the equation.
View CommentView CommentMozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0
This is great, thanks a lot for the provided procedure.
I am new to Linux and just wondered how does one get to know these little tricks?
For example, why did you created the KERN_DIR variable i.e. where did you find this was needed?
Than, all these extra packages gcc, dkms, make etc. How did you know what to install?
Cheers and thanks again!!!
View CommentView CommentMozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Works!! Thanks You!!
View CommentView Comment