From Indie IT Wiki
Jump to: navigation, search

HOWTO: INSTALL: Ubuntu PPA Repository

sudo apt-get install dkms
wget -q -O - | sudo apt-key add -
sudo sh -c 'echo "deb utopic non-free contrib" >> /etc/apt/sources.list.d/'
sudo apt-get update && sudo apt-get install virtualbox-4.3

In the final line above alter the version number to the latest available.

HOWTO: Physical To Virtual

HOWTO: ADD: User To VirtualBox Group

Terminal :~$

sudo usermod -aG vboxusers username

HOWTO: FIX: Missing Menu Bar

To re-establish the menu bar (Machine - View - Devices - Help) on a running virtual press host+C (host is by default the right hand CTRL key).

HOWTO: FIX: Kernel Error


  1. Install gcc-4.9
  2. Reconfigure to use gcc-4.9
  3. Redo VBox Kernel drivers
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 30
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 30
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
which gcc
/usr/bin/gcc -v
sudo /sbin/rcvboxdrv setup


This error message when trying to start a virtual machine:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.24-21-386) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

Until it is resolved you will not be able to run any VirtualBox virtual machines.

The error relates to a change of the kernel of the host system not being updated within VirtualBox.

To correct:


sudo KERN_DIR=/usr/src/linux-source-2.6.24   /etc/init.d/vboxdrv setup

Change the above line to reflect your running kernel.

Solution found here.

HOWTO: Command Line Tools


VBoxManage --help

List VMs

VBoxManage list vms

List Running VMs

VBoxManage list runningvms

Show VM Info

VBoxManage showvminfo "Ubuntu Server 16.04"

Start VM GUI

VBoxManage startvm "Ubuntu Server 16.04" --type gui

Start VM Headless

VBoxManage startvm "Ubuntu Server 16.04" --type headless

Shutdown VM

VBoxManage controlvm "Ubuntu Server 16.04" acpipowerbutton

Shutdown All Running VMs

VBoxManage list runningvms | sed -r 's/.*\{(.*)\}/\1/' | xargs -L1 -I {} VBoxManage controlvm {} acpipowerbutton