Installing VirtualBox with headless support

From Fyzix
Jump to: navigation, search

Installing Virtualbox

Reference: http://aptosid.com/index.php?name=PNphpBB2&file=viewtopic&t=795

Simple VirtualBox installation guide: http://digitizor.com/2011/01/07/virtualbox-4-0-install-ubuntu/

Virtual Box Download site: https://www.virtualbox.org/wiki/Downloads

Add to /etc/apt/sources.list:

#Virtual Box
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib non-free

Fetch Oracle Public Key

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

Run aptitude or use upgrade command

apt-get update
apt-get upgrade

Reference: http://wiki.debian.org/VirtualBox and http://www.thegeekstuff.com/2012/02/virtualbox-install-create-vm/

Install Virtualbox

Check to make sure you're using the latest version here: https://www.virtualbox.org/wiki/Downloads

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: https://www.virtualbox.org/wiki/Downloads

cd /source
wget http://download.virtualbox.org/virtualbox/4.3.20/Oracle_VM_VirtualBox_Extension_Pack-4.3.20-96996.vbox-extpack

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: https://code.google.com/p/phpvirtualbox/downloads/list

cd /source/
wget https://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.2-6.zip
unzip phpvirtualbox-4.2-6.zip
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 http://code.google.com/p/phpvirtualbox/ 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

Reference: http://www.howtoforge.com/managing-a-headless-virtualbox-installation-with-phpvirtualbox-opensuse-12.2

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

VBOXWEB_USER=vbox

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 = 'http://10.9.9.4:18083/';
// Host / ip to use for console connections
#var $consoleHost = '10.9.9.4';

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

update-rc.d vboxweb-service defaults

Browse to http://server.host/vbox/