Microsoft virtual machine and unRAID possibilities


Recommended Posts

I just bought 3 of the 4TB Seagate external drives form Costco. My intent is to remove the drives from the external cabinets and use them as a hardware RAID array or an unRAID  array. Right now I would like to run a burn-in with preclear. After this, the ability to run unRAID in a virtual machine would be very useful. I have a lot of excess cpu time.

 

I am running Win 7 and anticipate Win 8 as soon as I get things stable. I am a lifetime non-*nix user. The associated words are to me much like troubled spirits gibbering from the battlements. Please be gentle.

 

I do not have a spare PC at the moment. What I would like to do is run at least preclear in a virtual machine using the MS VM to wring out the new drives before committing to real data. I really can't simply boot the PC with unRAID and let it run for a number of days.

 

The question - can I (and what do I need to do) run preclear from a MS virtual machine? After this part is over, can I run unRAID the same way. Preclear is the most important issue at this time.

Link to comment

Are you talking about Windows Virtual PC by MS?

If that's the case, no you can't run preclear through that. and also no you can't run unRAID that way.

Even if you were to use Virtual Box, you can run unRAID, but you should not run unRAID this way. This is only for testing purpose.

 

preclear needs direct access to the hdd. There is no way to do this in any virtualization in windows.

 

 

for unraid, you need to have its own machine unless you're doing virtualization through esxi. no other option.

Link to comment

preclear needs direct access to the hdd. There is no way to do this in any virtualization in windows.

 

Isn't there? Wasn't there a virus that stole your windows MBR and made you play a casino game to get it to write it back?

wha? lol

 

i meant direct access as in direct access through virtualization.

 

for example, preclear needs to be run under unRAID. now, only way to run unRAID under windows is through Virtual Box at this point. There is no direct hw passthru for VirtualBox, so you have to create a virtualdisk to be accessed by VM's. This is not the same as adding the actual hdd to the VM...

Link to comment

You can RDM in VirtualBox so you CAN preclear a USB HDD from an unRAID VM installed in VirtualBox on a Windows OS.  I'm doing it currently.

 

The command I used to create the RDM drive VMDK file in windows was this:

VBoxManage internalcommands createrawvmdk -filename v:\RDMUSB.vmdk -rawdisk \\.\PhysicalDrive10

 

The VMDK is stored on my V drive in the root directory.  The USB drive is the 11th drive listed in DiskManager in windows which starts at Disk0 - hence I used PhysicalDrive10 above.

 

I then connected the VMDK file in VirtualBox to the IDE controller on the unRAID virtual machine and issued the preclear command:

preclear_disk.sh /dev/hdb

Since I have the boot VMDK setup as hda.

 

Hope that is what you wanted.

 

Edit:  I'm getting 69MB/s on USB2.0 connection on PreRead step so it is significantly slower via USB2.0 but it works.

Link to comment

Bob, could you possibly explain a bit more about the whole process. Remember that to me *nix terms are like troubled spirits gibbering from the battlements. I have only done the most simplistic uses the MS virtual machine in Win7. I have a copy of XP running there.

 

It sounds like this would be what I am after. Eventually I want to build a home theater PC. If I were to get good HTPC software for *nix I could use the same machine a a media server with unRAID. That would be quite handy. It would also stimulate a bit of learning of the OS. I have used a bit a long time ago. But that was with step by step documentation.

 

Along those lines, is there a recommended flavor of Linix for HTPC and unRAID?

Link to comment

[*]First off you need VirtualBox I don't know if this is possible from Microsoft Virtual products.

[*]They have documentation on how to install VirtualBox on the site link above as well as the downloads.  You will need the Extension Pack installed to enable USB2.0 mode.

[*]Also read up on how to setup VMs.

[*]You will need to setup a HDD that unRAID can boot from because I don't believe booting from USB is possible in VirtualBox.

