VirtualBox in unRAID


Recommended Posts

  • Replies 528
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Thanks to gfjardim help I now have this running very happily on my live box  ;D

 

I only have a Semperon 140 in my server atm so didn't want to go crazy.

That said, the one VM I am running (Windows XP Torrent/Download Box) is running perfectly and is extremely responsive for a VM.

 

I'd have to say this kicks the pants out of VMWare Server hands down.

Link to comment

Using VBox and Ubuntu I discovered how problematic is NFS, and how easy and stable is SMB. I recurrently had kernel panics or fs lockups. I recommend the use of XP/7 for a "service" because it's so much easier to get running.

 

And yes, Vbox is far superior from the outdated VMware Server.

Link to comment

I installed virtual box and got these messages. I think it is missing the xml file

 

root@Tower:/mnt/disk2/backup/virtbox# sh VirtualBox-4.0.4-70112-Linux_x86.run

Verifying archive integrity... All good.

Uncompressing VirtualBox for Linux installation..........

VirtualBox Version 4.0.4 r70112 (2011-02-17T17:03:53Z) installer

Installing VirtualBox to /opt/VirtualBox

ln: creating symbolic link `/usr/share/mime/packages/virtualbox.xml': No such file or directory

Python found: python, installing bindings...

/bin/bash: python: command not found

Building the VirtualBox kernel modules

 

VirtualBox has been installed successfully.

 

You will find useful information about using VirtualBox in the user manual

  /opt/VirtualBox/UserManual.pdf

and in the user FAQ

  http://www.virtualbox.org/wiki/User_FAQ

 

We hope that you enjoy using VirtualBox.

Link to comment

Thanks to gfjardim help I now have this running very happily on my live box  ;D

 

I only have a Semperon 140 in my server atm so didn't want to go crazy.

That said, the one VM I am running (Windows XP Torrent/Download Box) is running perfectly and is extremely responsive for a VM.

 

I'd have to say this kicks the pants out of VMWare Server hands down.

 

How much ram do you have? 

 

I'm curious about any user experiences with 4 GB (or less) ram.

Link to comment

I installed Virtual box over the weekend and ran into server problems. Some of them I could sort out with some help. Now the phpvbox web server is stating it cant connect to the vbox server service account.

 

What user name and passwords should be set ?

 

What other changes need to be made in the system to admin it ?

 

I am running unraid 4.7, virtualbox 4.0.4, unraidweb for php, and phpvbox web site.

The web server starts and loads phpvbox web site after installing and using firefox.

 

Thanks

John

 

Link to comment

If it helps, I made some very simple scripts to automate these jobs.

 

I use the first one to install and compile the headers. Note that all package versions are suitable for version 4.x of unRAID, but not for 5.x.

#!/bin/bash

P="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"

 

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

 

cd $P/packages

 

[ ! -e "linux-2.6.32.9.tar.gz" ] && wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.9.tar.gz

[ ! -e "gcc-4.2.4-i486-1.tgz" ] && wget http://slackware.oregonstate.edu/slackware-12.2/slackware/d/gcc-4.2.4-i486-1.tgz

[ ! -e "glibc-2.7-i486-17.tgz" ] && wget http://slackware.oregonstate.edu/slackware-12.2/slackware/l/glibc-2.7-i486-17.tgz

[ ! -e "binutils-2.18.50.0.9-i486-1.tgz" ] && wget http://slackware.oregonstate.edu/slackware-12.2/slackware/d/binutils-2.18.50.0.9-i486-1.tgz

[ ! -e "make-3.81-i486-1.tgz" ] && wget http://slackware.oregonstate.edu/slackware-12.2/slackware/d/make-3.81-i486-1.tgz

[ ! -e "cxxlibs-6.0.9-i486-1.tgz" ] && wget http://slackware.oregonstate.edu/slackware-12.2/slackware/a/cxxlibs-6.0.9-i486-1.tgz

[ ! -e "pkgtools-12.1.0-noarch-7.tgz" ] && wget http://slackware.osuosl.org/slackware-12.2/slackware/a/pkgtools-12.1.0-noarch-7.tgz

[ ! -e "perl-5.10.0-i486-1.tgz" ] && wget http://slackware.osuosl.org/slackware-12.2/slackware/d/perl-5.10.0-i486-1.tgz

[ ! -e "cpio-2.5-i486-3.tgz" ] && wget http://slackware.osuosl.org/slackware-12.2/slackware/a/cpio-2.5-i486-3.tgz

[ ! -e "patch-2.5.4-i486-1.tgz" ] && wget http://slackware.osuosl.org/slackware-12.2/slackware/a/patch-2.5.4-i486-1.tgz

[ ! -e "ncurses-5.6-i486-3.tgz" ] && wget http://slackware.osuosl.org/slackware-12.2/slackware/l/ncurses-5.6-i486-3.tgz

 

installpkg *.tgz

 

cd /

 

mv /usr/src/linux /usr/src/linux_original

 

if [ ! -d "$P/headers" ]; then

mkdir -p $P/headers

tar -C $P/headers -zxvf $P/packages/linux-2.6.32.9.tar.gz

cp -rf /usr/src/linux_original/* $P/headers/linux-2.6.32.9/

cp -f /usr/src/linux_original/.config $P/headers/linux-2.6.32.9/

fi

 

ln -sf $P/headers/linux-2.6.32.9 /usr/src/linux

[ -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

 

 

The second one I used to automate the package-making process:

#!/bin/bash

P="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"

 

TMPDIR="$P/vbox_temp"

 

[ -d "$TMPDIR" ] && rm -rf $TMPDIR

 

mkdir $TMPDIR

 

cd $TMPDIR

cp --parents -rf /opt/VirtualBox $TMPDIR/

cp --parents -f /lib/modules/2.6.32.9-unRAID/misc/vboxdrv.ko $TMPDIR/

cp --parents -f /lib/modules/2.6.32.9-unRAID/misc/vboxnetadp.ko $TMPDIR/

cp --parents -f /lib/modules/2.6.32.9-unRAID/misc/vboxnetflt.ko $TMPDIR/

cp --parents -rf /etc/vbox $TMPDIR/

cp --parents -f /etc/udev/rules.d/10-vboxdrv.rules $TMPDIR/

 

 

mkdir $TMPDIR/install

 

cat >>$TMPDIR/install/doinst.sh << 'THE_END_OF_SCRIPT'

# Insert VBox modules on the kernel

insmod /lib/modules/2.6.32.9-unRAID/misc/vboxdrv.ko

insmod /lib/modules/2.6.32.9-unRAID/misc/vboxnetadp.ko

insmod /lib/modules/2.6.32.9-unRAID/misc/vboxnetflt.ko

 

# Create some necessary links

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxVRDP

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox

ln -sf /usr/bin/VBoxHeadless /usr/bin/vboxheadless

ln -sf /usr/bin/VBoxManage /usr/bin/vboxmanage

ln -sf /usr/bin/VBoxSDL /usr/bin/vboxsdl

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/vboxwebsrv

 

# Reload udev rules

udevadm control --reload-rules

 

# Link the configuration dir

[ ! -d "/boot/custom/vbox" ] && mkdir -p /boot/custom/vbox

ln -sf /boot/custom/vbox /root/.VirtualBox

 

# Auto-created rules

THE_END_OF_SCRIPT

 

cd $TMPDIR/ && makepkg ../VirtualBox-4.0.2-unRAID.tgz

rm -rf $TMPDIR

 

 

I hope it helps.

 

Hi, is it the same where I run this scripts? Should I just put the in /boot/ and run them??

 

Thanks for any help

Halvard

Link to comment

I installed Virtual box over the weekend and ran into server problems. Some of them I could sort out with some help. Now the phpvbox web server is stating it cant connect to the vbox server service account.

 

What user name and passwords should be set ?

 

What other changes need to be made in the system to admin it ?

 

I am running unraid 4.7, virtualbox 4.0.4, unraidweb for php, and phpvbox web site.

The web server starts and loads phpvbox web site after installing and using firefox.

 

Thanks

John

 

 

Make sure you have the following in your go file to start the web service.

 

vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null >/dev/null

 

 

Also MUST run the following at the command line atleast once.

 

VBoxManage setproperty websrvauthlibrary null

Link to comment

HALP!

 

Today I noticed that my vm was being unexpectedly stopped.

Now I can't start (via VBoxManage startvm <VM Name> -type headless>

 

I see the following in the syslog:

Feb 27 01:39:03 Tower kernel: VBoxHeadless invoked oom-killer: gfp_mask=0x304d2, order=0, oom_adj=0 (Minor Issues)

Feb 27 01:39:03 Tower kernel: Pid: 13004, comm: VBoxHeadless Not tainted 2.6.32.9-unRAID #8 (Errors)

Feb 27 01:39:03 Tower kernel: Call Trace: (Errors)

Feb 27 01:39:03 Tower kernel:  [<c104ab61>] oom_kill_process+0x59/0x1cd (Errors)

Feb 27 01:39:03 Tower kernel:  [<c104afb9>] __out_of_memory+0xef/0x102 (Errors)

Feb 27 01:39:03 Tower kernel:  [<c104b02a>] out_of_memory+0x5e/0x83 (Errors)

Feb 27 01:39:03 Tower kernel:  [<c104cfe9>] __alloc_pages_nodemask+0x375/0x42f (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d3e4b>] rtR0MemObjLinuxAllocPages+0xad/0x163 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d3f28>] rtR0MemObjLinuxAllocPhysSub2+0x27/0xd1 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d4079>] rtR0MemObjLinuxAllocPhysSub+0xa7/0xb2 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d409e>] rtR0MemObjNativeAllocPhysNC+0x1a/0x1c [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d2812>] RTR0MemObjAllocPhysNCTag+0x55/0x6a [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d04b2>] ? supdrvIOCtl+0x1165/0x245a [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d3712>] ? rtR0MemAllocEx+0x60/0x90 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85d3712>] ? rtR0MemAllocEx+0x60/0x90 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85cc287>] ? VBoxDrvLinuxIOCtl+0xfd/0x171 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<f85cc18a>] ? VBoxDrvLinuxIOCtl+0x0/0x171 [vboxdrv] (Errors)

Feb 27 01:39:03 Tower kernel:  [<c10769d5>] ? vfs_ioctl+0x22/0x67 (Errors)

Feb 27 01:39:03 Tower kernel:  [<c1076f33>] ? do_vfs_ioctl+0x478/0x4ac (Errors)

Feb 27 01:39:03 Tower kernel:  [<c129eedf>] ? schedule+0x44c/0x72f (Errors)

Feb 27 01:39:03 Tower kernel:  [<c1076f93>] ? sys_ioctl+0x2c/0x45 (Errors)

Feb 27 01:39:03 Tower kernel:  [<c1002935>] ? syscall_call+0x7/0xb (Errors)

Feb 27 01:39:03 Tower kernel: Out of memory: kill process 12989 (VBoxHeadless) score 19543 or a child (Errors)

Feb 27 01:39:03 Tower kernel: Killed process 12989 (VBoxHeadless) (Errors)

Feb 27 01:39:03 Tower kernel: device eth0 left promiscuous mode (Network)

Feb 27 01:46:07 Tower kernel: device eth0 entered promiscuous mode (Network)

 

Any ideas?  It says out of memory, but my box has 8gb of memory, and I only have 1.5gb assigned to this vm.  The only other thing that would be taking resources is SAB and sickbeard...

 

free -m shows:

            total      used      free    shared    buffers    cached

Mem:          8041      7802        239          0        27      7427

-/+ buffers/cache:        347      7694

Swap:            0          0          0

 

 

Any ideas?

Link to comment

Venares

Thanks for the reply even though I had run those before running them again fixes the issue.

I then rebooted the server and it does not rerun afterwards even though it is in my go script.

the doinst.sh does not seem to run at the end of boot.

When and  how should that be run ?

If I do these manully the system runs great.

Now I just need more memory and cores. :)

 

John 

Link to comment

Hi, I'm still trying to get the virtualbox to work, but this is what I get when I run the script:

 

 

linux-2.6.32.9/virt/

linux-2.6.32.9/virt/kvm/

linux-2.6.32.9/virt/kvm/Kconfig

linux-2.6.32.9/virt/kvm/coalesced_mmio.c

linux-2.6.32.9/virt/kvm/coalesced_mmio.h

linux-2.6.32.9/virt/kvm/eventfd.c

linux-2.6.32.9/virt/kvm/ioapic.c

linux-2.6.32.9/virt/kvm/ioapic.h

linux-2.6.32.9/virt/kvm/iodev.h

linux-2.6.32.9/virt/kvm/iommu.c

linux-2.6.32.9/virt/kvm/irq_comm.c

linux-2.6.32.9/virt/kvm/kvm_main.c

tar: linux-2.6.32.9/arch/microblaze/boot/dts/system.dts: Cannot create symlink t                    o `../../platform/generic/system.dts': Operation not permitted

