Running VirtualBox VM host on ReadyNAS Pro

A nice, warm, and cozy place for all third-party developers to congregate.

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Mon Mar 23, 2009 6:27 pm

Split off sirozha's issue to another thread to keep this one on topic: viewtopic.php?f=35&t=27026
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby ptaylor874 » Tue Mar 24, 2009 3:33 pm

I've been playing with a VM under Virtual Box on my Pro Pioneer now off an on for about a week, and it has been performing great with everything I've thrown at it. However, I see one issue keeping me from putting anything serious in the VM... (to have it replace stuff running on another system) Now, this may be a stupid question, but how do I keep the VM from exiting when my SSH session closes? I'm starting my VM this way:

# VBoxHeadless -startvm "XP" &

Also, I installed Virtual Box as root - Is that an issue?
ptaylor874
ReadyNAS User
 
Posts: 66
Joined: Thu Aug 23, 2007 7:05 pm

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Tue Mar 24, 2009 3:51 pm

You can use the nohup command.
Code: Select all
# nohup VBoxHeadless -startvm "XP" &
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby ptaylor874 » Tue Mar 24, 2009 6:25 pm

Well, one of the functions I thought I'd try isn't working out on a VirtualBox VM. I loaded SageTV onto the VM and the drivers for my SiliconDust network tuners, setting up the ReadyNAS as the network storage where the video was written. (Not the local VM disk)

Anyhow, with one HD stream, playback to a PlaceShifter client (on the same LAN) was very choppy. I was hoping to offload the recording function from my current SageTV machine to the NAS itself, since I don't generally do any conversions, and that could potentially let me free up a machine. But, it appears that heavy network I/O isn't handled very well with the VM.
ptaylor874
ReadyNAS User
 
Posts: 66
Joined: Thu Aug 23, 2007 7:05 pm

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Thu Mar 26, 2009 11:47 pm

Haven't tested this yet, but covers the basics of having the VM start and stop on bootup... (till super-poussin makes a nice GUI add-on for it ;)

Add these lines:
/etc/default/services
Code: Select all
MOTION=1
/etc/frontview/addons/addons.conf
Code: Select all
VIRTUALBOX!!VirtualBox!!2.1.4!!/root/vboxctrl.sh start!!/root/vboxctrl.sh stop

My vboxctrl.sh script looks like this, obviously it can be made more generic:
Code: Select all
#! /bin/sh
# Control VirtualBox with system startup/shutdown.

PATH=/bin:/usr/bin

case "$1" in
  start|"")
        /usr/bin/VBoxHeadless -startvm "ThinClient" &
        ;;
  stop)
        /usr/bin/VBoxManage controlvm "ThinClient" savestate
        ;;
  status)
        /usr/bin/VBoxManage showvminfo "ThinClient" | grep '^State:'
        ;;
  restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
  *)
        echo "Usage: vboxctrl.sh [start|stop|status]" >&2
        exit 3
        ;;
esac
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Thu Apr 16, 2009 1:02 am

VirtualBox 2.2.0 is out now. I have it installed on my box, but had a few loops on the upgrade since I've also updated firmware a few times since. I'll try and update the guides on here for installing on the weekend to use 2.2.0.

Also using my iPhone with iTunes in the VM, USB passthru from the ReadyNAS works well :)
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby beisser » Thu Apr 16, 2009 3:37 am

hm, i just installed virtualbox 2.2.

it installs a lot of junk along the way (downloads 130 mb additional stuff), but it installed without a single error and also compiled the modules just fine. i havent tried to run it yet but i doubt it will cause problems.

edit: just started the vm. works without a problem.
User avatar
beisser
Jedi Council
 
Posts: 2314
Joined: Mon Dec 10, 2007 3:12 am
Location: Near Munich, Germany
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Thu Apr 16, 2009 7:01 am

I left my apt-cache, so mine only had to download 45MB (the VBox deb). Since firmware updates kill off the dpkg list, the system doesnt know stuff is already installed. I'm also running a 4.2.5 beta, so kernel stuff was a bit more tricky for me, but got stuff compiled once I pointed to the kernel sources.

Feels a bit more snappy to me, but could just be the brain. The new VBox Guest Additions also updated fine.
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby devbobo » Tue Apr 21, 2009 7:30 am

G'day Guys,

I got VirtualBox running on my ReadyNAS Pro...but I am having all sorts of trouble actually getting a VM fully installed. Basically, both installs (that I have tried: Vista and Ubuntu) get to a point where the OS would normally reboot, then VirtualBox client disconnects and when I run 'ps aux' on my NAS all the VBox processes have finished/terminated. Then restarting the VM seems to just get to into an endless install loop.

:cry:

Any ideas ?

Thanks,

David
User avatar
devbobo
ReadyNAS Newbie
 
Posts: 44
Joined: Mon Jul 28, 2008 1:32 am
Location: Melbourne, AU
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Tue Apr 21, 2009 12:54 pm

Any logs in /var/log/syslog from the VirtualBox kernel modules?
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby devbobo » Tue Apr 21, 2009 5:24 pm

chirpa wrote:Any logs in /var/log/syslog from the VirtualBox kernel modules?


I looked through the logs but didn't really see anything that stood out from normal operation.

I ended up transferring some VMs across that I had setup on my Mac and just hacked the xml files to get it to work.
User avatar
devbobo
ReadyNAS Newbie
 
Posts: 44
Joined: Mon Jul 28, 2008 1:32 am
Location: Melbourne, AU
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby ptaylor874 » Wed Apr 22, 2009 2:19 am

I've installed this, but don't currently have a need for it due to performance reasons... What is the cleanest way to uninstall VirtualBox from a Pro?

Any potential issues with leaving it installed (such as when I upgrade to newer Pro firmware)?

Thanks,
Paul
ptaylor874
ReadyNAS User
 
Posts: 66
Joined: Thu Aug 23, 2007 7:05 pm

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Wed Apr 22, 2009 10:23 am

No issues of leaving it there. In 4.2.5, the kernel modules might break though and need re-compiling.

You can reverse the apt-get install of virtualbox, apt-get remove, and delete the modules, then its pretty much uninstalled.
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby chirpa » Tue Jun 09, 2009 10:19 pm

I'm updating to VirtualBox 2.2.4 tonight. I am also using a 4.2.6 beta firmware, which has a new kernel. Went smooth after I got the right kernel sources :)
User avatar
chirpa
Jedi Council Alumni
 
Posts: 15535
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby muggsy » Tue Jun 23, 2009 8:43 pm

Awesome, only got 1GB in my PRO but installing Windows 7 on there. Ordered 4GB to put in hopefully tomorrow. Running on FW 4.2.5 and using virtualbox 2.2.4. Appears to be working well... A great thread and now will possibly lead me to actually setting up that network at home that I always wanted, but never had the physical space for all those PCs.

P.S. I like Virtual Box. I've only really got a background in VMware but with the great instructions, very painless... and great to support open source.
muggsy
ReadyNAS User
 
Posts: 62
Joined: Mon Feb 09, 2009 11:41 am
ReadyNAS: Pro

PreviousNext

Return to ReadyNAS Developers Network



Who is online

Users browsing this forum: No registered users and 2 guests