Difference between revisions of "PhpVirtualBox"

From ArchWiki
Jump to: navigation, search
(VirtualBox Web Interface (phpvirtualbox))
Line 15: Line 15:
 
=== VirtualBox Web Interface (phpvirtualbox) ===
 
=== VirtualBox Web Interface (phpvirtualbox) ===
  
Install [http://aur.archlinux.org/packages.php?ID=45291 phpvirtualbox] from AUR on a php-capable web server.
+
Install community/phpvirtualbox on a php-capable web server.
  
 
== Configuration ==
 
== Configuration ==

Revision as of 10:20, 22 September 2011

phpvirtualbox package is web interface for VirtualBox.

Installation

VirtualBox Web Service

First, you should choose to install one VirtualBox edition between:

To use the web console, you must install virtualbox-ext-oracle package from AUR.

VirtualBox Web Interface (phpvirtualbox)

Install community/phpvirtualbox on a php-capable web server.

Configuration

VirtualBox Web Service

If you are using the OSE edition,do something like this on your virtualbox running machine.

vboxwebsrv -b --logfile /dev/null --pidfile /var/run/vbox/vboxwebsrv.pid --host 127.0.0.1

If you are using the UEL edition,there is already a vboxweb script in /etc/rc.d,what you need is adjusting the settings in /etc/conf.d/vboxweb and then start it like the other daemon.

For OSE users,you can also using these scripts form UEL edition package,just put the vboxweb.conf into /etc/conf.d and the vboxweb.rc into /etc/rc.d,you can get them from the virtualbox_bin AUR page.

In the /etc/conf.d/vboxweb,you should take care of VBOXWEB_USER variable which should be set to the system username running the the vboxwebsrv command.

VirtualBox Web Interface

Edit /etc/webapps/phpvirtualbox/config.php

1. Change the following lines into the system username you previous set in /etc/conf.d/vboxweb as well as its password.(Yes,for now,it is clear password here,may be these could be changed in the future release.)

var $username = ;
var $password = ;

2. Change the following line into the ip address and the port your vboxwebsrv is running and lisenning.For most installations,it should be localhost and tcp port 18083.It is recommended to install you virtualbox web service and the virtualbox web interface in the same machine,because the username and the password you previous set is passing as the clear text.

var $location = 'http://127.0.0.1:18083/';

3. If you do not want to use the authertion,you can uncomment the following line.

#var $noAuth = true;

Edit /etc/webapps/phpvirtualbox/.htaccess,comment or remove the following line.

deny from all

Edit /etc/php/php.ini,make sure the following lines is uncommented.

extension=json.so
extension=soap.so

If you are running apache as webserver,you can copy /etc/webapps/phpvirtualbox/apache.example.conf into /etc/httpd/conf/extra/phpvirtualbox.conf,and then add following line into /etc/httpd/conf/httpd.conf

Include conf/extra/phpvirtualbox.conf

To user web console,you should install the virtualbox-ext-oracle package from AUR,and then change the virtual machine setting,enable the remote desktop access on display panel and specify an port different with the other virtual machines.

Running

If everything works fine,visit http://YourVboxWebInterfaceServer/phpvirtualbox should show an login box.The initial username and password are both admin,after login,you can change you password and control users in the web interface.If you set $noAuth=true in the config.php,you should be immediately seen the phpvirtualbox web interface.

Debugging

If you enconter an login problem,and you are upgrade your virtualbox from 3.2.x to 4.0.x,you should run the following command to update you websrvauthlibrary in you virtualbox configuration file which has been changed form VRDPAuth.so to VBOXAuth.so.

VBoxManage setproperty vrdeauthlibrary default
VBoxManage setproperty websrvauthlibrary default 

If you are still unable to login into the interface,you can try to disable webauth by

VBoxManage setproperty websrvauthlibrary null

on virtualization server and set username and password to empty strings and set $noAuth=true in /etc/webapps/phpvirtualbox/config.php on web server.By doing this,you should immediatelly access the web interface without login process.And then,maybe you can try some apache access control.

External Resources