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 JeIlMa » Mon Jun 11, 2012 11:27 pm

Hi

I really need help with reinstall virtualbox to ReadyNas Pro. I manage to get it work in 4.2.17 but now I have trying to remove it and make it work in 4.2.20. So I probably mess up my current installation.

First problem is error below (from apt-get update). I assume that it is something that I don't have to care (annoying but harmless). I'd like to fix it however...

W: GPG error: http://www.readynas.com 4.2.20/ Release: The following signatures were invalid: BADSIG B7F02108D553259A RAIDiator Release Key <admin@readynas.com>
W: You may want to run apt-get update to correct these problems

When I try to go thru section 2 I will get this error...
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'

It comes in both make and make modules.

If I just ignore these and try "./VirtualBox-4.1.14-77440-Linux_amd64.run"

netgear:/c/Virtualbox# ./VirtualBox-4.1.14-77440-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation...........
VirtualBox Version 4.1.14 r77440 (2012-04-12T16:28:20Z) installer
Please install the build and header files for your current Linux kernel.
The current kernel version is 2.6.37.6.RNx86_64.2.2
Problems were found which would prevent VirtualBox from installing.
Please correct these problems and try again.

It is ok to remove all virtualbox settings (I don't have any old virtualbox running) but I need to sure need some instruction to do it.

-JeIlMa
JeIlMa
ReadyNAS Newbie
 
Posts: 24
Joined: Thu Sep 10, 2009 12:25 am
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby cmassey » Tue Jun 12, 2012 9:14 pm

I upgraded again to 4.2.20 and still couldn't get it to work even after following the notes from itachi1, I guess I must have missed a step or did something wrong.
I think I did something wrong here:
itachi1 wrote:
Code: Select all
tar -xjf linux-2.6.37.6.tar.bz2
tar -xzf kernel-build-tools-x86-4.2.20-T43.tar.gz
mv linux-2.6.37.6/ kernel-build-tools-x86/2.6.37/
cd kernel-build-tools-x86/2.6.37/linux-2.6.37.6/
../netgearize_kernel.sh
make oldconfig
make all


Once "make all" was done for the altered source in my temp directory, I moved the official source out of the way and moved my new fresh source to my now-empty "2.6.37" directory so the system could find it - plus I didn't want to break my symlinks.

Anyway, after that, I was able to run the VirtualBox installer 4.1.14 for amd64, then I started vboxdrv service to confirm:

Code: Select all
/etc/init.d/vboxdrv start
Starting VirtualBox kernel modules ...done.


Anyway, moved back to 4.2.19 and re-installed virtualbox and it's working fine again, will try again this weekend.
cmassey
ReadyNAS Newbie
 
Posts: 12
Joined: Mon Oct 04, 2010 2:29 am

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby AMRivlin » Tue Jun 19, 2012 1:51 pm

Did you ever get it working on 4.2.20 or .21?
AMRivlin
Advanced ReadyNAS User
 
Posts: 157
Joined: Wed Jan 18, 2012 4:24 pm
Location: Vancouver, BC
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby cmassey » Sun Jun 24, 2012 1:49 pm

I never got it working, but i tried again with the 4.2.21 and got futher than I did with 4.2.20.
Give it some more time and I suspect I will get 4.2.21 working it just finding the right tweaks and settings to get it right.
The biggest difference between the 2 is this command didn't work (unzip -q RNDP6xxx_4.2.20_WW_src.zip "linux-2.6.37.6/*")
It appears to now be stored into a sub folder of the kernel directory, also arch/x86/configs/defconfig.smp didn't exist (or should I say I didn't find it so I used the one from 4.2.20)

Anyway I will keep playing with it or hope that someone with more skills than me is kind enough to type up a how to guide :)
cmassey
ReadyNAS Newbie
 
Posts: 12
Joined: Mon Oct 04, 2010 2:29 am

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby AMRivlin » Mon Jun 25, 2012 10:58 am

cmassey wrote:
Anyway I will keep playing with it or hope that someone with more skills than me is kind enough to type up a how to guide :)


+1
AMRivlin
Advanced ReadyNAS User
 
Posts: 157
Joined: Wed Jan 18, 2012 4:24 pm
Location: Vancouver, BC
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby krylon » Mon Jul 02, 2012 5:50 pm

AMRivlin wrote:
cmassey wrote:
Anyway I will keep playing with it or hope that someone with more skills than me is kind enough to type up a how to guide :)


+1

+2!
krylon
ReadyNAS Newbie
 
Posts: 32
Joined: Fri Jan 16, 2009 10:48 am

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby itachi1 » Thu Jul 05, 2012 10:53 pm

Okay, so I got VirtualBox amd64 4.1.18 working on 4.2.21.

Sorry this isn't really a step-by-step, but kind of a "what I did" using a very abbreviated version of j6harri's post (page 23, bottom) at
http://www.readynas.com/forum/viewtopic.php?f=35&t=26468&start=330#p352009

Got the source, put it in a directory and unzipped the whole thing, but you could probably just do

