VirtualBox Guest Additions on Fedora 34/33, CentOS/RHEL 8/7/6/5 - Comment Page: 4

This is guide, howto install Oracle VirtualBox Guest Additions on Fedora, CentOS and Red Hat (RHEL). This guide should work with Fedora 34/33/32/31/30, CentOS 8.2/7.8/6.10/5.11, Red Hat (RHEL) 8.2/7.8/6.10/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 features provided by these VirtualBox Guest Additions are mouse pointer integration and arbitrary screen solutions (e.g. by resizing the guest window). Check video version of guide: Watch More Videos and Subscribe to Youtube Channel Note: Fedora 34/33/32/31/30...

352 comments on “VirtualBox Guest Additions on Fedora 34/33, CentOS/RHEL 8/7/6/5 - Comment Page: 4

1 2 3 4 5 6 15
    1. thank you! it helpful! I thought it won’t help, but it really did!

    2. JR,

      First off. Thank you for all your tutorials. I wish there was a way to pay your or compensate you, maybe just recommending your site to friends. But, please, accept my many thanks!

      New to linux, have used many of ur tutorials. This one made me stuck.

      My problem is from the beginning.
      When I input: mount -r /dev/cdrom /media/VirtualBoxGuestAdditions
      Sys output: mount: no medium found on /dev/sr0

      From here, I follow instructions to finish w/out visible errors until the end.
      I input: ./
      Sys output: -bash: ./ No such file or directory

      I don’t know what I am doing wrong, all kernel updates say:
      no packages marked for update or already installed and latest version

      please help (at your earliest convenience of course!) :)

      • Hi Zosimo,

        What happens when you click “Install Guest Additions…”?

        Does it mount automatically Virtual Box guest additions on your system?

    3. Hello,
      I have spent the better part of my night trying to install the Virtual Box Guest additions
      My issue was that the install could not find any flies related to kernels under /usr/src/kernels.
      The folder showed as empty.
      The issue was I could not view the files in that folder when logged in to the root account…
      When I logged out and logged back in as “user” then I could view the files and install Virtual Bx guest with no issues…..
      I hope this save someone some time!
      Can any one tell me why I could not view the files in /usr/src/kernels logged in as root?

      • Hi [email protected],

        This sounds interesting, could you post output of following command as normal user and root user:

        ls -la /usr/src/kernels

        Could you also post output of following commmand:

        rpm -qa kernel\* |sort
    4. Here is the output:

      [[email protected] ~]# ls -la /usr/src/kernels
      total 12
      drwxr-xr-x. 3 root root 4096 Nov 21 23:53 .
      drwxr-xr-x. 4 root root 4096 Nov 22 00:45 ..
      drwxr-xr-x. 22 root root 4096 Nov 22 00:45 2.6.32-279.14.1.el6.x86_64
      [[email protected] ~]# rpm -qa kernel\* |sort
      [[email protected] ~]#

      I’m not sure what I did but after getting the tools on CentOS 6.3 the files now show in the /user/src/kernels directory….
      this only happen after logging in as “USER” and installing the tools under that account

      The first time I ran this command “rpm -qa kernel\* |sort” before getting the tolls installed
      it only showed a total of 8 and not 12…

      this is day 3 of me “playing” with Linux so I’m a bit lost in all of this….

      • Your output looks just normal now. It’s hard to say why you get different output now, but normally you should see all files as root user.

    5. Thanks! Woks fine for me!

    6. Hi,

      This is a nice guide, thank you!
      But I am running into an issue at this step-

      ## Current running kernel on CentOS and Red Hat (RHEL) ##
      KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`

      I am trying to install Centos 6.3 on a Virtual Box.

      When I run the above command, I get-

      bash: -i686: command not found

      I saw one of the earlier comments and tried the above command with a ‘-i686’ at the end, but that gave the exact same error as well.

      I am stuck, and would really appreciate help!

      Thank you much and regards!

      • Hi Sumi,

        Could you post output of following commands:

        ls -la /usr/src/kernels/
        uname -a
    7. Hi JR,

      Thanks for your response. After my last post, I set KERN_DIR to point to 2.6.32-279.14.1.el6.i686 in usr/src/kernels. But I don’t know if that will cause any trouble. I haven’t used the virtualbox much since then. I am curious why it doesn’t like the path with the ” `uname” and stuff.

      Here are the outputs of the commands you asked me to run-

      [[email protected] sire]# ls -la /usr/src/kernels
      total 16
      drwxr-xr-x. 4 root root 4096 Dec 18 19:39 .
      drwxr-xr-x. 4 root root 4096 Dec 18 20:31 ..
      drwxr-xr-x. 22 root root 4096 Dec 18 20:31 2.6.32-279.14.1.el6.i686
      drwxr-xr-x. 22 root root 4096 Dec 18 16:55 2.6.32-279.el6.i686
      [[email protected] sire]# uname -a
      Linux vmCentos 2.6.32-279.14.1.el6.i686 #1 SMP Tue Nov 6 21:05:14 UTC 2012 i686 i686 i386 GNU/Linux

      Thanks and look forward to hearing from you!

      • Hi again Sumi,

        Yes you can use latest kernel path directly.

        What you get if you try following commands:

        echo /usr/src/kernels/`uname -r`
        echo /usr/src/kernels/`uname -r`-`uname -m`
    8. Package requirements also include bzip2 and make

      • Correction… requires dkms also… Tested on a minimal install. You should update your walkthrough.

        Package requirements also include bzip2 and make

        yum install gcc kernel-devel kernel-headers dkms make bzip2

        • Hi Kent,

          Thanks for this information! I updated this guide!

    9. I am trying to install guest additions on CentoOS 6.3 running in VirtualBox on a Windows 7 64 bit host.

      Followed all the steps but get the following message in vboxadd-install.log after attempting to run sh ./ The only part that failed was the “Building the main Guest Additions module”.

      *** Error: KERN_DIR does not point to a directory.

      I have tried setting KERN_DIR to each of the following without success
      KERN_DIR=/usr/src/kernels/`uname -r`

      The /usr/src/kernels/2.6.32-279.19.1.e16.x86_64 does exist and has stuff in it. There is only the one directory in /usr/src/kernels

      Any suggestions?

      • Hi Barry,

        Did you run export KERN_DIR?

        export KERN_DIR
      • Make sure you reboot if you did the yum update kernel*.
        I had the same issue until I did.

    10. Thanks so much. I was totally stuck on how to get a Centos minimal vm to install the guest additions from bash and your instructions saved the day.



    11. Absolutely thanks, I have followed all the steps and worked. (Before this, the full screen option had not worked).

    12. For CentOS 6.3 KERN_DIR should be KERN_DIR=/usr/src/kernels/`uname -r`

      uname -m is not needed.

      • Hi Morgan,

        And thank you for this note. I updated guide, now just CentOS 5 and RHEL 5 needs uname -m. :)

    13. Thanks for the article! I used to hate trying to install guest additions…

1 2 3 4 5 6 15

Leave a Reply to Daniel Fonseca Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.