tar: Error exit delayed from previous errors

  HOSTCC  scripts/basic/fixdep

  HOSTCC  scripts/basic/docproc

  HOSTCC  scripts/basic/hash

  HOSTCC  scripts/kconfig/conf.o

  HOSTCC  scripts/kconfig/kxgettext.o

  SHIPPED scripts/kconfig/zconf.tab.c

  SHIPPED scripts/kconfig/lex.zconf.c

  SHIPPED scripts/kconfig/zconf.hash.c

  HOSTCC  scripts/kconfig/zconf.tab.o

  HOSTLD  scripts/kconfig/conf

scripts/kconfig/conf -o arch/x86/Kconfig

#

# configuration written to .config

#

scripts/kconfig/conf -s arch/x86/Kconfig

  CHK    include/linux/version.h

  UPD    include/linux/version.h

  CHK    include/linux/utsrelease.h

  UPD    include/linux/utsrelease.h

  SYMLINK include/asm -> include/asm-x86

ln: creating symbolic link `include/asm': Operation not permitted

make: *** [include/asm] Error 1

 

 

I have also tried to install it manual but with out any luck..

can anybody help?

 

Thanks in advance

Halvard

Link to comment

I am not too familiar with licensing and Linux/GPL/etc. but can't someone just post a compiled package?  I know with VMware there were restrictions due to serial number and agreements for downloading the software.  There is no serial number for VirtualBox, but is there another agreement/restriction?

 

I was able to create the package without any issues, but I'm sure this would be more widely adopted if it were a simple unmenu add-on.

 

Link to comment

I am not too familiar with licensing and Linux/GPL/etc. but can't someone just post a compiled package?  I know with VMware there were restrictions due to serial number and agreements for downloading the software.  There is no serial number for VirtualBox, but is there another agreement/restriction?

 

I was able to create the package without any issues, but I'm sure this would be more widely adopted if it were a simple unmenu add-on.

 

 

It would be quite awesome if someone would do this. I couldn't get past the first of gfjardim's scripts without errors.

Link to comment

I was getting errors too ... tar needed an 'f' was one ... and it seemed that only hard coded directories would work on my unRAID 4.7 system ... I would get funny names/directories running the given scripts ... and the created package was named vbox - unraid with no kernel numbers ...

 

my files are located in the /boot/vbox directory with the packages located in /boot/vbox/packages

 

here are the commands I used for the first two stages ...

 

Compile Headers:


cd /boot/vbox/packages
installpkg *.tgz

mv /usr/src/linux /usr/src/linux_original

tar -C /usr/src -zxvf /boot/vbox/packages/linux-2.6.32.9.tar.gz
   
ln -sf /usr/src/linux-2.6.32.9 /usr/src/linux

cp -rf /usr/src/linux_original/* /usr/src/linux/
cp -f /usr/src/linux_original/.config /usr/src/linux/

[ -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

 

Install Vbox:


mkdir -p /boot/custom/vbox && ln -sf /boot/custom/vbox /root/.VirtualBox

mkdir /mnt/cache/tmp

export TMPDIR=/mnt/cache/tmp && sh /boot/vbox/VirtualBox-4.0.2-69518-Linux_x86.run

 

 

Install WebServer and Extension Pack:


rmdir /mnt/cache/tmp

VBoxManage setproperty websrvauthlibrary null

vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null >/dev/null

VBoxManage extpack install /boot/vbox/Oracle_VM_VirtualBox_Extension_Pack-4.0.2-69518.vbox-extpack

 

 

I'm not sure why I was getting funny directory/filename manglings ... I formatted the flash to be sure and reinstalled unraid from scratch with only the bare minimum on the usb key and it was still giving me troubles with the directory/filenames being weird.

 

the only way I could get the package to work that was created was to install it once ... and then run doinst.sh manually and install the package again.

 

So currently each time I reboot I rebuild vbox from the start

 

 

I do really want to thank gfjardim for this as I wouldn't have any VirtualBox on my system without his great work on this ...

 

Bobby

 

 

Link to comment

I do really want to thank gfjardim for this as I wouldn't have any VirtualBox on my system without his great work on this ...

 

Bobby

 

And thank you for taking the time to type up the real world end user issues that will doubtless save many a headache and get us closer to making this thing easier to deploy.

Link to comment
This guide intention is to allow unRAID users to be able to compile their own kernel headers, and with that be able to compile and run VirtualBox into unRAID server. Note that a huge amount of RAM is necessary for compile and run VBox, and I recommend over 4GB or RAM.

 

Firslty many thanks to gfardim for taking the time to write up instructions like these. and also to everyone else who contributes to these forums. I'm very new to unraid and linux in general and the information and help i have found here has been top notch.

 

Now my question is you recommend over 4GB of RAM, my intention is to run win xp in Vbox to host NMTserver and probably carry out other functions but nothing too heavy. My sysem has 4GB but i wasnt planning to upgrade it anytime soon. will i run into any problems or should i consider more ram before i try to do this??

 

My apologies if this is a Noob Question but I am one.

Link to comment
  • 1 month later...

Ive finally gotten rouind to trying this and have become a bit stuck and as i'm a linux noob i can really do much troubleshooting. ive cnnect to my tyower using putty and when i get to unziipping the archive it doesnt  go any further

 

tar -C /usr/src -zxv linux-2.6.32.9.tar.gz.

 

Am i missing something?

Any help would be appreciated

Untitled.png.92530d152de24d40c00af02d8087d6c8.png

Link to comment

Hello Snowball,

 

Ive finally gotten rouind to trying this and have become a bit stuck and as i'm a linux noob i can really do much troubleshooting. ive cnnect to my tyower using putty and when i get to unziipping the archive it doesnt  go any further

 

tar -C /usr/src -zxv linux-2.6.32.9.tar.gz.

 

Up in post 44 I had the same issue (Page 3)

http://lime-technology.com/forum/index.php?topic=10978.msg109196#msg109196

 

I changed the tar command (adding an 'f') :

tar -C /usr/src -zxvf /boot/vbox/packages/linux-2.6.32.9.tar.gz

 

In three different code boxes I listed all commands at each stage for getting it compiled and running on my system  ...

I also tried to list the directories I used ...

 

 

Hope this helps ...

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.