LinuxMint 19: Install VirtualBox Guest Additions

This article will describe to build and install VirtualBox Guest Additions.

1 Insert Guest Additions on host machine

Insert Guest Additions from window menu of VirtualBox.

Devices -> Insert Guest Additions CD image

You can also use VBoxManage command to insert Guest Additions.

$ VBoxManage storageattach <uuid> --storagectl "IDE" \
             --port 1 --device 0 --medium additions

You can check uuid with VBoxManage list vms.

$ VBoxManage list vms
"guest-machine" {d9b2252b-3486-4bf3-92d4-de7430b0febc}

2 Build and install Guest Additions on guest machine

Mount Guest Additions.

sudo mount -t iso9660 /dev/sr0 /mnt

Install packages for building Guest Additions.

$ sudo apt install -y gcc make perl linux-headers-generic

Build and install Guest Addtions.

$ sudo sh /mnt/VBoxLinuxAdditions.run

Reboot guest machine.

$ sudo reboot

After reboot, Guest Additions driver which has a vbox prefix is loaded.

$ lsmod | grep vbox
vboxsf                 45056  0
vboxvideo              36864  4
ttm                   106496  1 vboxvideo
drm_kms_helper        167936  1 vboxvideo
drm                   401408  7 vboxvideo,ttm,drm_kms_helper
syscopyarea            16384  2 vboxvideo,drm_kms_helper
vboxguest             303104  3 vboxsf
sysfillrect            16384  2 vboxvideo,drm_kms_helper
sysimgblt              16384  2 vboxvideo,drm_kms_helper