Installing VirtualBox with headless support

From Fyzix
Jump to: navigation, search

Installing Virtualbox


Simple VirtualBox installation guide:

Virtual Box Download site:

Add to /etc/apt/sources.list:

#Virtual Box
deb wheezy contrib non-free

Fetch Oracle Public Key

wget -q -O- | sudo apt-key add -

Run aptitude or use upgrade command

apt-get update
apt-get upgrade

Reference: and

Install Virtualbox

Check to make sure you're using the latest version here:

apt-get install dkms
apt-get install virtualbox-4.3

Installing VirtualBox Extension Pack

Check to make sure you're using the latest version here:

cd /source

Install the extension pack

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996.vbox-extpack

Installing phpvirtualbox

Download the latest stable phpvirtualbox:

cd /source/
mv phpvirtualbox-4.2-6 /var/www/vbox

Rename config.php-example to config.php and edit as needed.

cd /var/www/vbox
cp config.php-example config.php
pico config.php

Default login is username: admin password: admin

Please see the wiki located at for detailed installation and configuration instructions.

Password Recovery:

Rename the file recovery.php-disabled to recovery.php, navigate to it in your web browser, and follow the instructions presented.

Virtualbox Headless


First create a system user called vbox and add it to the vboxusers group:

useradd -m vbox -G vboxusers

Create a password for the vbox user:

passwd vbox

Edit /etc/default/virtualbox and put in the line


Edit /var/www/vbox/config.php

Change username and password for the system host if you haven't already

/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'cheese123';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = '';
// Host / ip to use for console connections
#var $consoleHost = '';

Make VirtualBox Web Server a service if it isn't already.

update-rc.d vboxweb-service defaults

Browse to