Running UNRAID in a Virtual Machine under Virtualbox (Windows Host)


Recommended Posts

Running the registered version of UNRAID in a Virtualbox VM, the idiot-proof route (I am that idiot).

 

This is how I got UNRAID registered version running happily under Virtualbox on my Windows machine. Main reason for doing this was to rationalise the number of boxes in the lounge. Performance is adequate, when I'm using Windows UNRAID is idling and when UNRAID is working serving my media then Windows is not doing much.

 

Being technically competent, but a bit old and slow when it comes to learning new stuff I did a lot of Googling. Of course there are loads of ways of getting this thing going, many are decidedly complex in nature. This is my distillation of that data.

 

As I said, this is the non-technical, no mucking around with Linux distro's route. It works for me, YMMV.

 

[*]Take one USB memory stick (it does not necessarily need to be the one linked to your registration), make it bootable and install UNRAID on it in the usual manner, however do NOT name it UNRAID, I called mine UN-HDD.

[*]Make a VHD image of it using WinImage http://www.winimage.com/ , the free unregistered version does the job just fine. Put the image in your .Virtualbox folder.

[*]Make yourself a VM in Virtualbox and set it up to use the VHD you just created as the startup disk. I gave my VM 4 Gigs and 4 processor cores.

[*]Create some virtual drives to play with as your parity and data store.

[*]Plug your registered USB drive into a USB port, this one must be named UNRAID.

[*]In your VM create a USB filter for this device, no need to fiddle with settings the defaults work.

[*]For testing I set the VM networking to be Host-only.

[*]Boot your VM, it should start from the VHD drive but pull your registration data from the USB. You can actually delete everything except the Config folder from the USB if you wish.

[*]Configure and format your storage.

[*]The Device Info. screen for your flash should show the GUID and registration info.

Enjoy.

 

In order to update your UNRAID version, no need to make a new VHD image. You can mount the VHD using the scripts here http://www.howtogeek.com/51174/mount-and-unmount-a-vhd-file-in-windows-explorer-via-a-right-click/  copy the new files to the drive, and then unmount it (you need to stop the VM before doing anything), whilst you're at it delete the Config folder from the image (just to avoid confusion) all the configuration resides on the USB.

 

If you want to use real drives rather than virtual (for a real world application) I used the commands here http://www.pendrivelinux.com/boot-a-usb-flash-drive-in-virtualbox/ to discover the device number and to create a .VMDK for each of my storage drives (don't forget to give them different file names) and then attached them to the VM in the usual way.

 

 

 

Link to comment
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi

 

I would be interested in the read/write speeds you're seeing to your unRaid storage drives.

 

Also, can you get the drives to spin down?

 

When I tried this 12 months ago, I found disk i/o in VirtualBox to be a real bottleneck making the setup unusable.

 

Peter

Link to comment

 

I'm not in front of the box right now, but when I get home from this business trip I'll check actual speeds. It's more than adequately fast to send 2 x HD streams to my HTPC and bedroom TV (Samsung smart TV).

 

Getting drives to spin down seems to be an issue when using VMs so will definitely report.

Link to comment
  • 1 month later...

I am having trouble getting unRAID working in a VirtualBox. It boots up the VHD, is going through the long list of linux commands, but then hangs up on "waiting for USB subsystem," which it keeps repeating over and over again.

 

Do you know what I might be doing wrong?

I have the USB controller enabled and added my USB key to the list of Device Filters. the USB 2.0 EHCI Controller checkbox is disabled by default and I did not change this.

 

 

 

Link to comment

Never mind, I figured out how to get it to boot off the USB drive now.

 

I've attached some physical drives using the vmdk method in the original post. However, my disk i/o speeds are horrendous, on the order of 5 MB/sec. I have attached these vmdks using a SATA controller in Storage. Has anyone had any luck in getting faster disk io speeds using Virtual Box and a virtualized unRAID server?

Link to comment
  • 1 month later...
  • 6 months later...
  • 8 months later...

Works great.  I have done it (RDM) in both Windows host and unRAID host.  You have to use the command line tools to do the RDM of drives in VirtualBox.  Also that is the ONLY way to get the raw drive to the VM on a Windows HOST since pass through of PCIe devices only works on Linux host.  It doesn't work and isn't available on a Windows host.

 

I'm at work so I don't have the syntax handy but I will search my previous posts as I know I put it on the forums here for both types of hosts.

 

 

Edit found the posts:

This post is where I explained how I was preclearing a USB HDD on Windows host.  Other users ideas follow using the same VBoxManage commands later in the thread.

 

On unRAID host look at the attached files in this post for example in unRAID. Specifically the file SetupHomeSrvRawDisks.sh.txt

Link to comment

BobPheonix

 

Have you previously moved an existing unRAID installation to a VM? Will the data on the drives persist? I am more comfortable with windows and oracle VM.

 

When you say about passthrough of the PCIe cards does that mean those drives attached would not show up on unRAID under a VM on windows?

 

If you have time at some point could you list some steps?

Link to comment

BobPheonix

 

Have you previously moved an existing unRAID installation to a VM? Will the data on the drives persist? I am more comfortable with windows and oracle VM.

Yes but not with VirtualBox.  I moved an existing unRAID install to an ESXi VM all data was maintained.  I have setup a NEW unRAID VM in VirtualBox that I was experimenting clearing a USB HDD.  In the end it didn't work because the drive was overheating.

 

