VirtualBox extensions

Published

I happened to run into a Vagrant image today that required the USB2 controller extension to VirtualBox. The procedure to install the extension pack was not immediately clear to me.

Installing through the VirtualBox GUI

When trying to go through the VirtualBox GUI, the application would close when I clicked on 'add new package' in the preferences window. Guessing it had something to do with root privileges I tried to run the GUI with sudo but that failed because I'm using Wayland and it could not find display :0. Using Gnome3, gksudo is no longer available and the replacement is pkexec which uses PolicyKit. running pkexec VirtualBox opened the nice Gnome3 authentication prompt but resulted in the same error. Giving up on starting the VirtualBox GUI as root, I moved my efforts to the VBoxManage CLI.

Installing with the VBoxManage CLI

Here are the steps I took to successfully install the extension pack:

  1. Find the version of VirtualBox you have installed by running VBoxManage --version.
  2. Download the matching version of the extension pack from https://www.virtualbox.org/wiki/Downloads if you're using the latest version or from https://www.virtualbox.org/wiki/Download_Old_Builds if you're using an older version.
  3. Assuming you're using version 5.1.10, install the extension pack by running VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.1.10-112026.vbox-extpack. For me, this opened the same nice Gnome3 authentication prompt.