Difference between revisions of "Phpvirtualbox"

From SME Server
Jump to navigationJump to search
Line 40: Line 40:
 
Reminder: if you subsequently update SME Server to use a newer kernel, you may need to change
 
Reminder: if you subsequently update SME Server to use a newer kernel, you may need to change
 
your kernel boot line to reflect the update.
 
your kernel boot line to reflect the update.
 +
 +
accordingly to [http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006427 this article from vmware] and this one from [https://blogs.oracle.com/fatbloke/entry/speeding_up_your_linux_guests Oracle] on linux guests, you may find important information on how and why trick your kernel options.
 +
 +
you can test this command line to see if you are concerned by this chapter mainly if the you have the same result as below :
 +
 +
[root@sme8 ~]# grep CONFIG_HZ /boot/config-`uname -r`
 +
# CONFIG_HZ_100 is not set
 +
# CONFIG_HZ_250 is not set
 +
CONFIG_HZ_1000=y
 +
CONFIG_HZ=1000
  
 
===Kernel Upgrade===
 
===Kernel Upgrade===

Revision as of 18:47, 4 November 2013


Phpvirtualbox for SME Server

PythonIcon.png Skill level: Medium
The instructions on this page require a basic knowledge of linux.


Maintainer

stephdl


Warning.png Warning:
This contribs is still in a beta status so use it for a purpose of tests to help its development.


Description

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. You can find more informations directly on the phpvirtualbox wiki, please Take a look to the documentation.

Requirements

You need to install the VirtualBox_Repository,the Stephdl Repository And the Epel Repository

Installation

You have to be sure that your server has the kernel up-to-date before to install virtualbox, else the installation will fail.

yum update
signal-event post-upgrade;  signal-event reboot

This contrib is currently held in several repositories, so the following commands will install on your smeserver.

yum --enablerepo=stephdl,virtualbox,epel  install smeserver-virtualbox smeserver-phpvirtualbox phpvirtualbox VirtualBox-4.3 dkms

You will then need to activate the database changes and to reboot with the new kernel module loaded.

signal-event post-upgrade;  signal-event reboot

Go to the phpvirtualbox panel at the url https://your-sme-ip/phpvirtualbox on your local-network. You can not reach this contrib trought internet. Your credentials are the user admin of SME Server but you can add more users by the DB Configuration.

Optional : Change your guests kernel boot options

Optionally, for best results with SME 8.x guests, modify /etc/grub.conf, adding divider=10 to the kernel boot options in order to reduce the idle CPU load with VirtualBox. For example, if your kernel boot line is:

kernel /vmlinuz-2.6.18-348.6.1.el5 ro root=/dev/main/root 

change it to:

kernel /vmlinuz-2.6.18-348.6.1.el5 ro root=/dev/main/root divider=10 clocksource=acpi_pm

Reminder: if you subsequently update SME Server to use a newer kernel, you may need to change your kernel boot line to reflect the update.

accordingly to this article from vmware and this one from Oracle on linux guests, you may find important information on how and why trick your kernel options.

you can test this command line to see if you are concerned by this chapter mainly if the you have the same result as below :

[root@sme8 ~]# grep CONFIG_HZ /boot/config-`uname -r`
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000

Kernel Upgrade

After a kernel update and the "signal-event post-upgrade; signal-event reboot", even with the dkms module, the vboxdrv is not loaded because the module is not compiled with the new kernel, so you need to launch this command line in a root terminal.

/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
Trying to register the VirtualBox kernel modules using DKMS[  OK  ]
Starting VirtualBox kernel modules                         [  OK  ]

Installation of Extension Pack

Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards. See this chapter from the User Manual for an introduction to this Extension Pack. See this page to download the extension pack if the url below is no longer good.

For example :

wget http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0-89960.vbox-extpack
vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.0-89960.vbox-extpack

see vboxmanage-extpack for a complete list of commands

  • To add a new extension pack, use VBoxManage extpack install <.vbox-extpack>. This command will fail if an older version of the same extension pack is already installed. The optional --replace parameter can be used to uninstall the old package before the new package is installed.
  • To remove a previously installed extension pack, use VBoxManage extpack uninstall <name>. You can use VBoxManage list extpacks to show the names of the extension packs which are currently installed. The optional --force parameter can be used to override the refusal of an extension pack to be uninstalled.
  • The VBoxManage extpack cleanup command can be used to remove temporary files and directories that may have been left behind if a previous install or uninstall command failed.

DB Configuration

Default configuration database which allows only the admin user of SME Server to manage phpvirtualbox

[root@sme8dev ~]# config show phpvirtualbox
phpvirtualbox=service
   Group=
   Name=phpvirtualbox
   User=admin
   status=enabled

Allow Specific Users

The users must be declared and a password must be set in the server-manager.

config setprop phpvirtualbox User "admin user2 user3"
expand-template /etc/httpd/conf/httpd.conf

Allow Specific Groups

These groups must be declared in the server-manager and users need to be included

config setprop phpvirtualbox Group "Group1 Group2 Group3"
expand-template /etc/httpd/conf/httpd.conf


Uninstall

yum remove smeserver-virtualbox smeserver-phpvirtualbox phpvirtualbox VirtualBox-4.3 dkms

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-foo component or use this link .

remove the nowiki tags from your page

<noinclude>[[Category: Contrib]]</noinclude>