Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VirtualBox in unRAID

Featured Replies

Any news on this coming to the package manager? Or is it fairly simple to setup using the scripts?

 

It is on my list to look at, but it probably won't happen for a little while yet.  I am working on updating the Airvideo package so that it works properly with the new stuff it needs.

  • Replies 528
  • Views 199.6k
  • Created
  • Last Reply

You can either start up you Virtual Machine using:

 

VBoxManage startvm - http://www.virtualbox.org/manual/ch08.html#vboxmanage-startvm

or

VBoxHeadless - http://www.virtualbox.org/manual/ch07.html#vboxheadless (if you are just going to connect to it via remote desktop)

or

vboxtool - http://vboxtool.sourceforge.net/

 

but the more important issue is how to get the Virtual Machine turned off "properly"/"safely" once you shut down or restart your unRAID array?

 

There are at least 2 options that need to be looked at:

 

VBoxManage controlvm - http://www.virtualbox.org/manual/ch08.html#vboxmanage-controlvm

or (again)

vboxtool - http://vboxtool.sourceforge.net/ (which states that it does it automatically).

 

 

 

I had time to test this and have chosen:

nohup VBoxHeadless --startvm "Windows 7 Enterprise" --vrde=off >/dev/null 2>&1 &

for starting the VM in headless mode (will be controlling it via Remote Desktop or Logmein).

 

and

nohup VBoxManage controlvm "Windows 7 Enterprise" savestate >/dev/null 2>&1 &

for stopping the VM in save mode (something like suspend in windows - the machine state is saved to a file - snapshot).

 

When resuming the VM with VBoxHeadless the saved state is resumed.

 

Remaining issue - How can I add the save command to the server powerdown script? ???

Will unRAID v5 have the option (GUI) to add additional functionality (commands) to the powerdown script? ???

 

Note:

I just realised that by installing Logmein on the VM I can actually access and control the unRAID server the VM is running on... :o

Which removes the need for Dynamic DNS package I was contemplating on using.

 

Remaining issue - How can I add the save command to the server powerdown script? ???

Will unRAID v5 have the option (GUI) to add additional functionality (commands) to the powerdown script? ???

anyone know how I can do this in current unRAID system?

 

  • Author

In v5.x you can try edit the script "/usr/local/sbin/emhttp_event" with something like this :

 

echo -e "case \"\$1\" in\n\

    'disks_mounted')\n\

        nohup VBoxHeadless --startvm "Windows 7 Enterprise" --vrde=off >/dev/null 2>&1 &\n\

    ;;\n\

    'unmounting_disks')\n\

        nohup VBoxManage controlvm "Windows 7 Enterprise" savestate >/dev/null 2>&1 &\n\

    ;;\n\

esac">>/usr/local/sbin/emhttp_event

 

Does anyone know what would happen to the virtualbox machines if the process is just terminated by the unmenu shutdown command? I seem to remember somebody saying that shutdown script first tries to terminate things nicely, then kills them. I have multiple vbox machines I'm playing with (not simultaneously) and it would be kind of a pain to remember to update the shutdown script to kill each instance. Is there a command that would ask all possible vbox machines to suspend instead of calling them all out one by one? I'm currently managing them via phpvirtualbox, so it would be nice to know an unattended shutdown won't mess up a vbox machine I've currently got open.

 

I suppose I could install apcupsd on each vbox machine and set the shutdown to occur a couple minutes sooner than the unraid box.

Anyone have instructions to get phpvirtualbox going?

I'm totally lost getting phpvirtualbox running.

 

I have virtualbox running and installed (at least I think so! no errors or anything) and I have phpvirtualbox extracted to: /mnt/cache/phpvirtualbox-0.5

 

What do I need to do?

I gave a try to virtualbox.

 

I wasn't able to run it under unRAID 4.5.1

So I upgrade to 4.7.

it did work. Installation was OK and I was able to configure phpvbox.

Thanx for the guide, by the way.

 

BUT it is extremely slow. In fact, it is 100 X slower than vmware.

I can't figure why.

 

I'm back to vmware for now but i'll try again when i'll have  some spare time.

 

:)

 

 

The easiest way to run phpvirtualbox is to install unRAID-Web package from unMENU and then, in the "Personal Webserver Setup" menu, choose the path of the extracted phpvirtualbox files, pick a non-used port, save the configuration and restart the webserver.

 

You need to set the authentication mode of Vbox webserver to null:

