Sitemap
Cyber Security Write-ups

Discover amazing bug bounty write-ups, blogs, ethical hacking guides, CTF solutions, and Hack The Box walkthroughs from top ethical hackers and cybersecurity experts. Stay ahead with expert insights and practical tips!

How I Fixed Several Common VirtualBox Guest Additions Errors Many People Face on Ubuntu VM

9 min readJun 5, 2026

--

You know that feeling when you think you’re just one “copy and paste” away from finishing your lab setup, only for technology to remind you who’s really in charge?

That was me times back while setting up an Ubuntu virtual machine in VirtualBox. Everything seemed to be going smoothly until I realized something was off. Copy and paste wasn’t working between my host machine and the VM. Not just that but I know you’re aware the user interface appearrance also bbecomes difficult to get the right scale whether normal or scaled. Sometiimes would even be blurry. Oh hmm..

Recently, I faced a similar challenge and thought, why not gather all challenges I faced in the past as well and put the solution into one medium post? So here I am

In this post, I’ll walk through the different issues I encountered in the past and the exact fixes that worked for me, so hopefully you can spend less time troubleshooting and more time actually using your virtual machine in the easiest way possible.

The Errors I Will Be Addressing

  • Missing gcc, make, and perl packages
  • Copy and paste not working between host and guest
  • MD5 checksum errors during Guest Additions installation
  • bzip2, tar not installed

Before anything, don’t forget your ..

sudo apt install update && sudo apt install upgrade
Press enter or click to view image in full size

1. Copy and paste not working between host and guest

This was actually the first sign that something wasn’t right. Back then, I think two years ago when I had just finished setting up Ubuntu in VirtualBox and was ready to solve labs. Naturally, I copied a command from my host machine and tried pasting it into the VM. I tried so many times but nothing. I restarted the machine but still nothing. I know there was Google and AI tools to seek help from but usually, I feel I accomplished somethhing if I figured my way through it. At this point, I was doing the digital equivalent of pressing a TV remote harder when the batteries are dead. If you’ve experienced this, don’t worry. The issue is usually that VirtualBox Guest Additions either isn’t installed or isn’t working properly. And yeah.. I troubleshooted that through Google.

Step 1: Check if Guest Additions Is Available

VirtualBox typically comes with a Guest Additions ISO file. Depending on your installation, you can find it inside the VirtualBox installation directory. On Windows hosts, it’s commonly located in: C:\Program Files\Oracle\VirtualBox\ Look for a file similar to: VBoxGuestAdditions.iso

Press enter or click to view image in full size
Locating VBoxGuestAdditions in file manager

If you can’t find it, don’t panic. It may not have been installed with your VirtualBox version, or it could be missing. In that case, download the matching Guest Additions ISO for your VirtualBox version from Oracle’s VirtualBox downloads page. One important lesson I learned the hard way: try to use a Guest Additions version that matches your installed VirtualBox version. Mixing versions can sometimes lead to installation errors, checksum issues, or features refusing to work (which we’ll be coming to that soon)

Depending on the version you have installed, you can visit the Index of /virtualbox page where you will have access to an index of several versions ranging from v.4.0.0 to v7.2.8 as at now.

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size

Step 2: Mount the Guest Additions ISO

With your Ubuntu virtual machine not running:

  • Right Click the VM and select settings. In the settings menu, select storage and then select the Controller: IDE. Look downwards and click the “add” icon which will show a pop up containing Optical drive and Hard disk. Click the Optical Drive.
Press enter or click to view image in full size
  • Select the “Add” icon and your file system would be opened for you to slect the VboxGuestAdditions iso file you downloaded.
Press enter or click to view image in full size
  • Select the VBoxGuestAdditions iso file and select “Choose”
Press enter or click to view image in full size

Think of this as virtually inserting a CD into a computer. Once mounted, Ubuntu should detect the virtual CD automatically.

Step 3: Run the Guest Additions Installer

Open a terminal and update your packages first:

sudo apt update && sudo apt upgrade

Then navigate to the mounted CD and run the installer. In many cases, Ubuntu will even prompt you automatically to run the software.

Or if you love the terminal, open it within that folder and run

sudo ./VBoxLinuxAdditions.run
Press enter or click to view image in full size

If it works fine, you can just reboot your system afterwards.

Step 4: Enable Shared Clipboard

After rebooting, don’t forget to enable clipboard sharing in VirtualBox.

  • Shut down the VM if it is running and select your VM from the VirtualBox menu. Click Settings afterwards and go to General > Features. Set Shared Clipboard to Bidirectional and optionally set Drag’n’Drop to Bidirectional as well (if you want.. but I don’t need it). Start the VM again and test copying and pasting.
Press enter or click to view image in full size

If copy and paste doesn’t work and infact instead of a successful installation, Guest Additions greeted you with an error.. stay with me. Fortunately, the solution turned out to be straightforward, which we’ll cover in the next section.

2. MD5 checksum errors during Guest Additions installation

Just when I thought I had identified the problem, VirtualBox decided to introduce a new character into the story: verifying file integrity, 100% error in MD5 checksums.

If you’re seeing messages related to checksum verification, corrupted files, or VirtualBox complaining about the Guest Additions image, you may not be alone. At first, I assumed something had gone wrong with Ubuntu.. I mean broken packages. But, the reality was much simpler.

So what Causes the MD5 Checksum Error?

In my case, the issue was caused by an outdated Guest Additions ISO. VirtualBox uses checksum verification to confirm that files haven’t been altered or corrupted. When the Guest Additions image doesn’t match what VirtualBox expects, the installation may fail or generate checksum-related warnings.

