VirtualBox Plugin for unRAID v5 and v6


theone

Recommended Posts

9 minutes ago, Maticks said:

Managed to get phpVirtualBox working and some VM's setup.

They show up in the WebUI in Unraid but when i reboot Unraid it seems to wipe out the VirtualBox.xml file in /opt/VirtualBox on boot and defaults it back without the VM's in it.

Is there a reason it is wiping it out.

I am getting around it with copying the XML back into place and restarting the VirtualBox.

Is the symbolic link location in settings pointing to a persistent location? (/mnt/user/*, /mnt/diskX/*, /mnt/cache/*)

Link to comment
  • 2 months later...

Hey,

 

I am struggling to get this going.  

 

Here is what I have:

  1. Unraid 6.3.5
  2. Apache Web Server to serve up the VirtualBox GUI interface instead of using commandline
  3. phpVirtualBox  GUI for virtualbox
  4. Virtualbox

Unraid

  • go script edited to change unraid GUI to port 81
  • /usr/local/sbin/emhttp -p 81 &
  •  Rebooted

Apache is installed to /mnt/user/appdata/apache with

  • Host port 1 set to 80
  • Host port 2 set to 443

phpVirtuabox

  • phpvirtualbox-5.0-5
  • dwonloaded and unzipped to /mnt/cache/appdata/apache/www/phpvb
  • changed config.php-example to config.php
  • removed  # commenting out line: var $noAuth = true;  (not really needed)

Virtualbox

  • Virtualbox v5.1.22 local version and installed version
  • virtualbox extension v5.1.22 local version and installed version
  • virtualbox guest additions local version and NOT showing an installed version
  • virtualbox plugin v2017.05.19e
  • VirtualbBox symbolic link set to: /boot/custom/vbox  (Two things I do not see this folder on unraid and do I need to change this location so it is not on the flash drive?)   (I created the folder "custom" and then added the folder "vbox" to get /boot/custom/vbox .... not sure if this is needed)
  • vboxwebsrv host IP: 127.0.0.1
  • vboxwebsrv Port 18083
  • Vboxwebserver log file location /boot/config/plugins/virtualbox/vbox   (verbose mode YES) (just checked this location on the flash drive and there is no folder "vbox" under  /boot/config/plugins/virtualbox)   (I added the folder "vbox"  ..... not sure if this is needed)   (after doing the below and watching the folder, nothing appeared in vbox....)

 

Starting VirtualBox plugin:

  • Went to Dockers and Started Apache
  • Went to Plugins and Clicked "Start vboxwebsrv"
  • Opened a New Chrome Tab and went to http:\\tower/phpvb/  or IP Address/phpvb
  • By the way I have no VM's running plenty of Ram and space, and once I start the above process, I have to use terminal to do a "PowerDown"  this process locks up the gui screen and I can not gain access to any part of gui from any computer or from the screen connected to the tower.  

At the very bottom of the Virtualbox plugin tab it says: "/opt/VirtualBox/VBoxManage setproperty websrvauthlibrary null vboxwebsrv service started"

 

I saw the phpVirtualbox GUI but it was light (still loading) after waiting five minutes or so I refreshed and then the light outline of the GUI shows for a second and then goes away and does not come back and I get the message:

"An error occurred communicating with your vboxwebsrv. No more requests will be sent by phpVirtualBox until the error is corrected and this page is refreshed. The details of this connection error should be displayed in a subsequent dialog box."

and the message:

"Could not connect to host (http://127.0.0.1:18083/)[code]

Exception Object
(
    [message:protected] => Could not connect to host (http://127.0.0.1:18083/)
    [string:Exception:private] => 
    [code:protected] => 64
    [file:protected] => /config/www/phpvb/endpoints/lib/vboxconnector.php
    [line:protected] => 220
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /config/www/phpvb/endpoints/lib/vboxconnector.php
                    [line] => 5763
                    [function] => connect
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                        )
                )
            [1] => Array
                (
                    [file] => /config/www/phpvb/endpoints/lib/vboxconnector.php
                    [line] => 951
                    [function] => remote_vboxGroupDefinitionsGet
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
                        )
                )
            [2] => Array
                (
                    [file] => /config/www/phpvb/endpoints/api.php
                    [line] => 316
                    [function] => __call
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => vboxGroupDefinitionsGet
                            [1] => Array
                                (
                                    [0] => 
                                    [1] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [data] => Array
                                                        (
                                                            [responseData] => Array
                                                                (
                                                                )
                                                        )
                                                    [errors] => Array
                                                        (
                                                        )
                                                    [persist] => Array
                                                        (
                                                        )
                                                    [messages] => Array
                                                        (
                                                        )
                                                )
                                        )
                                )
                        )
                )
            [3] => Array
                (
                    [file] => /config/www/phpvb/endpoints/api.php
                    [line] => 316
                    [function] => vboxGroupDefinitionsGet
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => 
                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => Array
                                                (
                                                    [responseData] => Array
                                                        (
                                                        )
                                                )
                                            [errors] => Array
                                                (
                                                )
                                            [persist] => Array
                                                (
                                                )
                                            [messages] => Array
                                                (
                                                )
                                        )
                                )
                        )
                )
        )
    [previous:Exception:private] => 
)

Location:http://127.0.0.1:18083/

[/code]

 

 

Here is the first several lines of my vboxwebsrv.log file:

 

VirtualBox web service 5.1.22 r115126 linux.amd64 (Apr 28 2017 16:59:05) release log
00:00:00.001416 main     Log opened 2017-08-27T11:56:00.979746000Z
00:00:00.001419 main     Build Type: release
00:00:00.001422 main     OS Product: Linux
00:00:00.001423 main     OS Release: 4.9.30-unRAID
00:00:00.001424 main     OS Version: #1 SMP PREEMPT Fri May 26 13:56:36 PDT 2017
00:00:00.001467 main     DMI Product Name: CYPRESS11      
00:00:00.001477 main     DMI Product Version: 1.0 
00:00:00.001551 main     Host RAM: 128913MB (125.8GB) total, 107021MB (104.5GB) available
00:00:00.001556 main     Executable: /opt/VirtualBox/vboxwebsrv
00:00:00.001557 main     Process ID: 83003
00:00:00.001558 main     Package type: LINUX_64BITS_GENERIC
00:00:00.006024 main     IPC socket path: /tmp/.vbox-root-ipc/ipcd
00:00:00.014135 main     Pumping COM event queue
00:00:00.014159 main     Pumping COM event queue
00:00:00.014250 Watchdog Watchdog thread started
00:00:00.014262 Watchdog Watchdog: sleeping 5 seconds
00:00:00.014963 SQPmp    Socket connection successful: host = 127.0.0.1, port = 18083, master socket = 12
00:00:05.014420 Watchdog Watchdog: checking 0 websessions
00:00:05.014458 Watchdog Statistics: 0 websessions, 0 references
00:00:05.014474 Watchdog Watchdog: sleeping 5 seconds
00:00:10.014603 Watchdog Watchdog: checking 0 websessions
00:00:10.014656 Watchdog Watchdog: sleeping 5 seconds
00:00:15.014332 main     Pumping COM event queue
00:00:15.014747 Watchdog Watchdog: checking 0 websessions
00:00:15.014772 Watchdog Watchdog: sleeping 5 seconds

It just repeats from here on out  (checking and sleeping)

 

I feel I am close, but I just can't get it working.  Any pointers would be greatly appreciated.

I am looking forward to using this!

 

EDIT:  The VirtualBox Plugin page finally gave me the option (buttons) to Restart or shutdown virtualbox (but it took forever)

 

Thanks,

Albin

Edited by Albin
Link to comment
  • 2 months later...

I have installed the plugin but every time I click on "start vboxwebsrv" the unRAID web interface stops responding and I have to reboot the server via CLI to get it working again. After reboot, vbox is no longer installed...  Any thoughts?

Also - is there any documentation or FAQ's other than this thread?  While I appreciate the work going into all the responses here, it's difficult to search.

 

Thanks!

Link to comment
On 8/28/2017 at 1:37 PM, Albin said:

Attempting to dig some more on this and get this working, I noticed in an error log something about certificate/s.  Could my issue be related to SSL Certificates.  It looks like there are a cert.crt, with cert.key file but it is under apache keys.  

 

Post a screenshot of the virtualbox plugin page.  What Apache are you using (Docker/plugin and author)?

Edited by unevent
Link to comment
12 minutes ago, Halon314 said:

I have installed the plugin but every time I click on "start vboxwebsrv" the unRAID web interface stops responding and I have to reboot the server via CLI to get it working again. After reboot, vbox is no longer installed...  Any thoughts?

Also - is there any documentation or FAQ's other than this thread?  While I appreciate the work going into all the responses here, it's difficult to search.

 

Thanks!

 

The page doesn't update on its own when you start the vboxwebserv.  A few seconds after you see the 'vboxwebserv service started', hit the refresh button in your browser, or stop then refresh.

Link to comment
33 minutes ago, Halon314 said:

 

I understand what you mean about the page not updating - but no, it's actually unresponsive.  I try refreshing / opening the UI in a new tab / other laptop, etc.  It will not load.

 

Below is a screenshot of what it looks like after clicking "start vboxwebsrv"

 

Been too long since I set this up, can't do it from memory.  Will look at it this evening when I get home to see if I can figure out what may be happening.  What web server you are using (Docker/plugin, author)  and phpVirtualBox configuration?

 

Edit: Not sure if it was ever fixed, but phpVirtualBox 5.0.5 at one point didn't work with vitualbox 5.1.2+ without disabling the version check (or make static version).  Details are in this post for how to correct.

Basically, edit the endpoints/api.php file and search for this string:

$response['data']['responseData']['phpvboxver'] = @constant('PHPVBOX_VER');

...and replace with this:

// $response['data']['responseData']['phpvboxver'] = @constant('PHPVBOX_VER');
$response['data']['responseData']['phpvboxver'] = "5.1-0";

 

Edited by unevent
Link to comment
1 minute ago, Halon314 said:

No worries.

I didn't install a web server.  unRAID has a web-based management console out of the box, I just use that.  Is Apache or other such service a dependency for this plugin?  If so, I didn't realise that.  Is there any documentation on this?

No, no dependency.  The web server is only a requirement for phpVirtualBox which is not part of this plugin.

Link to comment
  • 2 months later...
  • 3 months later...
  • 1 month later...

Just installed this plugin (on unraid 6.3.3) and the moment I click on the "start vboxwebsrv" button I lose all unraid GUI access. The only way to get back to the unraid gui is to ssh in and kill all the virtualbox stuff. Then everything immediately loads like it should.

 

I've tried several ports, it doesn't make any difference. No errors, no log info, it just kills the unraid GUI.

 

Edited by thestip
Link to comment
  • 8 months later...
  • 1 year later...
4 minutes ago, sjoerd said:

Got question - could I run it instead of kvm or just next to it - i true like the simplicity of cloning machines and snapshotting it and I got a too many virtualbox vm's. Does it run as docker? Seems the startpost hasnt got updated for centuries..

Put it this way, it's not available within the Apps tab because it hasn't been updated to be compatible with 6.4+

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.