For best performance, it's important to install the Oracle VirtualBox Guest Additions as well within the guest VM. These are essentially para-virtualization accelerator software, which greatly helps with optimal performance. Let's see how to do this on an Ubuntu guest session:
- First, update your Ubuntu guest OS's software packages. You can do so using the following command:
sudo apt update
sudo apt upgrade
- On completion, reboot your Ubuntu guest OS and then install the required packages using the following command:
sudo apt install build-essential dkms linux-headers-$(uname -r)
- Now, from the VM menu bar, go to Devices | Insert Guest Additions CD image.... This will mount the Guest Additions ISO file inside your VM. The following screenshot shows what it looks like doing this:

Figure 1.3 – VirtualBox | Devices | Insert Guest Additions CD image
- Now, a dialog window will pop up that will prompt you to run the installer in order to launch it. Select Run.
- The Guest Additions installation will now take place in a Terminal window that shows up. Once complete, hit the Enter key to close the window. Then, power off your Ubuntu guest OS in order to change some settings from the VirtualBox manager, as explained next.
- Now, to enable Shared Clipboard and Drag'n'Drop functionalities between the guest and host machines, go to General | Advanced and enable the two options (Shared Clipboard and Drag'n'Drop) as you wish with the dropdowns:
Figure 1.4 – VirtualBox: enabling functionality between the host and guest
- Then, click OK to save the settings. Now boot into your guest system, log in, and test that everything is working fine.
As of the time of writing, Fedora 29 has an issue with the installation of the
vboxsf kernel module required for the
Shared Folders feature. I refer you to the following resource to attempt to rectify the situation:
Bug 1576832 - virtualbox-guest-additions does not mount shared folder (https://bugzilla.redhat.com/show_bug.cgi?id=1576832).
If this refuses to work, you can simply transfer files between your host and guest VM over SSH (using
scp(1)); to do so, install and start up the SSH daemon with the following commands:
sudo yum install openssh-server
sudo systemctl start sshd
Remember to update the guest VM regularly and when prompted. This is an essential security requirement. You can do so manually by using the following:
sudo /usr/bin/update-manager
Finally, to be safe, please do not keep any important data on the guest VM. We will be working on kernel development. Crashing the guest kernel is actually a commonplace occurrence. While this usually does not cause data loss, you can never tell! To be safe, always back up any important data. This applies to Fedora as well. To learn how to install Fedora as a VirtualBox guest, visit https://fedoramagazine.org/install-fedora-virtualbox-guest/.
Sometimes, especially when the overhead of the X Window System (or Wayland) GUI is too high, it's preferable to simply work in console mode. You can do so by appending 3 (the run level) to the kernel command line via the bootloader. However, working in console mode within VirtualBox may not be that pleasant an experience (for one, the clipboard is unavailable, and the screen size and fonts are less than desirable). Thus, simply doing a remote login (via ssh, putty, or equivalent) into the VM from the host system can be a great way to work.