NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
chirpa
Mar 07, 2009Luminary
Running VirtualBox VM host on ReadyNAS Pro
What is VirtualBox?
So, I got bored while laundry was going... and decided to see how well a virtual OS would run on the Pro. My first choice of VM was VirtualBox, just cause I'm familiar with it after using it for ages, plus its open and free :) Eventually, I may look into VMWare as well.
After a bit of messing around, got it installed. Since the system is based off of Debian, was easy to get VirtualBox itself there (deb package). The trickiest part was getting the kernel modules required installed (see end of post).
In the end, I've got Windows 2003 R2 running on my Pro, interacting with it via RDP, and I am happy with the performance. I've added an extra 1GB memory (for a total of 2GB). I assigned 1GB of ram to my virtual OS, which still leaves the default configuration of 1GB for the NAS itself (which is more than enough still, 800MB+ is always cached).
I made a 10GB virtual disk to install the OS on. If I need more space later for extra applications, I can just add another virtual drive to that installation. And since I always like a bit extra security, I went a bit beyond the usual, and also have TrueCrypt running full disk encryption in the virtual OS. So no one can even boot and read the data in that OS without my bootup password.
I don't really have any screenshots to show, just a standard Windows installation. Here is a few of the steps I used while creating the VM on the console:
VirtualBox 3.1 has changed the CLI configuration. Until I update this how-to, please reference this: http://www.uhleeka.com/blog/2009/12/vir ... 9-04-host/
With the OS booted up and just sitting at the desktop, top reports:
Ad-hoc installation of VirtualBox. Should work for RAIDiator 4.2.4. Download links for the kernel modules, for those who don't want to go through the mess of compiling them.
So, I got bored while laundry was going... and decided to see how well a virtual OS would run on the Pro. My first choice of VM was VirtualBox, just cause I'm familiar with it after using it for ages, plus its open and free :) Eventually, I may look into VMWare as well.
After a bit of messing around, got it installed. Since the system is based off of Debian, was easy to get VirtualBox itself there (deb package). The trickiest part was getting the kernel modules required installed (see end of post).
In the end, I've got Windows 2003 R2 running on my Pro, interacting with it via RDP, and I am happy with the performance. I've added an extra 1GB memory (for a total of 2GB). I assigned 1GB of ram to my virtual OS, which still leaves the default configuration of 1GB for the NAS itself (which is more than enough still, 800MB+ is always cached).
I made a 10GB virtual disk to install the OS on. If I need more space later for extra applications, I can just add another virtual drive to that installation. And since I always like a bit extra security, I went a bit beyond the usual, and also have TrueCrypt running full disk encryption in the virtual OS. So no one can even boot and read the data in that OS without my bootup password.
I don't really have any screenshots to show, just a standard Windows installation. Here is a few of the steps I used while creating the VM on the console:
VirtualBox 3.1 has changed the CLI configuration. Until I update this how-to, please reference this: http://www.uhleeka.com/blog/2009/12/vir ... 9-04-host/
# Creating the Virtual Machine.
$ VBoxManage createvm -name "Windows2003" -register
$ VBoxManage modifyvm "Windows2003" -memory "1024MB" -acpi on -boot1 dvd -nic1 nat
$ VBoxManage createvdi -filename "/c/backup/VirtualBox/Windows2003.vdi" -size 10000 -register
$ VBoxManage modifyvm "Windows2003" -hda "/c/backup/VirtualBox/Windows2003.vdi"
$ VBoxManage registerimage dvd /c/backup/VirtualBox/Windows2003Ent.iso
$ VBoxManage modifyvm "Windows2003" -dvd /c/backup/VirtualBox/Windows2003Ent.iso
$ VBoxHeadless -startvm "Windows2003" &
# Connected via Remote Desktop at this point.
# After the installation, first page requires Ctrl-Alt-Del, so I sent the keycodes.
$ VBoxManage controlvm "Windows2003" keyboardputscancode 1d 38 53
# System is up and running, time to install GuestAdditions for better video, etc.
$ wget http://download.virtualbox.org/virtualbox/2.2.2/VBoxGuestAdditions_2.2.2.iso
$ VBoxManage registerimage dvd /c/backup/VirtualBox/VBoxGuestAdditions_2.2.2.iso
$ VBoxManage controlvm "Windows2003" dvdattach /c/backup/VirtualBox/VBoxGuestAdditions_2.2.2.iso
With the OS booted up and just sitting at the desktop, top reports:
top - 16:17:10 up 1 day, 17:58, 1 user, load average: 0.00, 0.01, 0.00
Tasks: 93 total, 1 running, 92 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7%us, 0.2%sy, 0.0%ni, 99.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2072432k total, 2020100k used, 52332k free, 6120k buffers
Swap: 1048536k total, 144k used, 1048392k free, 784620k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10297 root 20 0 1104m 1.0g 4720 S 4 52.5 57:31.53 VBoxHeadless
12792 root 20 0 46092 9520 1720 S 1 0.5 59:54.51 motion
12196 root 20 0 9196 7688 980 S 0 0.4 0:57.72 wastesrv
1 root 20 0 1948 600 508 S 0 0.0 0:01.30 init
Ad-hoc installation of VirtualBox. Should work for RAIDiator 4.2.4. Download links for the kernel modules, for those who don't want to go through the mess of compiling them.
$ mkdir /lib/modules/`uname -r`/miscOr, if you want to compile the kernel modules yourself:
$ cd /lib/modules/`uname -r`/misc
$ wget http://www.readynas.com/contributed/chirpa/modules/virtualbox/pro/vboxdrv.ko
$ wget http://www.readynas.com/contributed/chirpa/modules/virtualbox/pro/vboxnetflt.ko
$ echo "deb http://download.virtualbox.org/virtualbox/debian etch non-free" >> /etc/apt/sources.list
$ wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | apt-key add -
$ apt-get update
$ apt-get install virtualbox-2.1
$ /etc/init.d/vboxdrv start
envyious:/c/backup# echo "deb http://download.virtualbox.org/virtualbox/debian etch non-free" >> /etc/apt/sources.listInstall of VirtualBox 2.2.2, before Sun updates the Debian Repository...
envyious:/c/backup# wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | apt-key add -
envyious:/c/backup# apt-get update && apt-get install build-essential
...
Setting up build-essential (11.3) ...
envyious:/c/backup# wget -q http://www.readynas.com/download/GPL/RNDP6xxx_4.2.4_WW_src.zip
envyious:/c/backup# unzip -q RNDP6xxx_4.2.4_WW_src.zip -d ./GPL
envyious:/c/backup# cd GPL/linux-x86-2.6/
envyious:/c/backup/GPL/linux-x86-2.6# make && make prepare
...
envyious:/c/backup/GPL/linux-x86-2.6# ln -s /c/backup/GPL/linux-x86-2.6/ /usr/src/linux
envyious:/c/backup/GPL/linux-x86-2.6# KERN_DIR=/usr/src/linux
envyious:/c/backup/GPL/linux-x86-2.6# apt-get install virtualbox-2.1
...
Setting up virtualbox-2.1 (2.1.4-42893_Debian_etch) ...
Adding group `vboxusers' (GID 101) ...
Done.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
Starting VirtualBox kernel module: done.
envyious:/c/backup/GPL/linux-x86-2.6# cd
envyious:/c/backup/GPL/linux-x86-2.6# VBoxManage list vms
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.
# wget -q http://www.readynas.com/download/GPL/RNDP6xxx_4.2.4_WW_src.zip
# unzip -q RNDP6xxx_4.2.4_WW_src.zip -d ./GPL
# cd GPL/linux-x86-2.6/
# make && make prepare
# ln -s /c/backup/GPL/linux-x86-2.6/ /usr/src/linux
# export KERN_DIR=/usr/src/linux
# apt-get install libfontconfig1 libglib2.0-0 libice6 libsdl1.2debian libsm6 libx11-6 libxcursor1 libxext6 libxi6 libxmu6 libxrandr2 libxrender1 libxslt1.1 libxt6 python2.4
# wget -q http://download.virtualbox.org/virtualbox/2.2.2/virtualbox-2.2_2.2.2-46594_Debian_etch_i386.deb
# dpkg -i virtualbox-2.2_2.2.2-46594_Debian_etch_i386.deb
Setting up virtualbox-2.2 (2.2.2-46594_Debian_etch) ...
Recompiling VirtualBox kernel module: done.
Starting VirtualBox kernel module: done.
441 Replies
Replies have been turned off for this discussion
- j6harriAspirant@MattyShack
Thanks for getting me past that problem. I was able to complete the rest of your guide except for 1 option section of installing webmin. Do you have any ideas for this error.
NASHOG:/c/addons-config/VirtualBox/backup# dpkg --install webmin_1.590_all.deb
(Reading database ... 24830 files and directories currently installed.)
Unpacking webmin (from webmin_1.590_all.deb) ...
dpkg: error processing webmin_1.590_all.deb (--install):
unable to create `./usr/share/webmin/custom/help/before.de.html': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
webmin_1.590_all.deb
NASHOG:/c/addons-config/VirtualBox/backup# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md0 4185780 2446680 1529388 62% /
tmpfs 16 0 16 0% /USB
/dev/c/c 9699971712 4693302100 5006669612 49% /c
/c/backup 9699971712 4693302100 5006669612 49% /home/ftp/backup
/c/media 9699971712 4693302100 5006669612 49% /home/ftp/media
/dev/sdh1 1945752432 318645440 1627106992 17% /USB/BackupNAS
NASHOG:/c/addons-config/VirtualBox/backup# - If I understand this line: "unable to create `./usr/share/webmin/custom/help/before.de.html': No space left on device"
You are out of space on your "/" main partition. How much free space is reported for "/" when you type: df
If there is a space issue, try clearing out your /tmp directory then run df again to see how much space has been reclaimed. Webmin is not a requirement, so you may need to skip. - j6harriAspirantI cleaned up some space on /.
NASHOG:/usr/bin# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md0 4185780 1687404 2288664 43% /
tmpfs 16 0 16 0% /USB
/dev/c/c 9699971712 4699942940 5000028772 49% /c
/c/backup 9699971712 4699942940 5000028772 49% /home/ftp/backup
/c/media 9699971712 4699942940 5000028772 49% /home/ftp/media
/dev/sdh1 1945752432 318645440 1627106992 17% /USB/BackupNAS
NASHOG:/usr/bin# cd /c/addons-config/VirtualBox/backup/
After that I attempted the install and got the following error.
NASHOG:/c/addons-config/VirtualBox/backup# dpkg --install webmin_1.590_all.deb
(Reading database ... 24861 files and directories currently installed.)
Unpacking webmin (from webmin_1.590_all.deb) ...
dpkg: dependency problems prevent configuration of webmin:
webmin depends on libnet-ssleay-perl; however:
Package libnet-ssleay-perl is not installed.
webmin depends on libauthen-pam-perl; however:
Package libauthen-pam-perl is not installed.
webmin depends on libio-pty-perl; however:
Package libio-pty-perl is not installed.
webmin depends on apt-show-versions; however:
Package apt-show-versions is not installed.
dpkg: error processing webmin (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
webmin
NASHOG:/c/addons-config/VirtualBox/backup#
So I ran the following to clear that up and get webmin installed.
NASHOG:/c/addons-config/VirtualBox/backup# sudo apt-get install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl apt-show-versions
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
apt-show-versions: Depends: libapt-pkg-perl but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
NASHOG:/c/addons-config/VirtualBox/backup# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl libnet-ssleay-perl
The following NEW packages will be installed:
apt-show-versions libapt-pkg-perl libauthen-pam-perl libio-pty-perl libnet-ssleay-perl
0 upgraded, 5 newly installed, 0 to remove and 8 not upgraded.
1 not fully installed or removed.
Need to get 371kB of archives.
After unpacking 1540kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.debian.org etch/main libnet-ssleay-perl 1.30-1 [192kB]
Get:2 http://archive.debian.org etch/main libauthen-pam-perl 0.16-1 [32.6kB]
Get:3 http://archive.debian.org etch/main libio-pty-perl 1:1.05-2 [43.0kB]
Get:4 http://archive.debian.org etch/main libapt-pkg-perl 0.1.20 [82.0kB]
Get:5 http://archive.debian.org etch/main apt-show-versions 0.10 [22.0kB]
Fetched 371kB in 2s (144kB/s)
Selecting previously deselected package libnet-ssleay-perl.
(Reading database ... 46895 files and directories currently installed.)
Unpacking libnet-ssleay-perl (from .../libnet-ssleay-perl_1.30-1_i386.deb) ...
Selecting previously deselected package libauthen-pam-perl.
Unpacking libauthen-pam-perl (from .../libauthen-pam-perl_0.16-1_i386.deb) ...
Selecting previously deselected package libio-pty-perl.
Unpacking libio-pty-perl (from .../libio-pty-perl_1%3a1.05-2_i386.deb) ...
Selecting previously deselected package libapt-pkg-perl.
Unpacking libapt-pkg-perl (from .../libapt-pkg-perl_0.1.20_i386.deb) ...
Selecting previously deselected package apt-show-versions.
Unpacking apt-show-versions (from .../apt-show-versions_0.10_all.deb) ...
Setting up libnet-ssleay-perl (1.30-1) ...
Setting up libauthen-pam-perl (0.16-1) ...
Setting up libio-pty-perl (1.05-2) ...
Setting up libapt-pkg-perl (0.1.20) ...
Setting up apt-show-versions (0.10) ...
** initializing cache. This may take a while **
Setting up webmin (1.590) ...
Webmin install complete. You can now login to https://NASHOG:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.
NASHOG:/c/addons-config/VirtualBox/backup#
Thanks so much the @MattyShack for the great step-by-step. MattyShack wrote:
# Fresh download of Repository Packages
apt-get update && apt-get upgrade
Is that right? (Bold and underscored)
I've always steered away from the apt-get upgrade on advice from this forum.
Anybody clarify it works okay?
Setting my VMs is back on the agenda now I have replaced my dead HDDs, and this looked a handy guide to keep an eye on...- As long as your source list is limited to the following:
deb http://www.readynas.com/packages 4.2.21/
deb http://www.readynas.com/packages 4.2.22/
deb http://archive.debian.org/debian etch main
Should be fine because the system will ask you whether or not to accept the recommended changes. Say <N> if you think the selected packages will cause conflicts. If so, go with 'update' instead of 'upgrade'. On my system, I think I had better success using 'upgrade' in that particular sequence. I agree, it's best not to make a habit of using 'upgrade'. - sander11AspirantI'm performing a factory reset on my Pro Pioneer to add dual redundancy and install virtualbox. Can someone give me a confirmation on what the latest version is that work with VB?
TIA - sander11AspirantAfter looking around at the problems with 4.2.22 I decided to go with 4.2.21. I was able to complete the configuration with Virtualbox 4.2, which appears to be working, but I haven't tested it yet with an actual vm.
Unfortunately the phpadmin isn't compatible with 4.2 (they apparently have a different definition of 'latest' than I do :roll: ) it appears to show the status, but points you to the 4.2 beta when you start.
MattyShack you are amazing! - I'm having trouble getting any joy with this, so I've pulled together some of the messages that I get when attempting an install of VBox and the EXT packs. I get the same failiures whether I'm on the latest 4.2.22 firmware, or downgraded to 4.2.21.
Basically, to my untrained eyes, I'm getting mixed messages as VBox is supposedly installing fine, but then I get this error... "Error! echo
Your kernel headers for kernel 2.6.37.6.RNx86_64.2.4 cannot be found at
/lib/modules/2.6.37.6.RNx86_64.2.4/build or /lib/modules/2.6.37.6.RNx86_64.2.4/source."
Anyway, hopefully the following will shed some light for somebody. With the help of a friend we've concluded that it "could" just be that my system is borked in some way, from my constant tinkering and adding bits and bobs here and there. But I'd sooner not face a total factory reset, if at all possible.
lsmod and modprobe vboxdrv outputs are below somewhere.OBJCOPY arch/x86/boot/setup.bin
OBJCOPY arch/x86/boot/vmlinux.bin
HOSTCC arch/x86/boot/tools/build
BUILD arch/x86/boot/bzImage
Root device is (9, 0)
Setup is 13804 bytes (padded to 13824 bytes).
System is 3551 kB
CRC cbca6fd1
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 4 modules
CC drivers/scsi/scsi_wait_scan.mod.o
LD [M] drivers/scsi/scsi_wait_scan.ko
CC drivers/target/iscsi/iscsi_target_mod.mod.o
LD [M] drivers/target/iscsi/iscsi_target_mod.ko
CC drivers/target/target_core_file.mod.o
LD [M] drivers/target/target_core_file.ko
CC drivers/target/target_core_mod.mod.o
LD [M] drivers/target/target_core_mod.ko
ITS:/c/addons-config/VirtualBox/kernel/2.6.37/linux-2.6.37.6#ITS:/c/addons-config/VirtualBox/kernel/2.6.37/linux-2.6.37.6# make modules
CHK include/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
Building modules, stage 2.
MODPOST 4 modules
ITS:/c/addons-config/VirtualBox/kernel/2.6.37/linux-2.6.37.6#ITS:/c/addons-config/VirtualBox/backup# ./VirtualBox-4.2.2-81494-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation............
VirtualBox Version 4.2.2 r81494 (2012-10-18T14:46:00Z) installer
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Building the VirtualBox kernel modules
Error! echo
Your kernel headers for kernel 2.6.37.6.RNx86_64.2.4 cannot be found at
/lib/modules/2.6.37.6.RNx86_64.2.4/build or /lib/modules/2.6.37.6.RNx86_64.2.4/source.
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.ITS:/c/addons-config/VirtualBox/backup# modprobe vboxdrv
FATAL: Error inserting vboxdrv (/lib/modules/2.6.37.6.RNx86_64.2.4/misc/vboxdrv.ko): Invalid argument
ITS:/c/addons-config/VirtualBox/backup# lsmod
Module Size Used by
iscsi_target_mod 244720 0
target_core_mod 264451 1 iscsi_target_mod
pvgpio 11438 0
nv6vpd 9334 0
ITS:/c/addons-config/VirtualBox/backup#ITS:/c/addons-config/VirtualBox/backup# /usr/bin/VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.2-81494.vbox-extpack
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.37.6.RNx86_64.2.4) 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.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".
ITS:/c/addons-config/VirtualBox/backup#ITS:/usr/src/vboxhost-4.2.2# uname -r
2.6.37.6.RNx86_64.2.4
ITS:/usr/src/vboxhost-4.2.2# cp *.ko /lib/modules/2.6.37.6.RNx86_64.2.4/ITS:/usr/src/vboxhost-4.2.2# sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Removing old VirtualBox pci kernel module ...done.
Removing old VirtualBox netadp kernel module ...done.
Removing old VirtualBox netflt kernel module ...done.
Removing old VirtualBox kernel module ...done.
Trying to register the VirtualBox kernel modules using DKMSError! echo
Your kernel headers for kernel 2.6.37.6.RNx86_64.2.4 cannot be found at
/lib/modules/2.6.37.6.RNx86_64.2.4/build or /lib/modules/2.6.37.6.RNx86_64.2.4/source.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...done.
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
ITS:/usr/src/vboxhost-4.2.2#ITS:/usr/src/vboxhost-4.2.2# /etc/init.d/vboxdrv stop
Stopping VirtualBox kernel modules ...done.
ITS:/usr/src/vboxhost-4.2.2# /etc/init.d/vboxdrv restart
Stopping VirtualBox kernel modules ...done.
Starting VirtualBox kernel modules ...failed!
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
ITS:/usr/src/vboxhost-4.2.2#
Thank you to any of you who took the time to read this post! - sander11AspirantMy eyes are equally untrained. I had problems in some parts of the script where it looks like mattyshack has an alias (or something else) where sometimes the path doesn't include "/c/" before addon-config so I'd look for that.
Are you sure you did the part where it says:
# Copy VBox Modules into the directory matching your kernel release from uname -r
# If you have RAIDiator 4.2.21 installed, it should match 2.6.37.6.RNx86_64.2.4
Code: Select all
uname -r
cp *.ko /lib/modules/2.6.37.6.RNx86_64.2.4/
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!