How to setup Virtualbox guest additions on Fedora 20

11 Flares Filament.io 11 Flares ×

Fedora 20 (Heisenbug) is currently the latest release and if you want to try it on VirtualBox then install the guest additions for full functionality.

Installation is simple and takes a few steps, but involves download and updates which would require some bandwidth.

1. Update Fedora

The first thing to do is to upgrade all packages and make the system uptodate.

$ sudo yum distro-sync

2. Install kernel headers and build tools

VirtualBox guest additions are always compiled so they need necessary build tools and kernel libraries. Install them with the following command.

$ yum -y install kernel-devel kernel-headers dkms gcc gcc-c++

Reboot

After upgrading and installing kernel headers, reboot the system.

3. Compile virtualbox guest additions

Click on Devices > Insert guest additions CD image on the VirtualBox window menu.
The cd image is now available in fedora at /dev/cdrom or /dev/sr0.
Create a directory at home and mount the cd in it.

$ mkdir vboxcd
$ sudo mount /dev/cdrom ~/vboxcd
[sudo] password for silver: 
mount: /dev/sr0 is write-protected, mounting read-only
$ ls
32Bit        cert                    VBoxSolarisAdditions.pkg
64Bit        OS2                     VBoxWindowsAdditions-amd64.exe
AUTORUN.INF  runasroot.sh            VBoxWindowsAdditions.exe
autorun.sh   VBoxLinuxAdditions.run  VBoxWindowsAdditions-x86.exe

Next run the VBoxLinuxAdditions.run script. The output should look similar to this

$ sudo ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.6 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules           [  OK  ]
Removing existing VirtualBox non-DKMS kernel modules       [  OK  ]
Building the VirtualBox Guest Additions kernel modules     [  OK  ]
Doing non-kernel setup of the Guest Additions              [  OK  ]
Starting the VirtualBox Guest Additions                    [  OK  ]
Installing the Window System drivers
Installing X.Org Server 1.14 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  ]

$






The line that builds the VirtualBox Guest additions kernel modules is the important one and must not fail

Building the VirtualBox Guest Additions kernel modules     [  OK  ]

Done, Now reboot.

4. Verify that guest additions are loaded

After the reboot the screen resolution of fedora guest should adapt to virtualbox window size which indicates that the guest additions are working. You can additionally verify that the kernel modules are loaded or not, with the following command

$ lsmod | grep -i vbox
vboxsf                 43786  0 
vboxvideo              12658  1 
drm                   283349  2 vboxvideo
vboxguest             231692  8 vboxsf
$

The vboxguest module indicates that virtualbox guest additions kernel module is loaded and working.

5. Configure shared folders

The last thing is to configure shared folders so that you can easily exchange files between the host and guest OS. Click on "Devices > Shared Folder Settings" in the Virtualbox window. Click the icon on right to add a new shared folder. Select the directory on your host system that is to be shared with the guest Fedora 20.

Make sure to give a proper folder name, since it would be used to mount the directory inside Fedora.
Check "Make Permanent" if you want shared folder setting persistent. Permanent shared folders are listed under Machine Folders, where as the non-permanent ones go under the Transient Folders list.

After selecting the folder to share, now mount the folder inside Fedora using the folder name specified earlier. The command to use is mount

$ sudo mount -t vboxsf enlightened ./vboxshared
OR
$ sudo mount.vboxsf enlightened ./vboxshared

vboxshared is the name of the directory where we mount the shared folder. Make sure that the directory exists. The mount command would now show that the directory is mounted

$ mount | grep vboxsf
none on /home/silver/vboxshared type vboxsf (rw,nodev,relatime)
Last Updated On : 14th March 2014

Subscribe to get updates delivered to your inbox

  • 2dy4

    Thanks, it worked almost like a charm on my CentOS 7 server environment. CentOS mounts the ./vboxshared folder as /media/sf_vboxshared. But it works as long as you use the under CentOS created foldername sf_vboxshared name as foldername in the Device->Shared Folder Settings.

  • David

    you are the best. It worked all so perfectly.

  • Marcus Moeller

    VirtualBox-guest is available in rpmfusion. You can just enable it as described here:

    http://rpmfusion.org/Configuration

    and do a yum install VirtualBox-guest afterwards.

  • HG

    @sainathsr:disqus
    Try to activate 3D experience in your VM settings

  • Sainath S.R

    Thanks Installed guest additions ,but performance still low
    Specs
    Core2Duo E4500
    1GB Ram for guest
    128 Mb Video Mem

  • Tj Geezer

    By far the best procedure I’ve found. Worked the first time with a new Fedora xfce install, smooth as can be. Now I can learn the Fedora RPM way of doing things without losing my main Mint based on Ubuntu tagging along with Debian that finally freed me from Windows. Way too much fun for a coot my age. Thanks!

  • IbnSaeed

    Thanks for the steps.

    It worked perfectly on a new install of Fedora Mint and Xfce

  • newatfedora

    thanks

  • gg

    why is linux got to be so complicated?
    Thanks for the tutorial btw

11 Flares Twitter 1 Facebook 6 Google+ 4 LinkedIn 0 StumbleUpon 0 Filament.io 11 Flares ×