Ubuntu 16.04 Addons Setup
Well cowpoke, I seem to always forget the steps required wrangling up an Ubuntu VM in the proper way on VirtualBox. This should get you going from a fresh install to a loaded wagon. Ford the river and keep coding.
sudo su mount /dev/cdrom /media/cdrom -o loop cd /media/cdrom. apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r). ./VBoxLinuxAdditions.run. reboot
This has been tested on Ubuntu 16.04 but should work on their next release due out in 2018.04 Bionic Beaver.
Photo generously provided by: https://www.flickr.com/photos/lsmith2010/