Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Virtualization»How To Install VirtualBox Guest Additions on Fedora 29-25, CentOS 7/6

    How To Install VirtualBox Guest Additions on Fedora 29-25, CentOS 7/6

    RahulBy RahulMarch 9, 20183 Mins ReadUpdated:February 4, 2019

    The VirtualBox Guest Additions provides some device drivers and application for the optimization of performance and usability of Guest operating systems. It is installed inside the Guest operating system. So you need to install on each Virtual Machines running on your system.

    I recommend to install or upgrade VirtualBox latest version first. This tutorial is to help you with the installation of VirtualBox Guest Additions on Fedora 27/26, CentOS/RHEL 7/6.

    Step 1 – Prerequisites

    First of all, Enable the EPEL release yum repository on your Fedora, CentOS, or RHEL systems. Execute one of the below commands to enable yum repository.

     ### On CentOS/RHEL 7  ### 
    sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
    ### On CentOS/RHEL 6  ### 
    sudo rpm -Uvh http://epel.mirror.net.in/epel/6/x86_64/epel-release-6-8.noarch.rpm
    

    Step 2 – Upgrade Kernel

    Upgrade your system to use the latest available kernel. To upgrade kernel just execute one of the followings commands on system terminal.

    ### On CentOS/RHEL 7/6  ### 
    sudo yum update kernel*
    
    ### On Fedora 29/28/27/26/25  ### 
    dnf update kernel*
    

    After upgrading the kernel, you must reboot your virtual machine.

    Step 3 – Install Required Packages

    You also need to install some additional packages on your system including kernel-headers and kernel-devel packages.

    ### On CentOS/RHEL 7/6 ###
    yum install make gcc perl dkms bzip2 kernel-headers kernel-devel
    
    ### On Fedora 29/28/27/26/25 ###
    dnf install make gcc  dkms bzip2 perl kernel-headers kernel-devel
    

    Step 4 – Setup Environment Variable

    Set the KERN_DIR environment variable to the kernel source code. In my case, the latest kernel source is available in 2.6.32-504.3.3.el6.x86_64 directory under /usr/src/kernels/ .

    sudo export KERN_DIR=/usr/src/kernels/`uname -r`
    

    Make sure the configured directory exist with proper source code.

    Step 5 – Mount Guest Additions Image

    Mount the guest additions image CDROM on your system in read-only mode. Using below command this will be mounted on /media directory.

    sudo mount -r /dev/cdrom /media
    

    Step 6 – Run Installer

    Your system is ready to run the installer. Execute commands to install the latest VirtualBox guest additions on your system.

    cd /media
    sudo ./VBoxLinuxAdditions.run 
    

    Output

    Verifying archive integrity... All good.
    Uncompressing VirtualBox 5.2.8 Guest Additions for Linux........
    VirtualBox Guest Additions installer
    Removing installed version 5.2.6 of VirtualBox Guest Additions...
    Copying additional installer modules ...
    Installing additional modules ...
    VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
    VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
    VirtualBox Guest Additions: Starting.
    VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
    VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
    

    All done. The latest VirtualBox guest additions package has been installed on your system.

    Guest additions Oracle Oracle VirtualBox VirtualBox
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install NoMachine on Ubuntu, Debian and LinuxMint (Alternative of TeamViewer)
    Next Article How To POST JSON Data with PHP cURL

    Related Posts

    How To Install Oracle VirtualBox on Debian 11

    2 Mins Read

    How to Install VirtualBox 6.1 on Ubuntu 20.04

    Updated:December 13, 20202 Mins Read

    How To Install VirtualBox 6.1 on Fedora 35/34

    Updated:February 18, 20222 Mins Read

    How To Install VirtualBox 6.1 on Ubuntu 18.04 LTS

    Updated:June 27, 20202 Mins Read

    How to Convert VMDK to VDI Disk using VirtualBox

    Updated:August 29, 20181 Min Read

    How to Convert VDI to VMDK Disk using VirtualBox

    Updated:August 30, 20181 Min Read

    2 Comments

    1. JLQ on May 3, 2019 10:58 pm

      It’s not working !
      check the last output in your own tutorial: ” VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong”

      Then, you might realize that libcrypt.so is missing

      Reply
    2. x on April 11, 2019 3:25 pm

      You idiot. “All done” ?? You didn’t even notice the build failures in the output? You’re not even going to mention that it didn’t work?

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.