To fix the issue I had to run sudo apt-get install virtualbox-guest-additions-iso and mount the ISO in virtualbox before running the VM. The ISO should be located in /usr/share/virtualbox/VBoxGuestAdditions.iso.