Skip to main content

Manage your VirtualBox VMs via the web with phpVirtualBox

Generally speaking, if it is a web-based tool that starts with “php” (such as phpMyAdmin or phpLDAPadmin) you know that tool is going to make your administrative life a lot easier. Such is the case with a php-based tool created to help you manage all of your VirutalBox VMs from a single tool, from anywhere (so long as said “anywhere” is accessible from, you guessed it, anywhere).
I do use VirtualBox and was thrilled to come across phpVirtualBox. This tool is an AJAX implementation of the familiar VirtualBox user interface, so the minute you log in you will be instantly at home. Let’s take a look at how this tool is installed and used.

First things first

You need to make sure you have the latest VirtualBox installed as well as the Extension Pack. You can run phpVirtualBox with the 3.x release of VirtualBox, but there are a lot more features available in the 4.x release. You can download both from the VirtualBox download page. You will also need to have the PHP Soap extension. This can be installed by searching for the package php-soap in your Add/Remove Software tool. Once you have that installed, you are then ready to install and configure the phpVirtualBox application.
You will also have to have a working Apache server on the target machine. If you do not have that, you can go ahead and do a full LAMP install (which will cover a lot of your basics).

Installing phpVirtualBox

First download the compressed installation file from the download page. Make sure you download the release that is correct for the version of VirtualBox you have installed. What you need to do is to move that file into your web server’s document root and then unpack it. When you unpack the file you will have a newly created directory /var/www/phpvirtualbox-XXX Where XXX is the release number. I highly recommend you rename that directory to just /var/www/phpvirtualbox.
After you have the file unpacked, you need to do a minor configuration. This minor configuration is in the /var/www/phpvirtualbox/config.php. NOTE: Depending upon your distribution, your document root will differ.
You really only need configure the following options:
  • var $username
  • var $password
Make sure the username and password are for the user that will actually run the virtualbox application (so this won’t be a root user).
You are now ready to fire up daemon. To run this simply issue the command vboxwebsrv. This will run the daemon that will allow you to log into your phpvitualbox machine. NOTE: If you are using VirtualBox 4.x you can start the daemon with the command /etc/init.d/vbweb-service. There is one catch with that, you still want to run the web service as the user that will run VirtualBox.

Log in

Open up a browser and point it to http://ADDRESS_TO_SERVER/phpvirtualbox. When you do this you will see the VirtualBox interface embedded into your web browser. You can then use VirtualBox from within that web browser as if it were on the local machine!

Gotcha

If you are running VirtualBox 3.x you will need to take one other step (prior to starting up the daemon). Open up your terminal window and issue the command:
VBoxManage setproperty websrvauthlibrary null
Once that command has run, you can then start up the daemon and use VirtualBox through your webbrowser.

Comments

Popular posts from this blog

Top 5 Women Who Impacted Technology in 2010

Katie Stanton, International Strategist for Twitter Katie Stanton has impressively long names of companies in her resume. They include the White House, Google Inc, and her latest addition is Twitter. Her remit is working on Twitter’s international strategy and her experience in social media will be a key asset to the company. Katie has a history of working in technology, and her knowledge of departmental laws will help Twitter work alongside government agencies, as she’ll be spearheading the free information approach, especially after the Wikileaks incident. Stanton has been a key player in the techsphere for some time, and this extends to her private life. Following the Haiti disaster she worked with a group of engineers to create a free texting service to help those in need and she is constantly in demand as an expert in both social media and government policy.
Caterina Fake, Co-Founder of Flickr and Hunch Despite having a surname which sounds like a pseudonym for a spy (it’…

AT&T MiFi 2372 review

In the week or so that I have been testing the AT&T MiFi 2372 by Novatel Wireless, it has already saved no less than three lives. First, it saved my cable guy’s life. You see, Time Warner Cable provides the worst home Internet service I have ever experienced. I can’t even think of a close second. If providing terrible home Internet service was a sport, Time Warner Cable would be on its tenth consecutive undefeated season. Forget the fact that my upload speed is capped at 60Kbps and I’m lucky if I can get half that — it has been months since I’ve gone through a full day without at least one service interruption. Months. Unfortunately, Time Warner Cable has an exclusive contract with my building so I have no choice but to endure its abysmal service. Last week, as a Time Warner Cable technician entered my home for the sixth time in two months, I realized that this certainly would have spelled serious trouble had it not been for my trusty new back up device. Before the Mi…

Evolution Of Computer Virus [infographic]