Virtualbox Guest additions on Fedora

This post describes how to install virtualbox guest additions on a Fedora virtual machine.

Virtualbox guest additions adds a couple of features to running Fedora on virtualbox. Some of the useful features are shared folders, mouse pointer support, shared clipboard and better video driver support.

The primary reason I install it is for seamless window resizing. This means that I can change the size of the virtualbox window and the virtual machine will change its screen resolution automatically.

However you need to install a couple additional packages before running the Guest Additions installer, otherwise it will fail.

Installing prerequisites for Guest Additions

Before installing guest additions you need to install a couple prerequisites. Guest additions compiles a new kernel to work well with virtualbox so we need to install the kernel development and header packages.

Before we install all the kernel packages I need to make sure I am running the latest kernel. I then install the latest kernel headers and development files. Since guest additions rebuilds the currently running kernel, if you have updated the kernel now you will need to reboot to load the new one.

sudo dnf update kernel*
sudo dnf install kernel-devel kernel-headers
sudo reboot

After rebooting I can then install Guest additions. Pressing “Insert Guest Additions CD Image” will insert the disk and you will be able to browse to it. Once open you need to open a terminal and run the final command:

sh ./VBoxLinuxAdditions.run

If there are no errors when running this all you need to do is reboot your virtual machine and you should be running the new kernel with guest additions running.

Each time you upgrade your kernel you will need to recompile guest additions. However if you haven’t removed the kernel-devel and kernel-headers package you will only need to run the final command.

One Comment

Leave a Reply

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