Table of Contents
Install VirtualBox Guest Additions in Ubuntu and with this you’ll be able to copy-paste, drag and drop between the host and guest system. It makes using Ubuntu in virtual machine a lot easier
The VirtualBox Guest Additions consist of device drivers and system applications that optimize the operating system for better performance and usability. These drivers provide a tighter integration between the guest and host systems.
Why should you use VirtualBox Guest Additions?
With VirtualBox Guest Additions enabled, using the virtual machine becomes a lot more comfortable. Don’t believe me? Here are the important features that the Guest Additions offer:
- Mouse pointer integration: You no longer need to press any key to “free” the cursor from the Guest OS.
- Shared clipboard: With the Guest Additions installed, you can copy-paste between the guest and the host operating systems.
- Drag and drop: You can also drag and drop files between the host and the guest OS.
- Shared folders: My favorite feature; this feature allows you to exchange files between the host and the guest. You can tell VirtualBox to treat a certain host directory as a shared folder, and the program will make it available to the guest operating system as a network share, irrespective of whether guest actually has a network.
- Better video support: The custom video drivers that are installed with the Guest Additions provide you with extra high and non-standard video modes, as well as accelerated video performance. It also allows you to resize the virtual machine’s window. The video resolution in the guest will be automatically adjusted, as if you had manually entered an arbitrary resolution in the guest’s Display settings.
- Seamless windows: The individual windows that are displayed on the desktop of the virtual machine can be mapped on the host’s desktop, as if the underlying application was actually running on the host.
- Time synchronization: The Guest Additions will resynchronize the time with that of the Host machine regularly. The parameters of the time synchronization mechanism can be configured.
- Automated logins: Basically, credentials passing, it can be a useful feature.
Installing VirtualBox Guest Additions on Ubuntu Automatically
1. First run your Ubuntu virtual machine then login into the VM.
2. Select Device > Insert Guest Additions CD image…:
3. This will provide you with the required installer inside the guest system (i.e., the virtual operating system). It will try auto-running, so just click Run button.
This should open up the installation in a terminal window. Follow the on-screen instructions and you’ll have the Guest Additions installed in a few minutes at most.
Troubleshooting
If you get an error like this one, it means you are missing some kernel modules (happens in some cases, such as minimal installs):
You need to install a few more packages here. Just to clarify, you need to run these commands in the virtual Ubuntu system:
sudo apt install build-essential dkms linux-headers-generic -y
Now run the Guest Addition setup again:
sudo rcvboxadd setup