VirtualBox Plugin for unRAID v5 and v6


theone

Recommended Posts

Hello,

 

I am proud to present:

VirtualBox plugin for unRAID v5 and v6

 

The plugin installs both VirtualBox package and the VirtualBox Extension package (it does not install phpVirtualBox).

 

If this is your first plugin upgrade from version 0.5.7 or before to a newer version (supporting unRAID v6 plugin manager) then I suggest deleting the existing virtualbox.plg file at /boot/config/plugins and then install as described below for unRAID v6 - all your settings should remain intact.

 

To install under unRAID v6:

1. In the unRAID Plugin Manager under "Install Plugin" tab enter https://raw.githubusercontent.com/theone11/virtualbox_plugin/master/virtualbox.plg

2. Wait for installation to complete.

3. Go to plugin WEGUI and change initial settings

 

To install under unRAID v5:

1. Initial Download of plugin at https://raw.githubusercontent.com/theone11/virtualbox_plugin/master/virtualbox.plg

2. Copy plugin to /boot/config/plugins on your flash drive.

3. Reboot unRAID server or Install from command line:

  - installplg /boot/config/plugins/virtualbox.plg

  - /etc/rc.d/rc.virtualbox boot

4. Go to plugin WEGUI and change initial settings

 

To update the plugin:

* For WEBUI and functionality updates - Use the unRAID Plugin Manager or the VirtualBox Plugin WEBUI

* For new Virtualbox compiled packages - Use the VirtualBox Plugin WEBUI

 

The WEBUI is divided into 3 parts:

1. Status Summary - Shows all versions of packages and plugin and there status (installed/local/online).

2. Actions - Shows all possible actions available to the user depending on the status of the user's server.

  - Start/Stop/Restart vboxwebsrv and Virtual Machines.

  - Download/Install/Update packages and Plugin.

  - Start and Savestate of individual Virtual Machines.

3. Configuration - Change settings of the plugin.

 

Configuration Notes:

1. Boot and Startup options - Change what happens during boot or installplg.

2. Virtual Machines start options - Change what Virtual Machines to start once START command is given.

3. VBOXWEBSRV Host and Port options - Change Host and IP settings for vboxwebsrv

4. VBOXWEBSRV log file options - Change the vboxwebsrv log file options.

  - It is important to set the log file location accurately otherwise vboxwebsrv will not run properly.

  - You may want to place the log file outside of your flash drive.

 

Please comment on any problems encountered and any enhancements or missing features, that you would like added.

(Here if possible: https://github.com/theone11/virtualbox_plugin/issues)

 

Enjoy the plugin  :)

 

Changelog:

2017.05.19c
- Fixed extension pack install failure due to license agreement acceptance prompt

 

2015.09.18

  - Fixed online package lookup

2015.09.17

  - Added unRAID 6.1 compatibility and keep backward compatibility

2015.06.07

  - Changed start and stop events to "started" and "stopping_svcs" instead of "disks_mounted" and "unmounting_disks"

  - Moved plugin icon to "User Utilities" section (unRAID v6)

2015.06.05

  - Added launch option from plugin manager (unRAID v6)

  - Changed package version to same as plugin version

  - Fixed - Inadvertently Cleared vboxwebsrv settings - Returned onsubmit="validateForm();" to form submission

2015.04.21-1 - Fixed unRAID v5 compatability

2015.04.21 - Added support for unRAID v6 Plugin Manager and Architecture

                - Added support for tgz and txz compiled packages

0.5.7    - Reduced plugin load time by reducing network accessing when checking online versions

0.5.6    - Added MD5 checksum verification for all downloaded packages immediately after download - delete download if MD5 cannot be verified or fails verification

0.5.5    - Fixed kernel version number extraction from online package

0.5.4    - Changed unRAID compiled VirtualBox version availability and presentation in WEBUI (compatible and latest)

          - Changed timeout to 10 seconds (instead of 60)

          - Added plugin forum link to WEBUI

          - Automatic support for 32/64bit packages depending on OS

