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
- chirpaLuminaryFirst option won't work on 4.2.7, it is using pre-compiled binaries I made on 4.2.4 kernel.
The second way will work, if you adjust VB 2.2 for 3.0.8.
If you get the compiling environment setup and the kernel tree ready, you can install it even easier now on 4.2.7. I will try and get full details in the next few days for installing from a clean system. I've already messed with my personal box too much to make it a reliable installation base. Basically, just download and install http://download.virtualbox.org/virtualb ... _amd64.run. Upon installation, it will compile the needed modules, if you have the kernel tree ready to go (apt-get install build-essential, and drop the GPL/linux-kernel-2.6 files in /usr/src/linux) - BigbearfAspirant@beisser Thank you for your reply. I look forward getting your instructions and getting this to work.
BigBearf - BigbearfAspirant@chirpa
The second way will work, if you adjust VB 2.2 for 3.0.8.
If you get the compiling environment setup and the kernel tree ready, you can install it even easier now on 4.2.7. I will try and get full details in the next few days for installing from a clean system. I've already messed with my personal box too much to make it a reliable installation base. Basically, just download and install http://download.virtualbox.org/virtualb ... _amd64.run. Upon installation, it will compile the needed modules, if you have the kernel tree ready to go (apt-get install build-essential, and drop the GPL/linux-kernel-2.6 files in /usr/src/linux)
Thank you for your help. I have tried the installation and have a large GPL directory. I will have to probably delete the GPL directory and then follow your advice. Do you think I am going to have to do a firmware reinstall to clean up my machine? Thanks to all who have tried to help.
BigBearf - chirpaLuminaryWhat I usually do is unzip the GPL to /c/backup or something, then symlink (ln -s /c/backup/Projects/GPL/linux-kernel-2.6 /usr/src/linux), so that compiling should work out of the box.
- BigbearfAspirant@chirpa
Deleted the GPL folder and unzipped to /c/backup/GPL and then did "make && make prepare" command and this is the error code I got.nas-EA-33-DF:/backup/GPL/linux-x86-2.6# make && make prepare
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
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 -s arch/x86/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel .config file)
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
nas-EA-33-DF:/backup/GPL/linux-x86-2.6#
When and how should I run this download? I can download the file and then do I then "Put" the .run file in the which directory and sh it to run and compile the needed modules?Basically, just download and install http://download.virtualbox.org/virtualb ... _amd64.run. Upon installation, it will compile the needed modules, if you have the kernel tree ready to go (apt-get install build-essential, and drop the GPL/linux-kernel-2.6 files in /usr/src/linux)
I think I am getting there and thanks for your help. I am determined to get this going just keep the suggestions coming.
Thanks,
BigBearf - chirpaLuminaryTry 'make oldconfig' first.
If 'make prepare' works, you can 'chmod +x' the .run file, then './blah.run'. - BigbearfAspirant@chirpa
Try 'make oldconfig' first.
If 'make prepare' works, you can 'chmod +x' the .run file, then './blah.run'.
Thanks for the reply. I will try it tonight doing the following:
1. #make oldconfig
2. #make prepare
3. 'chmod +x' the .run file. I downloaded it to the MBP desktop and then using Fetch "Put" in in the Backup directory. Is that the proper place or should it be in the / directory along with the download .zip file that I unzipped into the /c/backup/GPL directory. Where to put file or does it matter?
4. Then './xxx.run' the file that I "Put" with Fetch and made executable with 'chmod +x' command.
Please let me know where to place the .run file and I will post results tonight or tomorrow.
Thanks.
BigBearf - BigbearfAspirantHere is my most recent attempt and results doing the previously mentioned steps.
nas-EA-33-DF:/backup# ./VirtualBox-3.0.8-53138-Linux_amd64.run.sh
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.........
VirtualBox Version 3.0.8 r53138 (2009-10-02T09:38:05Z) installer
Installing VirtualBox to /opt/VirtualBox
ln: creating symbolic link `/usr/share/applications/virtualbox.desktop' to `/opt/VirtualBox/virtualbox.desktop': No such file or directory
Python found: python, installing bindings...
/bin/bash: python: command not found
Building the VirtualBox vboxdrv kernel module
Failed to build the vboxdrv kernel module.
Please check the log file /var/log/vbox-install.log for more information.
VirtualBox has been installed successfully, but the kernel module could not
be built. When you have fixed the problems preventing this, execute
/etc/init.d/vboxdrv setup
as administrator to build it.
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.
nas-EA-33-DF:/backup#
Any further suggestions?
BigBearf - BigbearfAspirant@chirpa
Here are VB install log per the "Please check the log file /var/log/vbox-install.log for more information."VirtualBox 3.0.8 r53138 installer, built 2009-10-02T09:38:05Z.
Testing system setup...
System setup appears correct.
Installing VirtualBox to /opt/VirtualBox
Output from the module build process (the Linux kernel build system) follows:
Makefile:150: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
Makefile:158: *** Error: /usr/src/linux (version 2.6.27.6.RNx86.2.1) does not match the current kernel (version 2.6.30.9.RNx86_64.2.1). Stop.
End of the output from the Linux kernel build system.
Installation successful
I feel like we are close. Let me know your thoughts or suggestions. Thanks
BigBearf - BigbearfAspirant@chirpa
One final piece of the puzzlenas-EA-33-DF:/opt/VirtualBox# sh VBox.sh
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.30.9.RNx86_64.2.1) 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.
basename: missing operand
Try `basename --help' for more information.
Unknown application -
nas-EA-33-DF:/opt/VirtualBox# sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module ...done.
Recompiling VirtualBox kernel module ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
nas-EA-33-DF:/opt/VirtualBox#
Thanks for your help. Time to crash, will check forum in AM.
BigBearf
Related Content
NETGEAR Academy

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