Jump to content
RESET Forums (homeservershow.com)

virtualbox sata disk passthrough


ikon
 Share

Recommended Posts

greetings

 

I'm playing with VB on win7 as part of my project to make a multi-session SpinRite box. To do this, I really need to give SpinRite access to the raw sata drives.

 

However, the documentation is less than clear on how to set up passthrough for hard disks. Can anyone point me to good, preferably step-by-step, directions?

Link to comment
Share on other sites

:)

thanks. My new 2008r2 is just now rebooting after installing Hyper-V role. I may have to come begging for instructions on how to set up sata passthrough and virtual switches, etc.

Link to comment
Share on other sites

OK, I got a VM set up, configured a CD/DVD Vdrive to boot from the SpinRite CD, and installed SpinRite on the VHD. All went well.

 

I then

  1. shut down the computer
  2. attached a drive to be SpinRited
  3. booted up
  4. ensured the new drive was offline in the host server Disk Manager
  5. added a new virtual hard disk to the first IDE connector for the VM and pointed it to the new physical disk
  6. started up the VM and connected to it.

SpinRite loaded just fine, and found the drive. But this is where it all goes sideways. SpinRite reports that the drive is reporting its size incorrectly and SpinRite must not be used on it until the problem is fixed.

 

 

I'm not sure what to do next. Does anyone have any ideas?

Link to comment
Share on other sites

What you have done seems ok however I do not think Spinrite will run from a VM as it relies on direct access to the drive controller to run correctly. I believe (I could be wrong) that because of the controller virtualization it will not work correctly. I have generated more than a few bad drives compliments of Spinrite so I guess curiosity makes me ask, what makes you want a dedicated VM for Spinrite?

Link to comment
Share on other sites

Maybe I'm missing something, but why would you want to analyze an external drive from a virtual machine? Just connect it to the host.

Link to comment
Share on other sites

What you have done seems ok however I do not think Spinrite will run from a VM as it relies on direct access to the drive controller to run correctly. I believe (I could be wrong) that because of the controller virtualization it will not work correctly. I have generated more than a few bad drives compliments of Spinrite so I guess curiosity makes me ask, what makes you want a dedicated VM for Spinrite?

Maybe I'm missing something, but why would you want to analyze an external drive from a virtual machine? Just connect it to the host.

I guess the answer to both questions is that I want to be able to SpinRite more than 1 drive at a time on the same physical computer. This can't be done with SpinRite normally. Even if you tell it to test multiple drives, it will do them sequentially, not concurrently.

 

I want to have multiple VM's, each one running a single instance of SpinRite. The idea is to create as many VM's as there are SATA ports on the board and pass a different SATA port to each SpinRite VM. Each SpinRite will think it owns the port that's passed through to it. The bottom line is I'll be able to test multiple drives concurrently.

 

The good news is, I got it working! :D

 

It turns out the drive I was using was the culprit. Since I couldn't get it working in a VM, I decided I might just as well test the drive in non-VM mode, so I booted from my SpinRite USB stick and, guess what, SpinRite gave me the same error I got when trying it in VM!

 

Nothing else has given me any indication that there might be something wrong with this drive — another reason why I insist on using spinRite. I am now running SeaTools on the drive to see if it can find anything.

 

Does anyone know what you can do to fix a drive that misreports its size to the BIOS?

 

Anyway, this morning I tried again with another drive. It showed up normally in SpinRite in a VM and is currently running.

 

I figured, what the heck, so I got another drive that needs testing and hot-plugged it into the mobo. I set it to offline in Disk Mangler, created another VM, assigned the new physical disk to it, and it's also running. So, instead of having 1 drive tested in 160 hours, I'll have 2 :)

Link to comment
Share on other sites

I think I figured out at least a bit more of the issue with the one drive. I suspect this drive was converted to GPT at one point and SpinRite doesn't know what to do with it, hence the error. SpinRite itself gave me the clue: at one point it says MBR followed by EFI.

 

Assuming you agree that GPT is the issue, can anyone help me convert the drive back to MBR?

 

Edit: I just confirmed, using diskpart on Server2008r2 that the disk is indeed GPT. Unfortunately, the instructions from MS on converting from GPT to MBR didn't work — diskpart says the specified disk is not convertible. Trying to find another way.

Edited by ikon
Link to comment
Share on other sites

OK, it's fixed.

 

Found a post on the net where someone used clean in diskpart, instead of convert MBR. It worked; the drive that SpinRite complained about is now being SpinRited. So, I now have 3 drives SpinRiting in HyperV on a single box. I'm a happy puppy :) Here's a screen shot: SpinRite Hyper-V

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...