usually ctrl-d
(or cmd-d
on OSX) when booted with GUI mode in virtualbox.
if the vagrant box has been booted, then open virtualbox GUI => modify machine settings => select storage, insert the additions image(iso file) by hand
$ aptitude install build-essential linux-header-`uname -r`
$ mount /dev/sr0 /media/cdrom
$ /media/cdrom/VBoxLinuxAdditions.run --nox11
$ reboot
or outside virtual machine (vagrant)
$ vagrant reload