0.5.3    - Added changelog history

          - Enabled changing of Mount and Startup options also when virtualbox is running - They impact only during plugin start

          - Only if VirtualBox installed give option to update from local or online versions if exist otherwise download options

          - Changed "vboxmanage" to correct case "VBoxManage" and added full path "/opt/Virtualbox/VBoxManage"

          - Added to log confirmation that installation of packages completed correctly.

          - If "VirtualBox LOCAL version different than INSTALLED version" then function changed to "update" instead of "install"

          - Duplicated all "logger" output also to regular output "echo"

          - Added --timeout=60 on all wget commands

          - Minor UI Change

0.5.2    - Added Latest Release version available from VirtualBox.org (not necessarily existing for unRAID yet)

          - Local versions extraction

          - Cosmetic changes

0.5.1    - Fixed bottom of page is sometimes not visible due to unRAID progressframe

0.5      - Added option to download GuestAdditions Package

          - Added option to change /boot/custom/vbox to different location including moving of files - New parameter in configuration

          - Changed configuration update code

          - When upgrading from older version plugins the following line should be added to cfg file before upgading the plugin:

              VBOX_SYMLINK_LOCATION="/boot/custom/vbox"

              That way the plugin can move existing files once you decide to move the VirtualBox symbolic link from original location "/boot/custom/vbox" to your new desired location.

0.4.2    - Fixed: Icon file couldn't be saved because plugin folder doesn't exist on first run

0.4.1    - Fixed: Icon file deleted when upgrading plugin without restarting server

0.4      - Workaround for downloading non exiting icon file

0.3      - Fixed startup sequence - Virtualbox can only be started (specifically VMs) after array mounted

0.2.7    - Changed WEBUI layout, Corrected few functions

0.2.6    - Corrected access to previous session VM list (vms_session.cfg)

0.2.5    - Corrected boot and plugin update functions

0.2.4    - Fix install function during boot when online version doesn't exist or is not checked

0.2.3    - Fix install function

0.2.2    - Initial Release

 

P.S.

This is my first attempt at a plugin.

VirtualBox.png.b3882d6fac741d7c46ab430f292b28ca.png

VirtualBox_WEBUI_32bit.gif.59975be240c6596dcdca9d37f62b57bf.gif

VirtualBox_WEBUI_64bit.gif.7367906ab40d968062c51c571d64401d.gif

Edited by theone
  • Upvote 2
Link to comment

Nothing get installed ? see images atatched

 

Shall it be 127.0.0.1 in the GUI and in the config.php ? someone told med to change it to IP for the server, in my case 192.168.0.199

 

Is there any changes I need to do more in config.php fpr phpvirtualbox

 

the plugin have DL following files

Oracle_VM_VirtualBox_Extension_Pack-4.2.6.vbox-extpack

vbox-4.2.6-unRAID-3.4.26.tgz

 

And it stated that the installed version differ ? before I installed the plugin, no installation of vbox existed.

 

The plugin looks great!

 

Please try to do a fresh installation, and see if you see same thing

//Peter

 

 

 

 

vbox.JPG.566543770e664d4a0d881bd4de4ebe35.JPG

Link to comment

I saw this now on the GUI !!

 

/etc/rc.d/rc.virtualbox update disable xxxxxx yyyyyy

 

Where x & y is my login details for openvpn !!!!

 

 

Strange !?

 

//Peter

Please add screenshot - I need to see exactly what the status is (what the plugin sees).

without the XXXXXXXX and YYYYYYY ofcourse ;)

 

 

Link to comment

Still reading my variables from openvpn plugin ?

 

It's very strange 

//Peter

 

Believe me I am not doing any such thing - the source code is open for checking if you wish.

 

I also had this problem (unrelated parameters shown in command line - progressbar) and I am not running openvpn.

I think it was a from naming issue in the WEBUI code but I am not sure - I don't have the problem anymore.

 

Can you try and restart your server?

 

Link to comment

root@tower:~# /etc/rc.d/rc.virtualbox install

rc.virtualbox[8813]: Installing Virtualbox package...

+==============================================================================
| Installing new package /boot/config/plugins/virtualbox/vbox-4.2.6-unRAID-3.4.24.tgz
+==============================================================================

Verifying package vbox-4.2.6-unRAID-3.4.24.tgz.

