Virtualbox – install Guest Additions

VirtualBox documentation describes that the Guest Additions are designed to be installed inside a virtual machine after the guest operating system has been installed. They consist of device drivers and system applications that optimize the guest operating system for better performance and usability. After installation there will be no limitations for mouse as there is only one mouse pointer and pressing the Host key is no longer required to “free” the mouse from being captured by the guest OS. Installation also improves functionality of shared folders, shared clipboard, better video support, seamless windows and more. If you are interested in more details all features are described in VirtualBox documentation

 

According to note “Oracle-Validated Does Not Install Required Kernel-Headers RPM package (Doc ID 1152174.1)” oracle-validated package is designed to install “kernel-headers”. However if you use “up2date” package to install this package (oracle-validated) it doesn’t install all requisite packages as it should. Before we start we need to be sure that kernel-headers and kernel-devel are installed. Because in the previous article we installed oracle-validate package during system installation, only kernel-devel package is missing. We need to install it from DVD repository. To do this we need to mount OracleLinux5_4_x86.iso first. From VirtualBox machine menu choose “Devices” (1) -> “Optical Drives” (2) -> “Enterprise-R5-U4-Server-i386-dvd.iso” (3)
install_VirtualBox_Guest_Additions_01
Click mouse right button on Linux Desktop and from context menu choose “Open Terminal” (1)
install_VirtualBox_Guest_Additions_02
As long as oracle user doesn’t belong to sudoers we need to switch context to root user (1). To do this execute su - and provide root password. Next install package using yum (2)
yum install /media/Enterprise\ Linux\ dvd\ 20090908/Server/kernel-devel-2.6.18-164.el5.i686.rpm --nogpgcheck
install_VirtualBox_Guest_Additions_03
Confirm that you want to install package “y” and press Enter to continue (3)
install_VirtualBox_Guest_Additions_04
Remove Oracle Linux DVD using eject command (1)  and mount “Guest Additions” image from menu “Devices” (1) -> “Insert Guest Additions CD image” (2)
install_VirtualBox_Guest_Additions_05
To start installation you need to use sh interpreter (1). Otherwise you will receive error “sh: ./VBoxLinuxAdditions.run: /bin/sh: bad interpreter: Permission denied”.
Install VirtualBox Additions with command
sh /media/VBOXADDITIONS_4.3.28_100309/VBoxLinuxAdditions.run and reboot (2) to apply changes
install_VirtualBox_Guest_Additions_06
After restart you will be able to use drag&drop from option. This may be used to transfer database / grid control installation packages from your physical to virtual machine. Create folders /install /u01 (1) mkdir /install /u01 as final step and change folders ownership to user:group oracle:oinstall (2) chown oracle:oinstall /install /u01
<missing picture>