VBoxManage setproperty websrvauthlibrary null

 

And you will need to launch the vboxwebserver:

vboxwebsrv -b -H <ip of unRAID> --logfile /dev/null >/dev/null

 

I could use a little help with the phpvirtualbox part....

 

I have phpvirtualadmin @ "/boot/packages/phpvirtualbox/" and have setup the webserver on port 82.

 

I ran these commands:

VBoxManage setproperty websrvauthlibrary null
vboxwebsrv -b -H 10.10.1.122 --logfile /dev/null >/dev/null

 

When I go to http://tower:82 I get a popup that says

An unknown PHP error occurred. This is most likely a syntax error in config.php in phpVirtualBox's folder.
The most common errors are an unclosed quote or a missing semicolon in a configuration item that has been entered 
(e.g. location, username, or password). Depending on your PHP configuration, navigating directly to config.php 
in your web browser may display the PHP error message. If find that this is not the case, or have no idea 
what this error message means, please raise the issue at http://code.google.com/p/phpvirtualbox/issues/list

 

So I go to http://tower:82/config.php and get a "500 - Internal Server Error"

 

In config.php there is this:

/* Username / Password for system user that runs VirutalBox */
var $username = 'ian';
var $password = 'password';
var $location = 'http://10.10.1.122:18083/';

 

I changed the IP address to match my server, but the username and password? What's up with those? Do they matter since we set authentication to null?

 

VirtualBox Web Server "vboxwebsrv" continuously writes a log file to the "/boot/custom/vbox" folder on the flash drive whenever the WEBUI is open in your browser.

 

This can shorten the life of the flash drive.  :(

 

This is less serious than "transmission" flash write because it occurs only during WEBUI usage (configuration stage of virtual machine).

 

can the location of the vbox folder be modified easily? or does it need a .conf file solution like the equivalent transmission flash writing problem?

 

  • Author

I'm using this syntax to launch the webserver:

 

vboxwebsrv -H 0.0.0.0 1>/dev/null 2>&1 &

 

It's working really well without any log.

 

Theone, try this sintax to launch wboxwebsrv, it won't write to the flash drive.

phpvbox.png

 

Can anyone assist with phpvirtualbox????

I'm using this syntax to launch the webserver:

 

vboxwebsrv -H 0.0.0.0 1>/dev/null 2>&1 &

 

It's working really well without any log.

 

Theone, try this sintax to launch wboxwebsrv, it won't write to the flash drive.

 

don't you also need the -b option for running in background ?

 

  • Author

I'm using this syntax to launch the webserver:

 

vboxwebsrv -H 0.0.0.0 1>/dev/null 2>&1 &

 

It's working really well without any log.

 

Theone, try this sintax to launch wboxwebsrv, it won't write to the flash drive.

 

don't you also need the -b option for running in background ?

 

 

The -b option is the one that write logs into the flash drive, the "&" in the end "demonizes" the service.

Can anyone assist with phpvirtualbox????

 

Have you done this part?

The easiest way to run phpvirtualbox is to install unRAID-Web package from unMENU and then, in the "Personal Webserver Setup" menu, choose the path of the extracted phpvirtualbox files, pick a non-used port, save the configuration and restart the webserver.

 

IIRC, after I did that and launched phpvbox for the first time, it asked me to create the config.php.  I think I just copied config.php-example to config.php.  After that it seems to start.

 

Sorry man, my recall superpowers suck.  But I hope it puts you in the right track.  I can get more information once I get home.

I did. the package from google code had a preconfigured config.php in it already; maybe that's the issue. I've given up on the project for now. My box is an old p4 - probably not capable...

 

I really just want to run openvpn on this box :)

My box is an old p4 - probably not capable...

 

I have the same problem with phpvirtualbox my AMD 4050e/2GB system. Not a powerful machine but I wonder if memory is the issue. In the end I configured a VM using terminal. That worked but I would still like to get the web configuration method working.

Will Virtualbox work with the new Beta7 kernel or will it need to be recompiled with a new script?

 

  • Author

Will Virtualbox work with the new Beta7 kernel or will it need to be recompiled with a new script?

 

 

You will need to recompile with a new script:

 

#!/bin/bash
P="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
KVERSION=`uname -r | cut -d"-" -f1`
KDIR="/usr/src/$(uname -r)"

[ ! -d "$P/packages" ] && mkdir $P/packages

cd $P/packages

