Changes

Jump to navigation Jump to search
3,254 bytes added ,  00:11, 13 July 2023
added current Bugs for this contrib
Line 1: Line 1:  
{{Languages}}
 
{{Languages}}
 +
 +
{{#vardefine:contribname| {{lc: {{#titleparts:  {{BASEPAGENAME}} |1}} }} }}
 +
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts:  {{BASEPAGENAME}} |1}} }} }}
 +
<!-- we define the language -->
 +
{{#vardefine:lang| {{lc:  {{#titleparts:    {{PAGENAME}} | | -1}}  }} |en }}
 +
 +
 +
{{Infobox contribs
 +
|name={{#var:contribname}}
 +
|image= contrib.png
 +
|description_image= {{#var:contribname}} logo
 +
|maintainer=
 +
|licence= GPL v3
 +
|url= https://github.com/phpvirtualbox/phpvirtualbox
 +
|category= virtualization
 +
|tags=virtualbox
 +
}}
 
== Phpvirtualbox for SME Server ==
 
== Phpvirtualbox for SME Server ==
 
{{Level|Medium}}
 
{{Level|Medium}}
Line 7: Line 24:  
===Version===
 
===Version===
 
{{#smeversion: smeserver-phpvirtualbox}}
 
{{#smeversion: smeserver-phpvirtualbox}}
 +
{{#smeversion: phpvirtualbox}}
 
[[Version::contrib9|stephdl]][[Has SME9::true| ]]
 
[[Version::contrib9|stephdl]][[Has SME9::true| ]]
 
{{#smeversion: smeserver-virtualbox}}
 
{{#smeversion: smeserver-virtualbox}}
 +
 
=== Description ===
 
=== 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.<br />
 
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.<br />
{{Note box|msg='''Please you should help this project''' as Ian Moore develops [https://sourceforge.net/projects/phpvirtualbox/ phpVirtualBox] in his spare time, free of charge. If you find this program useful, He asks that [https://sourceforge.net/p/phpvirtualbox/donate/?source=navbar/ you please donate].<br />}}
     −
{{Tip box|You can find more informations directly on the [http://sourceforge.net/p/phpvirtualbox/wiki/Home/ phpvirtualbox wiki], please Take a look to the documentation.}}
+
=== Requirements ===
   −
=== Requirements ===
+
<tabs container=""><tab name="5.2 For SME 10">
 +
{{Note box|work in progress, alpha, use at your own risks}}
 +
Please make sure you have the latest kernel installed (i.e. do a yum update) before installing, so that we use the right kernel headers for compiling the driver
 +
 
 +
This will install phpvirtualbox and the appropriate version of smeserver-virtualbox and VirtualBox, which will compile it's drivers, so we need to install a few development components as well
 +
yum install smeserver-extrarepositories-epel smeserver-extrarepositories-virtualbox
 +
yum --enablerepo=smedev,smecontribs,epel,virtualbox  install smeserver-phpvirtualbox
 +
The install will prompt you to accept the VirtualBox GPG key
 +
</tab><tab name="4.3 For SME 8 and 9">
 
You need to install the [[VirtualBox_Repository]], the [[stephdl|Stephdl_repository]] And the [[Epel|Epel Repository]]
 
You need to install the [[VirtualBox_Repository]], the [[stephdl|Stephdl_repository]] And the [[Epel|Epel Repository]]
    
{{Note box|VirtualBox is a real professional solution to virtualise Operating Systems in Linux, please Read the [https://www.virtualbox.org/manual/ virtualbox manual] if you want to  use entirely all features of this software}}
 
{{Note box|VirtualBox is a real professional solution to virtualise Operating Systems in Linux, please Read the [https://www.virtualbox.org/manual/ virtualbox manual] if you want to  use entirely all features of this software}}
   −
=== Installation phpvirtualbox-4.3 For SME8 and SME9===
+
# Installation phpvirtualbox-4.3 For SME8 and SME9
 
First install the required repos<syntaxhighlight lang="bash">
 
First install the required repos<syntaxhighlight lang="bash">
 
yum install smeserver-extrarepositories-virtualbox smeserver-extrarepositories-epel smeserver-extrarepositories-stephdl
 
yum install smeserver-extrarepositories-virtualbox smeserver-extrarepositories-epel smeserver-extrarepositories-stephdl
Line 44: Line 70:  
  signal-event post-upgrade;  signal-event reboot
 
  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'''.
+
</tab><tab name="5.0 For SME 8 and 9">
Your credentials are the user admin of the SME Server and its password but you can add more users by the [[Phpvirtualbox#DB_Configuration|DB Configuration]].
  −
=== Installation phpvirtualbox-5.0 For SME8 and SME9===
   
{{warning box| You have to remove first all old rpm before to install phpvirtualbox-5.0 and VirtualBox-5.0, this is done by the different version of virtualbox (the version 5.0 doesn't obsolete the 4.3 version)
 
{{warning box| You have to remove first all old rpm before to install phpvirtualbox-5.0 and VirtualBox-5.0, this is done by the different version of virtualbox (the version 5.0 doesn't obsolete the 4.3 version)
 
  yum remove smeserver-phpvirtualbox\* smeserver-virtualbox\* VirtualBox\* phpvirtualbox\* dkms }}
 
  yum remove smeserver-phpvirtualbox\* smeserver-virtualbox\* VirtualBox\* phpvirtualbox\* dkms }}
Line 69: Line 93:     
  signal-event post-upgrade;  signal-event reboot
 
  signal-event post-upgrade;  signal-event reboot
 +
</tab>
 +
</tabs>
 +
 +
Go to the phpvirtualbox panel at the url https://your-sme-ip/phpvirtualbox on your local-network. '''You can not reach this contrib trought the internet'''.
 +
 +
The only user with access at this stage is your SME Server admin user. See Authentication below on how to change this.
   −
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 the SME Server and its password but you can add more users by the [[Phpvirtualbox#DB_Configuration|DB Configuration]].
   
{{Tip box|You can see [[VirtualBox_4.0_on_SME_Server_v8_beta_6|the Tutorial]] hosted on our Wiki in order to learn :   
 
{{Tip box|You can see [[VirtualBox_4.0_on_SME_Server_v8_beta_6|the Tutorial]] hosted on our Wiki in order to learn :   
 
*how to create [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Creating_a_Virtual_Machinecreate| your first VM]]
 
*how to create [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Creating_a_Virtual_Machinecreate| your first VM]]
 
*how to automatically [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Automatically_Start_Virtual_Machine|start VM with the server]] }}
 
*how to automatically [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Automatically_Start_Virtual_Machine|start VM with the server]] }}
   −
===Restart the vboxweb-service===
+
===Authentication===
 +
{{Note box|Authentication is still being worked on, but mostly works as advertised.}}
 +
you can allow authentication to phpvirtualbox via number of methods. At install, default is WebAuth with admin defined as the adminUser.
 +
 
 +
config setprop phpvirtualbox authtype <none/Builtin/LDAP/WebAuth/AD>
 +
signal-event smeserver-phpvirtualbox-update
 +
{| class="wikitable"
 +
|+config setprop phpvirtualbox authtype <none/Builtin/LDAP/WebAuth/AD>
 +
!Property
 +
!Description
 +
!adminUser
 +
!Users
 +
!userGroups
 +
|-
 +
|none
 +
|everyone on your local network has access, without needing to log in
 +
|ignored
 +
|ignored
 +
|ignored
 +
|-
 +
|BuiltIn
 +
|will use the phpvirtualbox builtin authentication which lets you manage users within phpvirtualbox ONLY.
 +
Default admin user is admin with password admin (this is a phpvirtualbox thing....)
 +
 
 +
It does '''NOT''' have any interface/interaction with smeserver users
 +
|ignored
 +
|ignored
 +
|ignored
 +
|-
 +
|LDAP
 +
|will allow any smeserver user access, with whomever is defined in the phpvirtualbox adminUser config item as the administrator
 +
|administrative rights
 +
|ignored
 +
|ignored
 +
|-
 +
|'''WebAuth'''
 +
|<u>Default, with adminUser defined as admin</u>
 +
will allow any user defined in the phpvirtualbox Users config item, or belonging to groups defined in the phpvirtualbox userGroups config items
 +
 
 +
Admin access is defined by the phpvirtualbox adminUser config item
 +
 
 +
('''''Note:''''' using group access will generate lots of errors in the /var/log/httpd/error.log file ATM).
 +
|administrative rights
 +
|user rights
 +
|user rights
 +
|-
 +
|AD
 +
|is defined, but has not been tested.
 +
will allow any user defined in the phpvirtualbox Users config item, or belonging to AD groups defined in the phpvirtualbox userGroups config items access.
 +
 
 +
Admin access is defined by the phpvirtualbox adminUser config item
 +
|administrative rights
 +
|user rights
 +
|user rights
 +
|}
 +
 
 +
=====Allow Specific Users=====
 +
Works with WebAuth and AD
    +
The users must be declared  and a password must be set in the server-manager.
 +
 +
config setprop phpvirtualbox Users user1,user2,user3
 +
signal-event smeserver-phpvirtualbox-update
 +
 +
=====Allow Specific Groups=====
 +
Works with WebAuth and AD
 +
 +
These groups must be declared in the server-manager and users need to be members of the group/s
 +
 +
config setprop phpvirtualbox userGroups Group1,Group2,Group3
 +
signal-event smeserver-phpvirtualbox-update
 +
 +
=== Access the ISO share directory via samba ===
 +
This is where ISOs used for building/installing VMs are stored.
 +
 +
By default, anyone defined in adminUser, Users or userGroups will have write access to the /opt/vbox/ISOs directory (share name virtualbox), regardless of the authtype.
 +
 +
You can control whether the share is available/visible and who has access via the phpvirtualbox samba configuration item.
 +
{| class="wikitable"
 +
|+config setprop phpvirtualbox samba <none/adminUser/all>
 +
!Property
 +
!Description
 +
|-
 +
|none
 +
|No share created or visible
 +
|-
 +
|adminUser
 +
|ONLY user defined in adminUser, has write access to virtualbox share
 +
|-
 +
|'''all'''
 +
|<u>Default:</u> Any user defined in adminUser, Users or userGroups has write access to the virtualbox share
 +
|}
 +
 +
=== Restart the vboxweb-service ===
 
phpvirtualbox controls a virtualbox service (vboxweb-service), you may need to restart it if you can't connect to phpvirtualbox
 
phpvirtualbox controls a virtualbox service (vboxweb-service), you may need to restart it if you can't connect to phpvirtualbox
   −
  /etc/init.d/vboxweb-service restart
+
  systemctl restart vboxweb-service
   −
you can control eventually that the port 18083 is opened to the service
+
you can check that the port 18083 is opened to the service
 
  nmap localhost -p 18083
 
  nmap localhost -p 18083
 
  ....
 
  ....
Line 93: Line 213:  
===Kernel Upgrade===
 
===Kernel Upgrade===
   −
After a kernel upgrade and the  "signal-event post-upgrade;  signal-event reboot", the vboxdrv need to be compiled with the new kernel, a script is launched at the boot time to test if the compilation is needed.
+
After a kernel upgrade and the  "signal-event post-upgrade;  signal-event reboot", the vboxdrv needs to be compiled with the new kernel, a script is launched at startup of the driver, to test if the compilation is needed and will compile it for you.
   −
You can see if all kernel modules are compiled and loaded, if you issue :
+
You can see if all the kernel modules are compiled and loaded, if you issue :
  # /etc/init.d/vboxdrv status
+
  # /usr/lib/virtualbox/vboxdrv.sh status
 
  VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.
 
  VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) are loaded.
   −
{{Tip box|If you want to launch manually the compilation of virtualbox module you can do these command lines in a root terminal.}}
+
{{Tip box|Restarting the vboxdrv service will trigger a driver compile if it is not present.
 +
If you want to manually launch the compilation of virtualbox module you can run the driver setup script.}}
   −
  /etc/init.d/vboxdrv setup; /etc/init.d/vboxweb-service start
+
Run the driver setup script and restart the vbox web service
 +
  /usr/lib/virtualbox/vboxdrv.sh setup; systemctl restart vboxweb-service
   −
Stopping VirtualBox kernel modules                        [  OK  ]
+
===Installation of Extension Pack===
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===
+
{{Note box|The Extension Pack provides 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 (https://www.virtualbox.org/wiki/Downloads) to download the extension pack if the url below is no longer good.}}
   −
Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards. See this chapter [https://www.virtualbox.org/manual/ch01.html#intro-installing from the User Manual] for an introduction to this Extension Pack. See this page to [https://www.virtualbox.org/wiki/Downloads download the extension pack] if the url below is no longer good.
+
The Extension Pack is now automatically installed with VirtualBox.
   −
For example :
+
You can trigger a re-check, and possible install. This will also check the installed driver and recompile if required (e.g. after a kernel upgrade).<syntaxhighlight lang="bash">
 +
signal-event smeserver-virtualbox-update
 +
</syntaxhighlight>If you still want to install it yourself...
   −
  wget http://dlc.sun.com.edgesuite.net/virtualbox/4.3.0/Oracle_VM_VirtualBox_Extension_Pack-4.3.0-89960.vbox-extpack
+
  wget https://download.virtualbox.org/virtualbox/5.2.44/Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack
  vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.0-89960.vbox-extpack
+
  vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack
    
see [https://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack vboxmanage-extpack] for a complete list of commands
 
see [https://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack vboxmanage-extpack] for a complete list of commands
Line 124: Line 246:     
* 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.
 
* 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.
      
===BridgeInterface===
 
===BridgeInterface===
Line 154: Line 275:  
  # config show phpvirtualbox  
 
  # config show phpvirtualbox  
 
  phpvirtualbox=configuration
 
  phpvirtualbox=configuration
    Group=
+
    Name=phpvirtualbox
    Name=phpvirtualbox
+
    adminUser=admin
    User=
+
    authtype=WebAuth
    status=enabled
+
    status=enabled
    webauth=enabled
+
    userGroups=vboxusers
    
  # config show vboxweb-service  
 
  # config show vboxweb-service  
 
  vboxweb-service=service
 
  vboxweb-service=service
    TCPPort=18083
+
    TCPPort=18083
    access=localhost
+
    access=localhost
    status=enabled
+
    password=<generated password>
 +
    status=enabled
 +
    user=vbox
    
====Add a different URL====
 
====Add a different URL====
Line 190: Line 313:  
  signal-event console-save
 
  signal-event console-save
   −
====Web authentication====
+
====Access The Web Interface Remotely====
 
  −
you can allow web authentication to phpvirtualbox by doing the command line below. This feature is the default behaviour since the bug opened is solved http://sourceforge.net/p/phpvirtualbox/bugs/7/.
  −
 
  −
config setprop phpvirtualbox webauth enabled
  −
signal-event console-save
  −
 
  −
and you have to modify manually the file config.php
  −
 
  −
nano /opt/phpvirtualbox/config.php
  −
 
  −
// Authentication library.
  −
var $authLib = 'Builtin';
  −
#var $authLib = 'WebAuth';
  −
#var $authConfig = array('adminUser' => 'admin');
  −
 
  −
to
  −
  −
// Authentication library.
  −
#var $authLib = 'Builtin';
  −
var $authLib = 'WebAuth';
  −
var $authConfig = array('adminUser' => 'admin');
  −
 
  −
 
  −
=====Allow Specific Users=====
  −
The users must be declared  and a password must be set in the server-manager.
  −
 
  −
config setprop phpvirtualbox User user1,user2,user3
  −
signal-event console-save
  −
 
  −
=====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
  −
signal-event console-save
  −
 
  −
=== Access The Web Interface Remotely ===
   
{{Warning box|Instructions below could be a flaw in Phpvirtualbox, you should remotely access trough [[SME_Server:Documentation:FAQ:booklet#Server-Manager|SSH]] or with [[OpenVPN_Bridge|openvpn]]}}
 
{{Warning box|Instructions below could be a flaw in Phpvirtualbox, you should remotely access trough [[SME_Server:Documentation:FAQ:booklet#Server-Manager|SSH]] or with [[OpenVPN_Bridge|openvpn]]}}
 
Create the following folder if it doesn't exist.
 
Create the following folder if it doesn't exist.
Line 309: Line 396:     
For general information on how to configure phpvirtualbox guests please visit the [https://www.virtualbox.org/manual/ch03.html phpvirtualbox documentation]
 
For general information on how to configure phpvirtualbox guests please visit the [https://www.virtualbox.org/manual/ch03.html phpvirtualbox documentation]
 +
 +
===Bugs===
 +
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
 +
and select the smeserver-phpvirtualbox component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-phpvirtualbox|title=this link}}
 +
 +
Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component=smeserver-phpvirtualbox|noresultsmessage=No open bugs found.}}
    
[[Category: Contrib]]
 
[[Category: Contrib]]
 
[[Category:Virtualisation]]
 
[[Category:Virtualisation]]

Navigation menu