[*]I setup a 2GB HDD in VirtualBox and then connected it to a Windows VM and formatted it to FAT32 with a label of UNRAID (since I'm only going to use the free version of unRAID).

[*]Then extract the files from the unRAID zip file to the HDD you setup

[*]I then edited the file to add 'f' to the syslinux line in "make_bootable.bat" like this:%~d0\syslinux -maf %~d0

[*]Then I ran it as "Administrator"

[*]Disconnect drive from Windows VM and connect to unRAID VM

[*]Open Disk Management and find your USB drive.  Mine was the 11th disk (Disk 10) in Disk Management

[*]Then use the command I posted above but edit it to put your VMDK file on the drive you want it to reside on.  If you don't want to browse for it in VirtualBox you should put in in the VirtualBox directory under the user you setup VirtualBox with.  Also add the USB disk from Disk Manager.  Disk 10 in Disk Management becomes "\\.\PhysicalDisk10" on the command. To issue the command you will probably have to be IN the VirtualBox command directory - Like I did.

[*]Now just connect the drive up to a controller in VirtualBox.  I used IDE because I knew that would work with unRAID.  The SATA or SAS controllers might as well but I've never tried it that way.

[*]Now start the unRAID VM and watch it boot

[*]If you haven't copied the preclear script to the unRAID HDD when you setup booting above do it now.  unRAID defaults to tower so just extract the preclear script to "\\tower\flash"

[*]Now run preclear after logging into the unRAID console displayed in VirtualBox window.

 

Hope that explains it well enough for you.  I would read up about VirtualBox in the manual before attempting this.

Link to comment

It sounds like this would be what I am after. Eventually I want to build a home theater PC. If I were to get good HTPC software for *nix I could use the same machine a a media server with unRAID. That would be quite handy. It would also stimulate a bit of learning of the OS. I have used a bit a long time ago. But that was with step by step documentation.

 

Along those lines, is there a recommended flavor of Linix for HTPC and unRAID?

 

 

Unraid is based of the Slackware distro so you'd have to follow the instructions to setup a full Slack install with unraid running in it. I would not recommend this. If your hardware supports VT-d I'd much more recommend you go with an ESXi setup and run the HTPC and unraid in separate VMs. This way you can passthrough any controller cards to unraid and pass through your video card to your HTPC VM and an issue in one won't cause problems in the other. There is easy, step by step instructions on how to setup ESXi in the Atlas thread in the U.C.D. section of the forums.

 

In terms of distros to use for for an HTPC, I like Ubuntu. It's very easy to install. Easier and faster to install than Windows if you ask me.

 

Link to comment
  • 4 weeks later...

I arrived at a preclear-on-Windows solution in a similar but slightly modified way:

 

I downloaded an UnRAID VM from this thread:

http://lime-technology.com/forum/index.php?PHPSESSID=38d4236c2b985151e3416c4f654b00a9&topic=6260.15

 

I put a new 500GB WD Scorpio Black in my Windows machine's hot swap bay (http://www.icydock.com/goods.php?id=141)

 

Win7's Disk Management snap-in told me it was Disk3

 

Running VirtualBox Manager as administrator was the next step.

 

Then a Command Prompt, again as Administrator.

 

cd c:\Program Files (x86)\Oracle\VirtualBox

VBoxManage internalcommands createrawvmdk -filename "h:\VBoxes\newrawhd.vmdk" -rawdisk "\\.\PhysicalDrive3"

 

Then in VBox Manager GUI, add a machine by pointing to the previously-downloaded UnRAID.vmdk

 

Choose the VM, go to Settings -> Storage and attach the newrawhd.vmdk file to the hard drive controller.

 

Boot up the UnRAID VM.

 

Find its IP address with

ifconfig eth0

 

Use that to copy the latest preclear.sh file to the \\192.168.56.102\flash (which is my UnRAID VM's USB drive root folder)

 

Then a

preclear.sh -c 5 /dev/hdb

 

was all it took to get me 'Windows' machine to perform a preclear on a new disk without me having to mess around with my slightly-more-difficult-to-add-drives-to proper UnRAID boxes.

 

I can't say the 47MB/s rate pleases me as much as a 100+ MB/s rate would normally, but it was easy enough that I'd do it again in a heartbeat versus wrestling with my over-stuffed UnRAID boxes unless I had to.

 

I didn't try USB or FireWire drive connectivity because I know they'd both be slower than a proper SATA connection.

 

You'll also note I changed preclear_disk.sh to preclear.sh (by renaming the file).  I'm not the world's best typist, and I need no better reason to truncate text from script names.

Link to comment

I arrived at a preclear-on-Windows solution in a similar but slightly modified way:

 

I downloaded an UnRAID VM from this thread:

http://lime-technology.com/forum/index.php?PHPSESSID=38d4236c2b985151e3416c4f654b00a9&topic=6260.15

 

I put a new 500GB WD Scorpio Black in my Windows machine's hot swap bay (http://www.icydock.com/goods.php?id=141)

 

Win7's Disk Management snap-in told me it was Disk3

 

Running VirtualBox Manager as administrator was the next step.

 

Then a Command Prompt, again as Administrator.

 

cd c:\Program Files (x86)\Oracle\VirtualBox

VBoxManage internalcommands createrawvmdk -filename "h:\VBoxes\newrawhd.vmdk" -rawdisk "\\.\PhysicalDrive3"

 

Then in VBox Manager GUI, add a machine by pointing to the previously-downloaded UnRAID.vmdk

 

Choose the VM, go to Settings -> Storage and attach the newrawhd.vmdk file to the hard drive controller.

 

Boot up the UnRAID VM.

 

Find its IP address with

ifconfig eth0

 

Use that to copy the latest preclear.sh file to the \\192.168.56.102\flash (which is my UnRAID VM's USB drive root folder)

 

Then a

preclear.sh -c 5 /dev/hdb

 

was all it took to get me 'Windows' machine to perform a preclear on a new disk without me having to mess around with my slightly-more-difficult-to-add-drives-to proper UnRAID boxes.

 

I can't say the 47MB/s rate pleases me as much as a 100+ MB/s rate would normally, but it was easy enough that I'd do it again in a heartbeat versus wrestling with my over-stuffed UnRAID boxes unless I had to.

 

I didn't try USB or FireWire drive connectivity because I know they'd both be slower than a proper SATA connection.

Interesting approach.  The speed would kill it for me... but I build a lot more of these server than most.  I have a test machine I use that has 6 hot swap bays in it that are only used for preclear.  The machine runs off a couple PCI-e SATA cards for the 4+cache drive that I use for testing packages and plugins.

 

You'll also note I changed preclear_disk.sh to preclear.sh (by renaming the file).  I'm not the world's best typist, and I need no better reason to truncate text from script names.

Um... you do realize that you can type "prec" then hit the tab key right.  The command line will auto complete for you.

Link to comment

 

Um... you do realize that you can type "prec" then hit the tab key right.  The command line will auto complete for you.

 

Ha!  I had no idea, actually.  Did not suspect that auto-complete was part of the package.  Thanks for pointing that out  8)

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.