[ ! -e "linux-$KVERSION.tar.gz" ] && wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-$KVERSION.tar.gz
[ ! -e "gcc-4.4.4-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/d/gcc-4.4.4-i486-1.txz
[ ! -e "glibc-2.11.1-i486-3.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/l/glibc-2.11.1-i486-3.txz
[ ! -e "binutils-2.20.51.0.8-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/d/binutils-2.20.51.0.8-i486-1.txz
[ ! -e "make-3.81-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/d/make-3.81-i486-1.txz
[ ! -e "cxxlibs-6.0.13-i486-2.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/a/cxxlibs-6.0.13-i486-2.txz
[ ! -e "perl-5.10.1-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/d/perl-5.10.1-i486-1.txz
[ ! -e "patch-2.5.4-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/a/patch-2.5.4-i486-1.txz
[ ! -e "ncurses-5.7-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/l/ncurses-5.7-i486-1.txz
[ ! -e "mpfr-2.4.2p03-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/l/mpfr-2.4.2p03-i486-1.txz
[ ! -e "gcc-g++-4.4.4-i486-1.txz" ] && wget http://slackware.osuosl.org/slackware-13.1/slackware/d/gcc-g++-4.4.4-i486-1.txz

installpkg *.t*z

rm /usr/src/linux
ln -sf $P/headers/linux-$KVERSION /usr/src/linux

if [ ! -d "$P/headers" ]; then
        mkdir -p $P/headers
        tar -C $P/headers -zxvf $P/packages/linux-$KVERSION.tar.gz
        find $KDIR -type f -exec cp --parents '{}' /usr/src/linux/ \;
fi

[ -e "/usr/include/linux" ] && mv /usr/include/linux /usr/include/linux_original
[ -e "/usr/include/asm-generic" ] && mv /usr/include/asm-generic /usr/include/asm-generic_original
[ -e "/usr/include/asm" ] && mv /usr/include/asm /usr/include/asm_original
ln -sf /usr/src/linux/include/asm-generic /usr/include/asm-generic
ln -sf /usr/src/linux/include/linux /usr/include/linux
ln -sf /usr/src/linux/arch/x86/include/asm /usr/include/asm

cd /usr/src/linux && make oldconfig && make

Does anyone want to work on a legit wiki page with instructions for this? and keep that updated instead of a thread that we have to dig through to find information? - like that script looks awesome, but I have to still go back and search for where to find the packages... etc etc.

Does anyone want to work on a legit wiki page with instructions for this? and keep that updated instead of a thread that we have to dig through to find information? - like that script looks awesome, but I have to still go back and search for where to find the packages... etc etc.

 

Wiki it is: http://lime-technology.com/wiki/index.php?title=Installing_VirtualBox_in_unRAID

 

8)

 

WOW. I'll give it a shot when I get home (next week)

 

 

Just upgraded to 5.0b7 and thought it was time to give vbox a try after the great wiki article made the info more accessible. After a few bumbs i managed to create the package, but when trying to run it (even after reboot) i get the following errors. Not sure if they are critical or not, or even if virtual box will work despite the errors. Anyone got any ideas?

 

root@Tower:/boot/packages# installpkg VirtualBox-4.0.8-unRAID.tgz

Verifying package VirtualBox-4.0.8-unRAID.tgz.

Installing package VirtualBox-4.0.8-unRAID.tgz:

PACKAGE DESCRIPTION:

Executing install script for VirtualBox-4.0.8-unRAID.tgz.

insmod: error inserting '/lib/modules/2.6.37.6-unRAID/misc/vboxdrv.ko': -1 Invalid module format

insmod: error inserting '/lib/modules/2.6.37.6-unRAID/misc/vboxnetadp.ko': -1 Invalid module format

insmod: error inserting '/lib/modules/2.6.37.6-unRAID/misc/vboxnetflt.ko': -1 Invalid module format

Package VirtualBox-4.0.8-unRAID.tgz installed.

 

When trying to run a VBoxManage command i get the following error:

WARNING: The vboxdrv kernel module is not loaded. Either there is no module

        available for the current kernel (2.6.37.6-unRAID) or it failed to

        load. Please recompile the kernel module and install it by

 

          sudo /etc/init.d/vboxdrv setup

 

        You will not be able to start VMs until this problem is fixed.

Please try the new script posted above.

 

Are there any differences between the script above, and the 5.x script in the wiki article? Couldn't see any by glancing them.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.