VirtualBox files               VirtualBox instructions                [ Donate ]
 

VirtualBox instructions


This page provided instructions for installing compiled versions of VirtualBox onto unRAID systems.
Unfortunately many things have been updated or changed since I wrote this guide.
The "Quick overview of things you will need" is still accurate, but the detailed instructions to download and use most of them changed as new versions were released.

-----------------------------------------------------------
I may update this in the future, but for now just use it as a layout (to get an idea for what is involved) and not a step-by-step guide like it once was.
-----------------------------------------------------------

There is now a plugin for VirtualBox on unRAID from theone available at https://raw.github.com/theone11/virtualbox_plugin/master/virtualbox.plg
The plugin installs the VirtualBox package (found on this site, compiled by lainie) & the VirtualBox Extension package (the plugin does not install phpVirtualBox).
Visit the unRAID forums topic VirtualBox Plugin for unRAID v5 for more information on the plugin.
Any issues with the plugin can be reported on https://github.com/theone11/virtualbox_plugin/issues
Problems with compiled tgz files or anything on this site can be reported on the VirtualBox compiled for unRAID forum page.
-----------------------------------------------------------

Quick overview of things you will need to install:
  • a web server (SimpleFeatures lighttpd recommended)
  • the tgz compiled package of VirtualBox (found on this site)
  • the extension pack for VirtualBox (must be downloaded from virtualbox.org)
  • phpvirtualbox (to manage VirtualBoxes via a web interface)

-----------------------------------------------------------

           
  • Setup a web server:
Install SimpleFeature web server & plugin from http://code.google.com/p/unraid-simplefeatures/downloads/list
Set this to somewhere on your cache drive for your data directory. I used /mnt/cache/.custom/www & picked 8084 for the listening port. The port is up to you, just make sure the port is not used for something else.
You can test this much is running by pointing a web browser to http://tower:8084

  • Download the extension pack for VirtualBox:
The extension pack for VirtualBox can be found on the page https://www.virtualbox.org/wiki/Downloads
Extension pack binaries are released under the VirtualBox Personal Use and Evaluation License (PUEL)
Extension pack direct links:
   4.2.x      Version 4.2.8      Version 4.2.6      Version 4.2.4      Version 4.2.0   
   4.1.x   Version 4.1.20      Version 4.1.18     
I downloaded the expansion pack to my /boot/packages/ directory.

  • Download the tgz compiled package of VirtualBox:
View http://vbox.a1aina.com/ to get the download link for the file you need.
I named the files vbox-[VirtualBox version number]-unRAID-[unRAID kernel version].tgz. If you are unsure which version you need, on your unRAID server, run the command "uname -r" without quotes.
Make sure to download the correct file for your system.
I placed the tgz file under /boot/packages/

  • Download phpvirtualbox:
From http://code.google.com/p/phpvirtualbox/downloads/list, download the version that is compatible with your version VirtualBox & extract it to your data directory for the SimpleFeatures web plugin (I used /mnt/cache/.custom/www).

Phpvirtualbox gives a nice graphical web page to allow you to manage VirtualBox easily. Most people are not having issues with VirtualBox, just phpvirtualbox.

If you want to be prompted for a username/password by phpvirtualbox, edit lines 12 & 13 of config.php with your user/pass that runs virtualbox.
var $username = 'vboxuser';
var $password = 'vboxpass';
Then to verify it works, try to login with default user / pass for phpvirtualbox which is admin / admin.

If you prefer not to be prompted for a login, you can modify the config.php file to uncomment the line 52 for "var $noAuth = true;"

There is a wiki page for phpvirtualbox at http://code.google.com/p/phpvirtualbox/w/list that lists some common errors with phpvirtualbox. If you have a problem with it that is not listed there, click the Issues tab link, click the dropdown box next to Search (which is default set to Open Issues) & change it to "All Issues" then use the next box to type part of your error message & click the Search button.

  • Install compiled VirtualBox, start vboxwebsrv & install the extension pack:
From a command line on you unRAID server, run the following 3 commands.
installpkg /boot/packages/vbox-4.x.x-unRAID-3.x.x.tgz
vboxwebsrv -b -H 127.0.0.1 --logfile /var/log/vbox.log
VBoxManage extpack install /boot/packages/Oracle_VM_VirtualBox_Extension_Pack-4.x.x.vbox-extpack
If you downloaded the VirtualBox tgz & extension pack to somewhere other than /boot/packages/, make sure to change the path to your download location.
Also, change 4.x.x to the correct VirtualBox version & 3.x.x to your unRAID kernel version.

Installing everything should produce output similar to this:
root@tower:~# installpkg /boot/packages/vbox-4.x.x-unRAID-3.x.x.tgz
Verifying package vbox-4.x.x-unRAID-3.x.x.tgz.
Installing package vbox-4.x.x-unRAID-3.x.x.tgz:
PACKAGE DESCRIPTION:
Executing install script for vbox-4.x.x-unRAID-3.x.x.tgz.
Package vbox-4.x.x-unRAID-3.x.x.tgz installed.

root@tower:~# vboxwebsrv -b -H 127.0.0.1 --logfile /var/log/vbox.log
Oracle VM VirtualBox web service version 4.x.x
(C) 2005-2012 Oracle Corporation
All rights reserved.

root@tower:~# VBoxManage extpack install /boot/packages/Oracle_VM_VirtualBox_Extension_Pack-4.x.x.vbox-extpack
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
root@tower:~#


  • Potential traps (VBox 4.2.6 & newer have a modified doinst.sh file that fixes these issues):
  • Several people have reported needing to create a directory "/boot/custom/vbox" to get VirtualBox to start. Check to see if you have this directory & if not, create it manually.
  • If new USB devices will not show up in your VM; you can run the following lines to fix this:
  • groupadd vboxusers
    usermod -aG vboxusers root
    usermod -aG vboxusers nobody
    mkdir /dev/vboxusb -m 0750
    chown root:vboxusers /dev/vboxusb
    
    Note that you will need to do this again every time unRAID is restarted.
    Optionally - some people are adding this to their go file to have it done for them at restart. - YMMV


  • Also good to know:
  • To stop or shutdown unRAID, you will likely need to stop any running VMs & kill the processes for VirtualBox. Unmenu has a Clean Powerdown package that can probably shutdown everything, but it will kill the processes & not safely shutdown or pause any running VMs. If you do not have access through phpvirtualbox to shut down a running VM (or just want to know how to manage VirtualBox without phpvirtualbox), this website http://www.linuxspy.info/tag/virtaulbox-how-to-send-poweroff-single-to-vm-tells-vm-os-to-shutdown/ can help you do everything via a command line.

  • Upon each reboot of unRAID, you will need to reinstall the VirtualBox tgz package, start the webserver & install the extension pack. Any VMs you want running either need to be powered up or unpaused.

-----------------------------------------------------------