How to Speed up Ubuntu 16.04 and 17.04 in VirtualBox

Do you know why Ubuntu runs slow in VirtualBox? The main reason is that the default graphics driver installed in VirtualBox doesn’t support 3D acceleration. To speed up Ubuntu in VirtualBox, you need to install guest additions which contains a more capable graphics driver that supports 3D acceleration.

How to Check if 3D Acceleration is supported

Start up your Ubuntu virtual machine. Then in a terminal window, type the following command:

/usr/lib/nux/unity_support_test -p

This is the output on a newly installed Ubuntu 17.04 VirtualBox machine.

enable 3D acceleration in ubuntu virtualbox

Take a look at the last line which tells us that Unity 3D is not supported. We need to fix that.

Speed up Ubuntu 17.04 in VirtualBox by Installing VirtualBox Guest Additions

VirtualBox guest additions allows you to set up shared folders, enable bidirectional shared clipboard between host and guest, and power up the graphics ability of your guest machine. It’s a set of device drivers (graphics and mouse drivers) and system applications that is going to be installed in the guest OS.

To install guest additions, first we need to install some tools for compiling kernel modules. In the Ubuntu virtual machine, run the following command to update existing software.

sudo apt update && sudo apt dist-upgrade

Please note that if a new kernel is installed, you need to reboot Ubuntu. Then install  required packages for building kernel modules.

sudo apt install build-essential module-assistant dkms

Next, prepare your system to build kernel module.

sudo m-a prepare


speed up ubuntu virtualbox

In VirtualBox menu bar, select Devices > Insert Guest Additions CD image.

speed up ubuntu 16.04 on virtualbox

You might be asked to download the guest additions CD image if it cannot be found on your hard drive. Click Download. Once the download is complete, click Insert button to insert the CD image into the virtual optical drive.

If the guest additions CD image had already been downloaded before, then you will be asked to run the software contained in it, click Run button.

install virtualbox guest additions in ubuntu 17.04

Then enter your password and it will begin compiling the VirtualBox guest additions kernel modules. You may be notified that your system already have a version of the VirtualBox Guest Additions, but built-in version is of low quality. So enter yes to continue.

ubuntu virtualbox speed up

Once the guest additions is installed, press Enter to close the terminal window and shut down your Ubuntu virtual machine. (Don’t reboot it now.)

Go to your VirtualBox settings. Click Display on the left pane. In the Screen tab, allocate 128M video memory to Ubuntu VM and make sure Enable 3D Acceleration is checked. Save you settings.

ubuntu virtualbox enable 3d acceleration

Start Ubuntu virtual machine. It should be running much faster now because Unity 3D is supported with the new graphics driver. Run the following command in a terminal window.

/usr/lib/nux/unity_support_test -p

You will see that Unity 3D is supported.

virtualbox unity 3d support

Other Tips to Speed up Ubuntu in VirtualBox

You can also check out 4 tips to speed up Ubuntu, which also goes for Ubuntu virtual machine.

That’s it! I hope this tutorial helped you make Ubuntu faster in VirtualBox. As always, if you found this post useful, then subscribe to our free newsletter or follow us on Google+, Twitter or like our Facebook page.

Rate this tutorial
[Total: 5 Average: 3]