Trying to install the VirtualBox guest additions in a non desktop system I encounter errors. Luckily the solution wasn’t too difficult to fix.
Mount the Guest Additions CD.
sudo mount /dev/cdrom /media/cdrom
Install kernel build software:
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
Run the installer on the CD:
sudo sh /media/cdrom/VBoxLinuxAdditions.run
Not as simple as the desktop version but for a non GUI installer it should not be beyond many people who are familiar with command line. It’s a shame Oracle hasn’t improved the script for the server edition.