Installing VirtualBox VBoxHeadless & PHPVirtualBox on openSUSE 12.1 Minimalis

VirtualBox is one of the tools that are used for Desktop Virtualization : running an OS within the OS. VirtualBox usually installed on the operating system that already has the VirtualBox GUI to manage it. But, how to manage VirtualBox without VirtualBox GUI? VBoxHeadless is the answer if we want to install VirtualBox on minimal Linux server and manage it via Browser.

I’m using openSUSE 12.1 64 bit on this tutorial but the steps can also be applied to earlier versions (11.x) as well as on SLES 11 SP1. I also use VirtualBox for All distributions binary package, although for openSUSE we can also use an RPM-binary package.


Lets get started :

  1. Install openSUSE 12.1 Minimal Server (Text Mode)
  2. Installing package for VirtualBox Kernel Modul
    1.zypper in kernel-source make gcc gcc-c++ pam-devel kernel-syms SDL
  3. Download VirtualBox binary package with the Extension Pack
  4. Install Virtualbox
    1.chmod +x
  5. Install the Extension Pack
    1.chmod +x Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack
    2.VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack
  6. Create a user for VirtualBox web access
    1.useradd vbox
    2.passwd vbox
    3.New Password : vbox
    4.Reenter New Password : vbox
  7. Create a VirtualBox web configuration on /etc/default/ /etc/default/virtualbox

    with the following contents :

  8. Install LAMPP server and php5-soap package by using zypper
    1.zypper in -t pattern 'lamp_server'
    2.zypper in php5-soap
  9. Edit /etc/apache2/default-server.conf and replace Options None to Options ALLso Apache will display the contents of the directory index /etc/apache2/default-server.conf
  10. Download latest phpvirtualbox package /opt
    3.unzip -d /srv/www/htdocs /srv/www/htdocs phpvirtualbox-4.1-5 phpvirtualbox phpvirtualbox
  11. Rename config.php-example to config.php and modify the contents to an appropriate configuration config.php-example config.php config.php
    1.var $username = 'vbox';
    2.var $password = 'vbox';
    3.var $location = '';
    4.var $consoleHost = '';

    Note : is my VBoxHeadless Server

  12. Restart web server and run the VirtualBox services
    1.service apache2 restart
    2.vboxwebsrv --host -b
  13. Open a browser and go to http://VBOXHeadLess-Address/phpvirtualbox, login with the default user: admin with password : admin


On the client side, access the VirtualBox VM by using rdesktop or krdc with following examples :


Here is the view of VM on VBoxHeadless, running Minimal Server Appliance.


Note :

  1. If you encounter an error message: PHP does not have the SOAP extension enabled, install php5-soap package from openSUSE 11.2 OSS repository
  2. If the Console does not open or error, power off the virtual OS then click on Settings -> Select Display -> Remote Display -> Checklist on the Enable Server and give the port on the Server Port, for example 3389 -> OK then run again. If you have more than one virtual OS,  do the similar process and change Server Port to 3390 and so on.

Leave a Reply

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