Install VirtualBox on Ubuntu 18.04

Note

Virtualbox 6.0.10 appears to be broken / missing kernel modules... avoid it.

cat <<"EOF" >/etc/apt/sources.list.d/virtual-box.list
deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic contrib
EOF

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add 

apt update
apt install linux-headers-$(uname -r) build-essential virtualbox-6.0 dkms

# recompile kernel modules, etc...
/sbin/vboxconfig

systemctl status virtualbox.service

Extension Pack

Before installing, allow VBoxSVC to die by stopping all VMs.

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.10.vbox-extpack

Alternate Machine Folder

VBoxManage setproperty machinefolder ${NEW_PATH}
VBoxManage list systemproperties \
  | grep "Default machine folder:"