Server Upgrade | Getting a VM running

Alright! Time to get VM’s rolling.

I’m going to be running phpvirtualbox on Ubuntu Server 12.04.3. The phpvirtualbox software will work really well because it’s web based and the server is headless.

Basically I’m following these guides:

http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.1-on-a-headless-ubuntu-12.04-server

http://www.howtoforge.com/managing-a-headless-virtualbox-installation-with-phpvirtualbox-ubuntu-12.04

https://gist.github.com/dominicsayers/3012172

And doing the following:

Install VirtualBox – note you will most likely need to upgrade

sudo nano /etc/apt/sources.list.d/virtualbox.list

Add the line

deb http://download.virtualbox.org/virtualbox/debian raring contrib non-free

To that file then exit by hitting ^X. Continuing:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install dkms unzip
sudo apt-get install virtualbox-4.2 --no-install-recommends
wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.12.vbox-extpack

Then install phpvirtualbox

sudo apt-get install apache2 php5 libapache2-mod-php5
sudo service apache2 restart
sudo adduser --ingroup vboxusers vbox
wget 'http://sourceforge.net/projects/phpvirtualbox/files/latest/download' -O phpvirtualbox-latest.zip
sudo unzip phpvirtualbox-latest.zip -d /var/www
cd /var/www
sudo mv phpvirtualbox-latest phpvirtualbox
cd phpvirtualbox
sudo mv config.php-example config.php
sudo nano config.php

Edit this file to set $username and $password match the user you created earlier
Also add the following disable phpVirtualbox’s authentication:

var $noAuth = true;

Then ^X to exit. Continue with the installation:

sudo nano /etc/default/virtualbox

Add the line:

VBOXWEB_USER=vbox

Then ^X to exit. Start virtualbox with:

sudo /etc/init.d/vboxweb-service start

And then navigate to yourserversip/phpvirtualbox

Then getting a virtalbox VM running inside of that is easy!

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.