Menu

phpVirtualBox – A web-based front end for VirtualBox
phpVirtualBox is a web-based front-end to VirtualBox that allows you to control your VirtualBox environment.An open source, AJAX implementation of the VirtualBox user interface written in PHP. As a modern web interface, it allows you to access and control remote VirtualBox instances. phpVirtualBox is designed to allow users to administer VirtualBox in a headless environment - mirroring the VirtualBox GUI through its web interface.
INSTALLATION 
[Install Apache & PHP]
$ sudo apt-get install apache2 php5 php5-mysql libapache2-mod-php5 php-soap

[Start Apache Service on deb based system & openSUSE]
$ sudo systemctl start apache2
$ sudo /etc/init.d/apache2 start

[Start Apache Service on RPM based system]
$ sudo systemctl start httpd
$ sudo /etc/init.d/httpd start
Visit phpVirtualBox official Website and download the latest version phpVirtualBox
$ sudo wget https://sourceforge.net/projects/phpvirtualbox/files/phpvirtualbox-5.0-5.zip
$ sudo unzip phpvirtualbox-5.0-5.zip
$ sudo mv phpvirtualbox-5.0-5 /var/www/html/phpvirtualbox
$ sudo chmod 777 /var/www/html/phpvirtualbox
VirtualBox provides a service called vboxwebsrv which allow phpVirtualBox to connect to it.
[Create Vboxwebsrv user : Use existing user or create new users as your wish]
$ sudo useradd virtual
$ sudo passwd virtual

[Add the user to vboxuser group]
$ sudo usermod -a -G vboxuser virtual
Edit or create the following configuration file using your preferred text editor and Add the following contents.
$ sudo nano /etc/default/virtualbox
VBOXWEB_USER="virtual"
Configure phpVirtualBox by editing config.php file.
$ sudo cp /var/www/html/phpvirtualbox/config.php-example /var/www/html/phpvirtualbox/config.php
$ sudo nano /var/www/html/phpvirtualbox/config.php
[...]
var $username = 'virtual';
var $password = '12345';
[...]
Start the virtualbox web service
[Start the virtualbox web service on systemd Systems]
$ sudo systemctl start vboxweb-service

[Start the virtualbox web service on SysVinit Systems]
$ sudo /etc/init.d/vboxweb-service start
Enable the virtualbox web service on boot.
[Start the virtualbox web service on systemd Systems]
$ sudo enable start vboxweb-service

[Start the virtualbox web service on SysVinit Systems]
$ sudo chkconfig vboxweb-service on
Restart Apache Web service.
[Restart Apache Service on deb based system & openSUSE]
$ sudo systemctl restart apache2
$ sudo /etc/init.d/apache2 restart

[Restart Apache Service on RPM based system]
$ sudo systemctl restart httpd
$ sudo /etc/init.d/httpd restart
Working with phpVirtualBox

Now you can access phpVirtualBox Web console on any system which have GUI desktop environements through http://ip-address-of-virtualbox-server/phpvirtualbox. The default username/password is admin:admin.
I have successfully got virtualbox interface, now you can Manage & Administrate the VM’s.


About Author:


I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Next
Newer Post
Previous
Older Post

0 comments:

Post a Comment

 
Top