Changes

Jump to navigation Jump to search
2,879 bytes added ,  00:11, 13 July 2023
added current Bugs for this contrib
Line 35: Line 35:  
<tabs container=""><tab name="5.2 For SME 10">
 
<tabs container=""><tab name="5.2 For SME 10">
 
{{Note box|work in progress, alpha, use at your own risks}}
 
{{Note box|work in progress, alpha, use at your own risks}}
phpvirtualbox will install the appropriate version of VirtualBox, which will compile it's drivers, so we need to install a few development components as well
+
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 install smeserver-extrarepositories-epel smeserver-extrarepositories-virtualbox
 
  yum --enablerepo=smedev,smecontribs,epel,virtualbox  install smeserver-phpvirtualbox
 
  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">
 
</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]]
Line 94: Line 96:  
</tabs>
 
</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 internet'''.
+
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'''.
   −
{{Note box|Authentication is not currently working.
+
The only user with access at this stage is your SME Server admin user. See Authentication below on how to change this.  
Any device on the local network will have access.}}
     −
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
    
  systemctl restart vboxweb-service
 
  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 121: 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 :
 
  # /usr/lib/virtualbox/vboxdrv.sh 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.
Line 130: Line 222:  
If you want to manually launch the compilation of virtualbox module you can run the driver setup script.}}
 
If you want to manually launch the compilation of virtualbox module you can run the driver setup script.}}
   −
Restart the driver and web service
+
Run the driver setup script and restart the vbox web service
systemctl restart vboxdrv; systemctl restart vboxweb-service
  −
Run the driver setup script and restart the box web service
   
  /usr/lib/virtualbox/vboxdrv.sh setup; systemctl restart vboxweb-service
 
  /usr/lib/virtualbox/vboxdrv.sh setup; systemctl restart vboxweb-service
    
===Installation of Extension Pack===
 
===Installation of Extension Pack===
   −
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.
+
{{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.}}
   −
For example :
+
The Extension Pack is now automatically installed with VirtualBox.
 +
 
 +
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 https://download.virtualbox.org/virtualbox/5.2.44/Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack
 
  wget https://download.virtualbox.org/virtualbox/5.2.44/Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack
Line 151: 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 181: 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 217: Line 313:  
  signal-event console-save
 
  signal-event console-save
   −
====Authentication====
+
====Access The Web Interface Remotely====
{{Note box|Authentication is not currently working.
  −
Any device on your local network will have access.}}
  −
you can allow authentication to phpvirtualbox via number of methods. 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 337: 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