Changes

Jump to navigation Jump to search
468 bytes added ,  00:11, 13 July 2023
added current Bugs for this contrib
Line 37: Line 37:  
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
 
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
   −
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
+
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
Line 96: 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'''.
   −
=== Authentication ===
+
The only user with access at this stage is your SME Server admin user. See Authentication below on how to change this.  
{{Note box|Authentication is partially working.
     −
- BuiltIn, will use the phpvirtualbox builtin authentication which lets you manage users within phpvirtualbox ONLY. It does not have any interface/interaction with smeserver users
+
{{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 automatically [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Automatically_Start_Virtual_Machine|start VM with the server]] }}
 +
 
 +
===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
   −
- LDAP, will allow any smeserver user access, with whoever is defined in the phpvirtualbox adminUser config item as the administrator (default is admin)
+
The users must be declared  and a password must be set in the server-manager.
   −
- WebAuth, will allow any user defined in the phpvirtualbox Users config item, or belonging to groups defined in the phpvirtualbox userGroups config items access (Note: using group access will generate lots of errors in the /var/loh/httpd/error.log file ATM). Admin access is defined by the phpvirtualbox adminUser config item
+
config setprop phpvirtualbox Users user1,user2,user3
 +
signal-event smeserver-phpvirtualbox-update
   −
- AD, is defined, but has not been tested}}
+
=====Allow Specific Groups=====
 +
Works with WebAuth and AD
   −
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]].
+
These groups must be declared in the server-manager and users need to be members of the group/s
   −
to add individual users<syntaxhighlight lang="bash">
+
config setprop phpvirtualbox userGroups Group1,Group2,Group3
config setprop phpvirtualbox Users <list of comma separated users>
+
signal-event smeserver-phpvirtualbox-update
</syntaxhighlight>to add groups<syntaxhighlight lang="bash">
+
 
config setprop phpvirtualbox userGroups <list of comma separated smeserver groups>
+
=== Access the ISO share directory via samba ===
</syntaxhighlight>then you'll need to activate via:<syntaxhighlight lang="bash">
+
This is where ISOs used for building/installing VMs are stored.
signal-event smeserver-phpvirtualbox-update
  −
</syntaxhighlight>{{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 automatically [[VirtualBox_4.0_on_SME_Server_v8_beta_6#Automatically_Start_Virtual_Machine|start VM with the server]] }}
     −
===Restart the vboxweb-service===
+
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 138: 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 147: 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===
 +
 +
{{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.}}
    
The Extension Pack is now automatically installed with VirtualBox.
 
The Extension Pack is now automatically installed with VirtualBox.
   −
You can trigger a recheck and possible install. This will also check the installed driver and recompile if required (e.g. after a kernel upgrade).<syntaxhighlight lang="bash">
+
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
 
signal-event smeserver-virtualbox-update
</syntaxhighlight>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.
+
</syntaxhighlight>If you still want to install it yourself...
 
  −
For example :
      
  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 172: 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 202: 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 238: Line 313:  
  signal-event console-save
 
  signal-event console-save
   −
====Authentication====
+
====Access The Web Interface Remotely====
{{Note box|Authentication is still being worked on, but mostly works as advertised.}}
  −
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 authtype WebAuth
  −
signal-event smeserver-phpvirtualbox-update
  −
{| class="wikitable"
  −
|+authtype
  −
!
  −
!
  −
|-
  −
|BuiltIn
  −
|will use the phpvirtualbox builtin authentication which lets you manage users within phpvirtualbox ONLY. It does '''NOT''' have any interface/interaction with smeserver users
  −
|-
  −
|LDAP
  −
|will allow any smeserver user access, with whomever is defined in the phpvirtualbox adminUser config item as the administrator (default is admin)
  −
|-
  −
|WebAuth
  −
|will allow any user defined in the phpvirtualbox Users config item, or belonging to groups defined in the phpvirtualbox userGroups config items access
  −
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).
  −
|-
  −
|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
  −
|-
  −
|none
  −
|everyone on your local network has access, without needing to log in
  −
|}
  −
 
  −
=====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 included
  −
 
  −
config setprop phpvirtualbox userGroups Group1,Group2,Group3
  −
signal-event smeserver-phpvirtualbox-update
  −
 
  −
=== 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 370: 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