When you say about passthrough of the PCIe cards does that mean those drives attached would not show up on unRAID under a VM on windows?
In ESXi and Linux based VirtualBox you can pass through the controller to the VM so that everything on the controller is directly controlled by the VM.  Also this allows you to spin down the drives and get drive temperatures in unRAID.  Something that isn't possible (at least with VirtualBox anyway) when RDM'ing a drive.

 

If you have time at some point could you list some steps?

Virtualizing unRAID is very easy.  In the link in my prior post for the Windows Host two methods are explained in later posts in the thread.  Now transferring Windows to a VM is harder since when Windows installs it installs a hal.dll file that my not be the same when you virtualize it.  I have used Acronis True Image to transfer to a VM before since with the plus pack you get a universal restore feature that works some of the time.  There are also guides on the VirtualBox web pages to doing this transfer for a Windows VM.
Link to comment

Thanks for the links and information. I would prefer to have the ability to spin down the drives and get the temps but I am more comfortable with windows and virtual box. I will do a bit more research first, still concerned about losing data from the drives but am sure it will go OK

 

Sent from my Nexus 7 using Tapatalk

 

 

Link to comment

 

I think the chances of shoe horning rdm into VB on windoze is far more likely to break than in Linux where it is designed to do this. Sticking with windoze because you're comfortable with it is the pussy option!

 

Be a man, learn how to setup Linux and use the opportunity to learn!

 

Sent from my Nexus 5 using Tapatalk

 

 

Link to comment

 

I think the chances of shoe horning rdm into VB on windoze is far more likely to break than in Linux where it is designed to do this. Sticking with windoze because you're comfortable with it is the pussy option!

 

Be a man, learn how to setup Linux and use the opportunity to learn!

 

Sent from my Nexus 5 using Tapatalk

Yes it would be harder to RDM a drive in Windows since I don't know of a way to map it by ID rather than by location.  I only use Virtual HDD on VBOX on a Windows host because of that.  The only reason I have it is because I have to reset the snapshot of the Windows VM (on Windows host) every 30-60 days.  On my N54L unRAID server since I can map by ID I have no problems using RDM for drives.  A thought I just had but no way to test it out is to try the same Windows command with the GUID of the HDD from device manager instead of PhysicalDriveX.  Most likely it will just generate a syntax error from VBoxManage but if I get an opportunity I will try it and see if it is possible.  That should make the mappings in Windows as robust as Linux - if it works.
Link to comment

If it wasn't my only unRAID device and my wife and daughter relied on it then I would happily tinker with Linux, maybe with the lights on and hiding behind the sofa.

 

I am watching the 64 bit unRAID distro thread as an alternative

 

I am using 6x MB Sata ports and 2x PCIe cards so would prefer not to have to buy anymore cards and keep the drives on the MB.

 

Link to comment

 

I think the chances of shoe horning rdm into VB on windoze is far more likely to break than in Linux where it is designed to do this. Sticking with windoze because you're comfortable with it is the pussy option!

 

Be a man, learn how to setup Linux and use the opportunity to learn!

 

Sent from my Nexus 5 using Tapatalk

Yes it would be harder to RDM a drive in Windows since I don't know of a way to map it by ID rather than by location.  I only use Virtual HDD on VBOX on a Windows host because of that.  The only reason I have it is because I have to reset the snapshot of the Windows VM (on Windows host) every 30-60 days.  On my N54L unRAID server since I can map by ID I have no problems using RDM for drives.  A thought I just had but no way to test it out is to try the same Windows command with the GUID of the HDD from device manager instead of PhysicalDriveX.  Most likely it will just generate a syntax error from VBoxManage but if I get an opportunity I will try it and see if it is possible.  That should make the mappings in Windows as robust as Linux - if it works.

As I suspected it doesn't work with an ID on Windows.
Link to comment
  • 2 years later...

I know this thread is old but I think better to maintain here than starting a new thread.

 

I want to test UNRAID 6.1.9 (dockers, etc) on virtualbox (under windows) before applying to my "new" server. I'm also a new user and a little lost with so many new linux terms.

 

I have setup a new virtualbox machine like this:

 

VIRTUALBOX_01_zpsmdc1erjk.jpg

 

I cant fire it up

 

VIRTUALBOX_02_zpsyri5kqfj.jpg

 

I can ping internet (google)

 

VIRTUALBOX_04_zps6o5cnnar.jpg

 

And also I can ping HOST computer

 

VIRTUALBOX_05_zpst1zeo618.jpg

 

But I'm unable to access unraid through //tower nor 192.168.1.12

That's what I got when I ping unraid

 

VIRTUALBOX_06_zpsmvxsxjbe.jpg

 

Can someone imagine what the problem is?

Is there another way to test unraid under windows?

 

Any help will be greatly appreciated.

 

Thankyou

Gus

 

Link to comment

I cannot see anything obviously wrong!

 

I have unRAID running without issue under VirtualBox and am not experiencing the issue you seem to have encountered.    My VM settings are shown on the attached screenshot.

 

The only differences I can see are that I have defined SATA disks instead of IDE, and that I am actually using a slightly different NIC for the bridged adaptor - but I would not have thought either of those should really matter.

 

You do not mention what version of unRAID you are intending to try?    If it is the new 6.2 beta which now includes a built-in GUI option then you can bring that up by editing the syslinux.cfg file on the boot device (I assume a VMDK) and moving the Default entry to the one to load the GUI. Editing the syslinux.cfg on the USB flash drive will not have the same effect (since VirtualBox does not supporting from USB then I assume you have this plugged in separately and passed through to the VM).  This is the same GUI that you would get by connecting from outside the VM via a browser.

 

Untitled.jpg.d1080c3e31e36600d36c6530b369df8e.jpg

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.