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:
- 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:
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/.