Managing A Headless VirtualBox Installation With phpvirtualbox (CentOS 6.2)
|
Submitted by falko (Contact Author) (Forums) on Sun, 2012-07-08 21:45. :: CentOS | VirtualBox | Virtualization
Managing A Headless VirtualBox Installation With phpvirtualbox (CentOS 6.2)Version 1.0 phpvirtualbox is a web-based VirtualBox front-end written in PHP that allows you to access and control remote VirtualBox instances. It tries to resemble the VirtualBox GUI as much as possible to make work with it as easy as possible. It is a nice replacement for the VirtualBox GUI if you run VirtualBox on headless servers (like in the tutorial VBoxHeadless - Running Virtual Machines With VirtualBox 4.1 On A Headless CentOS 6.2 Server). This tutorial explains how to install phpvirtualbox on a CentOS 6.2 server to manage a locally installed, headless VirtualBox. I do not issue any guarantee that this will work for you!
1 Preliminary NoteI'm assuming that a headless VirtualBox is already installed on the local CentOS 6.2 server, e.g. as described in the tutorial VBoxHeadless - Running Virtual Machines With VirtualBox 4.1 On A Headless CentOS 6.2 Server. I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root.
2 Installing phpvirtualboxFirst 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 Create the file /etc/default/virtualbox and put the line VBOXWEB_USER=vbox in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox): vi /etc/default/virtualbox
Next create the system startup links for vboxwebsrv and restart it: chkconfig --levels 235 vboxweb-service on We need a web server with PHP support to serve phpvirtualbox - I'm using Apache2 here. Install Apache2 and PHP5 as follows: yum install httpd php php-mysql php-pear apr apr-util-sqlite apr-util-ldap apr-util wget Now configure your system to start Apache at boot time... chkconfig --levels 235 httpd on ... and start Apache: /etc/init.d/httpd start I want to serve phpvirtualbox from Apache's default virtual host with the document root /var/www/html (I will install it in /var/www/html/phpvirtualbox) - if you have a different document root, you must adjust the following steps: cd /var/www/html Unzip phpvirtualbox and rename the phpvirtualbox-4.1-7 to phpvirtualbox for ease of use: unzip phpvirtualbox-4.1-7.zip Next go to the /var/www/html/phpvirtualbox/ directory... cd /var/www/html/phpvirtualbox/ ... and create the file config.php by copying it from config.php-example: cp config.php-example config.php Open config.php and fill in the password you created earlier for the vbox system user: vi config.php
That's it already - you can now open a browser and access phpvirtualbox as follows: http://www.example.com/phpvirtualbox/ The default username is admin, the password is admin as well: This is how phpvirtualbox looks - much like the native VirtualBox GUI:
|






Recent comments
3 hours 1 min ago
12 hours 29 min ago
13 hours 18 min ago
16 hours 52 min ago
21 hours 16 min ago
21 hours 38 min ago
23 hours 47 min ago
1 day 9 hours ago
1 day 14 hours ago
1 day 16 hours ago