× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Running VirtualBox VM host on ReadyNAS Pro

chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

If you put 4GB in, the Pro will currently allow you to see 3GB.

The GuestAdditions is a software package for VirtualBox VMs that provides a few things. First it installs better Video and Mouse drivers, also allows you to share guest/host folders together.
VirtualBox’s guest additions provide better display drivers, mouse pointer integration, seamless windows, and more. If you’re doing much work in a virtual machine you should have them installed.

Page 1 of this thread already gives a quick step-by-step on getting it installed, which worked for a few people already.
Message 51 of 442
starg4ze
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

chirpa wrote:

Next thing I am going to try is, converting the virtual guest from being an IDE drive to a SATA drive. Looks to fairly simple to do, and apparently the virtual SATA uses less CPU resouces, so should make the performance even better (http://forums.virtualbox.org/viewtopic. ... 289#p36289).


I did this with a Windows 7 machine, and it worked like a charm. Probably a little bit harder on a XP, though.

Also, Im VERY happy with the performance on my XP VM that i'm running on my PRO. This is outstanding!
One thing I dont have figured out yet is what backup strategy I should use. As I see, I have three options:
1. Use a Windows software running on the VM to clone or to backup vital parts of the VM
or
2. Take snapshots of the running VM
or
3. Use a script to shutdown VM, copy .vdi to safe location, start VM again.

Thoughts on this? Experience with snapshots?
Message 52 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

I'm running 2003 on the VM, going to try the IDE->SATA change tonight on it.

I'd probably go with #3.
Could maybe use the Save State, copy, restore, shouldn't take long to run that on the Pro, less than a few minutes, so there isn't much interruption to the VM.

http://srackham.wordpress.com/cloning-a ... -machines/
Message 53 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

This may be enough in a script to cronjob late at night one day a week. Pause/Hibernate the OS, clone the VDI, then bring it back up. The VM cannot be running when the clonehd command runs, and this way, when it comes back up, its not a fresh boot, but right where you left it off. My image is 30GB, so took around 10mins or so I think to finish, didn't time it yet.
pronto:/c/backup/VirtualBox# VBoxManage controlvm "ThinClient" savestate
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

pronto:/c/backup/VirtualBox# VBoxManage clonehd fd7c34af-5418-4911-a812-5a04909
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: 06616685-6447-4e59-94cd-c04a3df32a74

pronto:/c/backup/VirtualBox# VBoxHeadless -startvm "ThinClient" &
pronto:/c/backup/VirtualBox# ls -lh
-rw------- 1 root root 30G 2009-03-19 12:19 ThinClientClone.vdi
-rw------- 1 root root 30G 2009-03-19 12:48 ThinClient.vdi
Message 54 of 442
ptaylor874
Tutor

Re: Running VirtualBox VM host on ReadyNAS Pro

Ok - I took the plunge and tried it out tonight.. Just got my VM installed (XPSP2) and must say that I'm majorly impressed with the raw speed of the VM.
Message 55 of 442
ptaylor874
Tutor

Re: Running VirtualBox VM host on ReadyNAS Pro

chirpa wrote:
At first, I was using the built in VRDP of VirtualBox. But I switched to using the virtual machine (Windows 2003) RDP server, this way I could send audio and stuff over the connection, and take full use of ClearType fonts, etc.


How do you do this? Running using your initial commands, I'm in NAT mode, so my workstation doesn't have direct access to my VM. I'm guessing I would need to change it to bridge mode (the way I usually run VMware), but I'm not sure how to accomplish this.

I see this in the built-in help for VBoxManage:
[-nic<1-N> none|null|nat|hostif|intnet]

Other searches indicate that an option called bridged used to exist, but it appears to have been replaced with hostif. Is this something safe to run as on a ReadyNAS?
Message 56 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

Good point, forgot to mention that. When I did start using the native RDP, I did this:
# VBoxManage modifyvm "ThinClient" -nic1 hostif
# VBoxManage modifyvm "ThinClient" -hostifdev1 eth1
Then the VM just picked up a DHCP address from my router. I've also mapped to it as a share to copy stuff over quicker.
Message 57 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

Also, GPL code for the 4.2.4 release is available. I'll try and do a quick how-to on what I did to compile the kernel modules this weekend, or one of you geeks will maybe beat me to it.
Message 58 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

Added steps in the first post on how to compile the kernel modules.
Message 59 of 442
starg4ze
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

Allright, here's my backup-script to completly backup a VM on the ready NAS. Im running my business accounting and invoce software on the VM(because it does not run under OSX :cry: ), so backup is paramount to me...

#!/bin/sh
## Script to compleatly backup a Virtual machine and keep 10 generations
##
## Hibernate Virtual machine
VBoxManage controlvm VIRTUAL-MACHINE-NAME savestate
## Remove backup 10 days old
rm PATH-TO/VIRTUAL-MACHINE-NAME-`date -d '10 days ago' +%Y%m%d`.vdi
## Clone/Backup Virtual machine
VBoxManage clonehd PATH-TO/VIRTUAL-MACHINE-NAME.vdi PATH-TO/VIRTUAL-MACHINE-NAME-`date +%Y%m%d`.vdi
## Start Virtual machine again
VBoxHeadless -startvm VIRTUAL-MACHINE-NAME &

Put the script in the /etc/cron.daily to run the script every day
Also, don't forget the
chmod +x SCRIPT-NAME
Message 60 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

Split off sirozha's issue to another thread to keep this one on topic: viewtopic.php?f=35&t=27026
Message 61 of 442
ptaylor874
Tutor

Re: Running VirtualBox VM host on ReadyNAS Pro

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?
Message 62 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

You can use the nohup command.
# nohup VBoxHeadless -startvm "XP" &
Message 63 of 442
ptaylor874
Tutor

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 64 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

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
MOTION=1
/etc/frontview/addons/addons.conf
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:
#! /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
Message 65 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

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 🙂
Message 66 of 442
beisser1
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 67 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 68 of 442
devbobo
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

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
Message 69 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

Any logs in /var/log/syslog from the VirtualBox kernel modules?
Message 70 of 442
devbobo
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 71 of 442
ptaylor874
Tutor

Re: Running VirtualBox VM host on ReadyNAS Pro

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
Message 72 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 73 of 442
chirpa
Luminary

Re: Running VirtualBox VM host on ReadyNAS Pro

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 🙂
Message 74 of 442
muggsy
Aspirant

Re: Running VirtualBox VM host on ReadyNAS Pro

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.
Message 75 of 442
Top Contributors
Announcements