Code: Select all
unzip -q RNDP6xxx_4.2.21_WW_src.zip "kernel/*"


As far as I can tell, it's a vanilla kernel with the "netgearize" tool to make it device specific. I followed the README in the kernel directory:
Steps 1-3 immediately below are already done!

1) Grab your preferred kernel source tarball from kernel.org.
(eg. "# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.4.tar.bz
2) Change to the directory that matches your selected kernel.
(eg. "# cd 2.6.32")
3) Extract it into this directory. That should leave you with a linux-2.6.xx directory.
4) Change into the new linux-2.6.xx directory.
(eg. "# cd linux-2.6.32.4")
5) Run the netgearize script.
(eg. "# ../netgearize_kernel.sh")

BUILD INSTRUCTIONS

x86_64 SMP
1) Copy the SMP defconfig file to .config.
# cp arch/x86/configs/defconfig.smp .config
2) Run 'make oldconfig'.
# make ARCH=x86_64 oldconfig
3) Build the kernel.
# make ARCH=x86_64

So under kernel/2.6.37/linux-2.6.37.6, run
Code: Select all
../netgearize_kernel.sh

It takes about 15 seconds with 2 "Hit Enter" prompts. It appears to copy the "defconfig.smp" from the directory above to .config .
Then I ran the Build Instructions above, steps 2 & 3 only because 1 was just done.

Make sure the symlink from /usr/src/linux points to whatever directory you decide to place your fresh kernel source.
ln -snf [your kernel source directory] /usr/src/linux

./VirtualBox-4.1.18-78361-Linux_amd64.run

Everything appeared to compile okay, but I couldn't load some of the VirtualBox modules like vboxnetflt.ko until I ran "depmod" and then was able to do "/etc/init.d/vboxdrv start"

Possibly "depmod -a" might do better even though I don't think ReadyNAS includes a modules.conf file.

A reboot confirmed that the vboxdrv and the four compiled modules (list using lsmod) were being loaded at boot. Then I could install the VBox Extensions.

Like I said in a previous post, under 4.2.20 I installed various packages from the debian archive to get some of my stuff working, like aptitude and mc, so I'm not sure how my build environment compares with other users'.

Off topic, I highly recommend mc for a quick and dirty Norton Commander. It makes it pretty painless to move stuff around and quick-view things. Read the F1 help for key commands, but "ctrl-t" selects.

I hope you all can get it working. I'm absolutely no expert, but was able to get the modules to compile and load. I may be able to help with errors -- I went through so many it may be tough to remember what I did for any particular one!
itachi1
ReadyNAS Newbie
 
Posts: 3
Joined: Sat May 19, 2012 5:34 pm

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby MattyShack » Fri Jul 06, 2012 10:22 pm

Original Post: VBox Guide v1.0
Updated version posted below.

Thanks
###################################################################
Last edited by MattyShack on Sun Mar 10, 2013 4:24 pm, edited 12 times in total.
MattyShack
ReadyNAS Newbie
 
Posts: 21
Joined: Mon Jul 02, 2012 11:05 pm
ReadyNAS: Ultra

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby cmassey » Sat Jul 07, 2012 3:38 pm

Thanks guys!

Works like a charm :D
cmassey
ReadyNAS Newbie
 
Posts: 12
Joined: Mon Oct 04, 2010 2:29 am

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby j6harri » Wed Aug 08, 2012 1:19 pm

@MattyShack I am running into the following issue. When I try to install aptitude and synaptic, I get the error you described from apt-get being at a higher level. But when I try to downgrade apt-get, it wants to remove dpkg, ssh. I tried this once and it is a bad thing. Had to re-install the OS since ssh was gone. Do you have any advice?

NASHOG:~# apt-get install aptitude synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
aptitude: Depends: libapt-pkg-libc6.3-6-3.11
synaptic: Depends: libapt-inst-libc6.3-6-1.1
Depends: libapt-pkg-libc6.3-6-3.11
E: Broken packages
NASHOG:~#


NASHOG:~# apt-get install apt=0.6.46*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version 0.6.46.4-0.1+etch1 (Debian:4.0r9/oldstable) for apt
Suggested packages:
aptitude synaptic gnome-apt wajig dpkg-dev apt-doc
The following packages will be REMOVED:
dpkg openssh-client openssh-server ssh
The following packages will be DOWNGRADED:
apt
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
dpkg
0 upgraded, 0 newly installed, 1 downgraded, 4 to remove and 26 not upgraded.
Need to get 0B/1438kB of archives.
After this operation, 10.4MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] no
Abort.
j6harri
ReadyNAS Newbie
 
Posts: 17
Joined: Sat Apr 24, 2010 12:01 am
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby MattyShack » Wed Aug 08, 2012 1:52 pm

See if this helps to clear and reset installed deb packages, then downgrade apt.

Matt

#######################################################################################

### Update Sources.list ###
mv /etc/apt/sources.list /etc/apt/sources.list.bak
rm -rf /etc/apt/sources.list
##########################################
sudo sh -c "cat >> /etc/apt/sources.list" <<EOF
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

#deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free
#deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
EOF
##########################################
gpg --keyserver pgpkeys.mit.edu --recv-key E9C74FEEA2098A6E && gpg -a --export E9C74FEEA2098A6E | sudo apt-key add -
gpg --keyserver pgpkeys.mit.edu --recv-key 54422A4B98AB5139 && gpg -a --export 54422A4B98AB5139 | sudo apt-key add -
gpg --keyserver pgpkeys.mit.edu --recv-key AED4B06F473041FA && gpg -a --export AED4B06F473041FA | sudo apt-key add -

# Setup Root Directory Storage Area
mkdir /root/src
mkdir /root/system
cp /etc/apt/sources.list* /root/system

### Refresh Packages from the APT repository ~ may help remove BADSIG messages ###
# Clear the APT Repositories
sudo killall apt apt-get aptitude
sudo -s -H
apt-get clean
rm -rf /var/lib/apt/lists/*
chmod 755 /var/lib/apt/lists
mkdir /var/lib/apt/lists/partial
chmod 755 /var/lib/apt/lists/partial
rm -rf /var/cache/apt/archives
mkdir -p /var/cache/apt/archives/partial
apt-get clean

# Replace File Locks
rm -rf /var/lib/dpkg/lock
sudo touch /var/lib/dpkg/lock
sudo chmod 640 /var/lib/dpkg/lock
rm -rf /var/lock/aptitude
sudo touch /var/lock/aptitude
sudo chmod 640 /var/lock/aptitude
rm -rf /var/lib/apt/lists/lock
sudo touch /var/lib/apt/lists/lock
sudo chmod 640 /var/lib/apt/lists/lock
rm -rf /var/cache/apt/archives/lock
sudo touch /var/cache/apt/archives/lock
sudo chmod 640 /var/cache/apt/archives/lock

# Fresh download of Repository Packages
apt-get update && apt-get upgrade

# Say 'Y'es to any recommended Fixes. It is OK if either apt-get or dpkg will be upgraded/downgraded
# But, make sure neither apt-get nor dpkg will be removed. If so the aBORT changes.
apt-get -f install
apt-get update

# packages needed after a clean install
apt-get install nano curl


## Note: You may need to downgrade apt-get to apt_0.6.46.4-0.1+etch1_i386.deb for the correct versions of deb files.
# Raidiator 4.2.21 upgrades apt-get to apt_0.7.20.2+lenny2_i386.deb. This may cause conflicts.

# Display apt-get Version
apt-get -v

# Force apt-get and dpkg Downgrade
apt-get --reinstall install apt=0.6.46.4-0.1+etch1 dpkg=1.13.26 dpkg-dev=1.13.26

# I use aptitude most of the time. It does a better job at resolving conflicts.
apt-get install aptitude

# Setup the Build Environment
apt-get install build-essential gcc
aptitude install libmagic-dev libpcre3-dev
aptitude install unzip par2 parchive bzip2 gpp libssl-dev zlibc zlib1g-dev p7zip p7zip-full
#######################################################################################
MattyShack
ReadyNAS Newbie
 
Posts: 21
Joined: Mon Jul 02, 2012 11:05 pm
ReadyNAS: Ultra

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby j6harri » Thu Aug 09, 2012 10:05 am

@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#
j6harri
ReadyNAS Newbie
 
Posts: 17
Joined: Sat Apr 24, 2010 12:01 am
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby MattyShack » Thu Aug 09, 2012 2:21 pm

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.
MattyShack
ReadyNAS Newbie
 
Posts: 21
Joined: Mon Jul 02, 2012 11:05 pm
ReadyNAS: Ultra

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby j6harri » Fri Aug 10, 2012 8:46 am

I 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.
j6harri
ReadyNAS Newbie
 
Posts: 17
Joined: Sat Apr 24, 2010 12:01 am
ReadyNAS: Pro

Re: Running VirtualBox VM host on ReadyNAS Pro

Postby TeknoJnky » Fri Sep 14, 2012 10:59 am

looks like virtualbox 4.2 final is out

http://www.oracle.com/us/corporate/press/1842885
nv+ ~ 1gb ram ~ 4x WDC WD20EARS-00S8B1 ~ 5555 GB
ultra4 ~ 4 gb ram ~ 2x ST31500341AS ~ 2x ST4000DX000-1C5160 ~ 6471 GB
pro business ~ 4gb ram ~ dual redundancy ~ 4x Hitachi HDS724040ALE640 ~ 2x SAMSUNG HD204UI ~ 9130 GB
A/V streaming ---> Subsonic ---> EVO 3D
User avatar
TeknoJnky
ReadyNAS Addict
 
Posts: 2909
Joined: Mon Oct 13, 2008 1:34 pm
Location: MO
ReadyNAS: Pro

PreviousNext

Return to ReadyNAS Developers Network



Who is online

Users browsing this forum: No registered users and 1 guest