This commonly happens when:

  • VirtualBox has been upgraded but Guest Additions has not.
  • An old Guest Additions ISO is still being used.
  • The ISO file became corrupted.
  • The VirtualBox installation itself is outdated.

How I Fixed It

The solution was surprisingly straightforward. First, I checked my VirtualBox version from: Help > About VirtualBox

Get Prince Lassey’s stories in your inbox

Join Medium for free to get updates from this writer.

I then downloaded the latest version of VirtualBox from Oracle and installed it. After upgrading VirtualBox, I also installed the matching Extension Pack. While the Extension Pack wasn’t directly responsible for the checksum issue, keeping the versions aligned helps avoid compatibility problems later.

Press enter or click to view image in full size
VirtualBox Extention Pack

Next, I removed the old Guest Additions image and mounted the updated one. I think I explained the mounting process somewhere above in this post. Once the updated image was attached, the checksum errors disappeared and the installation process proceeded normally. Keeping VirtualBox, the Extension Pack, and Guest Additions on compatible versions can save you a surprising amount of troubleshooting time. With the checksum issue resolved, I we’re finally ready to install Guest Additions properly.. or so I thought. The next obstacle waiting for me was..

3. bzip2, tar not installed

Press enter or click to view image in full size

So yeah.. VirtualBox also relies on some tools to make the guest additions iso file actually work. So this is self explanatory.. I installed both tools using the command

sudo apt install bzip2 tar

Then, I went back to run the VirtualBox Guest Additionss installer…

Press enter or click to view image in full size

Obviously, there was much hope that we conquered it!

But that was a wonderful day time dream lol. The next obstacle waiting for me was an installer error complaining about missing gcc, make, and perl packages. Omo VirtualBox and their Guest Additions package needed more meet.

4. Missing gcc, make, and perl packages

Who wouldn’t have felt confident that they were approaching the finish line? But here was another battle to fight for.

Press enter or click to view image in full size

At this moment, I had two questions:

  • Why didn’t you tell me this earlier?
  • How many more surprises do you have for me?

Of course, the terminal only stared at me. If you’ve encountered this error, Ubuntu is simply telling you that it doesn’t have the tools needed to compile the Guest Additions kernel modules. It had chewed some meat, it needed juice now to push it down its throat lolllll. I just keep on laughing as I write this haha.

Why Does This Happen?

Lets learn a bit from this.. during installation, VirtualBox Guest Additions needs to build kernel modules that allow features such as:

  • Shared Clipboard
  • Drag and Drop
  • Dynamic Screen Resizing
  • Shared Folders
  • Better Mouse Integration

To build those modules, Ubuntu requires a few development tools that may not be installed by default. These include:

  • gcc (the GNU C compiler)
  • make (used to automate the build process)
  • perl (required by parts of the installer kernel headers)
  • files (that match your running kernel)
  • dkms (automatically rebuilds modules after kernel updates

Without these packages, Guest Additions cannot complete its installation.

How I Fixed It

First, update your system.. yes again:

sudo apt update && sudo apt upgrade 

Next, install the required packages:

sudo apt install build-essential dkms linux-headers-$(uname -r) perl
Press enter or click to view image in full size

Once the installation completes, run the Guest Additions installer again.

sudo ./VboxLinuxAdditions.run
Press enter or click to view image in full size

When the installation completed successfully, I read from the terminal: NOTE: you may still consider to re-login if some user session specific services (Shared Clipboard.. continue reading in the image below..

Press enter or click to view image in full size

So, I rebooted the VM:

 sudo reboot 

After the restart, the VM window mayautomatically adjusted its resolution, just for your consumption.. the settings in the user interface: Normal(window) for the appearance and within the Virtual Screen drop down menu, its set to Scale to 100% (unscaled output). This gives your VM a good resolution hence very sharp so details are captured anytime you want to screenshot.

Press enter or click to view image in full size
Press enter or click to view image in full size

But note.. sometimes, the display size won’t behave at the start. You may want to switch to Scaled mode and back to Normal(window) and changes may take effect.

From there.. copy and paste started working, the mouse moved seamlessly between the host and guest. Yeah, after chewing meat and taking the juice, the virtual machine had finally decided to cooperate since VirtualBox was now satisfied.

Verifying the Installation To confirm Guest Additions is working:

  • Resize the VM window and check whether Ubuntu adjusts automatically.
  • Test copy and paste between the host and guest.
  • Check whether shared folders are accessible.

And also check the Devices menu. You should see “Upgrade Guest Additions” which means that the installation completed successfully.

Press enter or click to view image in full size

If all these features are working, congratulations. Hopefully, this guide helps you quickly troubleshoot some of that journey and get back to whatever you originally opened the VM to do in the first place. Maybe.. just maybe more errors might pop up. I may update this post or pile up more errors and make it a version 2 of this.

And if you’re somehow heading to the FIFA World Cup 2026, say hi to the GOAT, CR7, for me. Actually… can I come along? Last time I checked, my passport was still active, lol. Anyways, if this guide saved you from spending hours fighting VirtualBox Guest Additions like I did, then my job here is done.

Peace.

--

Cybersecurity!

See more from me

Cyber Security Write-ups
Cyber Security Write-ups

Published in Cyber Security Write-ups

Discover amazing bug bounty write-ups, blogs, ethical hacking guides, CTF solutions, and Hack The Box walkthroughs from top ethical hackers and cybersecurity experts. Stay ahead with expert insights and practical tips!