gzip: stdin: unexpected end of file
Unable to install /boot/config/plugins/virtualbox/vbox-4.2.6-unRAID-3.4.24.tgz:  tar archive is corrupt (tar returned er                                                        ror code 2)

rc.virtualbox[8973]: Installing Virtualbox Etension package...
/etc/rc.d/rc.virtualbox: line 189: VBoxManage: command not found


 

 

 

root@tower:~# /etc/rc.d/rc.virtualbox update

rc.virtualbox[9877]: Latest VirtualBox and VirtualBox Extension exist in local plugin folder
/etc/rc.d/rc.virtualbox: line 319: vboxmanage: command not found
rc.virtualbox[9899]: No Virtual Machines running - nothing to save and terminate
rc.virtualbox[9900]: vboxwebsrv not running... nothing to kill
rc.virtualbox[9950]: Installing Virtualbox package...

+==============================================================================
| Installing new package /boot/config/plugins/virtualbox/vbox-4.2.6-unRAID-3.4.24.tgz
+==============================================================================

Verifying package vbox-4.2.6-unRAID-3.4.24.tgz.

gzip: stdin: unexpected end of file
Unable to install /boot/config/plugins/virtualbox/vbox-4.2.6-unRAID-3.4.24.tgz:  tar archive is corrupt (tar returned error code 2)

rc.virtualbox[10112]: Installing Virtualbox Etension package...
/etc/rc.d/rc.virtualbox: line 189: VBoxManage: command not found
/etc/rc.d/rc.virtualbox: line 243: VBoxManage: command not found
rc.virtualbox[10133]: VBoxManage setproperty websrvauthlibrary null
rc.virtualbox[10135]: vboxwebsrv service started
rc.virtualbox[10156]: No Virtual Machines available to start
rc.virtualbox[10157]: Upgraded VirtualBox to version 4.2.6

 

 

 

root@tower:~# /etc/rc.d/rc.virtualbox restart

/etc/rc.d/rc.virtualbox: line 319: vboxmanage: command not found
rc.virtualbox[10773]: No Virtual Machines running - nothing to save and terminate
rc.virtualbox[10774]: vboxwebsrv not running... nothing to kill
/etc/rc.d/rc.virtualbox: line 243: VBoxManage: command not found
rc.virtualbox[10825]: VBoxManage setproperty websrvauthlibrary null
rc.virtualbox[10827]: vboxwebsrv service started
rc.virtualbox[10848]: No Virtual Machines available to start

Link to comment

theone, thanks for the plugin.  Been meaning for a long time to tinker with running virtualbox on unraid and this might make the process a lot more straightforward.

 

I've just installed the plugin onto a dev box (no other plugins installed at this time).  Noticed upon first entry into virtualbox setting page, there is an error regarding vms_session.cfg not found.  ikMwieA.png

 

I've only briefly skimmed your code, but I'm assuming that's because there are no running vms as yet?  I think there may be a mismatch between where this file gets created vs where the php var looks for it.  From the php and rc scripts:

 

rc.virtualbox:

VBOX_PLUGIN_PATH="/boot/config/plugins/virtualbox"
vboxmanage list runningvms > ${VBOX_PLUGIN_PATH}/vms_session.cfg

 

virtualbox.php

$vm_session_cnt = count(file("/boot/config/plugins/vms_session.cfg", FILE_IGNORE_NEW_LINES));

 

May have misread the code, so apologies if this is by design but I think otherwise it may be looking in the wrong place.  That being said, on first load of the gui page there isn't a vms_session.cfg in either location likely due to the reason mentioned above.

 

 

 

Regards,

overbyrn.

Link to comment

I'm on Rc10 now, still have issue with

VirtualBox error: The object functionality is limited (0x80070005)

 

I got this when clicking on the machine in attached image

 

And I'm running with an untouched config.php

 

Foe a week ago this was working ...

 

I have removed some plugin, but no luck.

 

Anyone that know a solution for this? if some on more have it working, can you tell me what other plugin you are using and where you have store the phpvirtualbox

Can this belong to some settings in SF web server ? But I have more thing running on the web server that works (newznab, spotweb , owncloud, ajaxplorer and phpmyadmin)

 

//Peter

vbox4.JPG.d06f2ed99225e58ea548d6966b0d248e.JPG

Link to comment

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.