Confused about passing HDDs to VM in ESXi

sjalloq

n00b
Joined
Jun 20, 2011
Messages
57
Hi guys,

first time here and I'm trying to follow the All-in-one NAS/VM route. I've just set up a system based on a X9SCL-F, E3-1230, 16GB RAM and ESXi.

I think I have a misunderstanding regarding passing HDDs to the VM, in this case NexentaStor, and wanted confirmation. Am I correct in saying that I need an HBA in passthrough mode in order to give my VM direct access to my HDDs?

I've currently got 5 2TB drives and a single 500GB datastore plugged into the 6 SATA ports of the motherboard. These all show up in ESXi as datastores but only the VM partition is visible from within NexentaStor.

Thanks, Shareef.
 
I wouldn't use nexentastor in a VM - too many people have had stability issues. SE11 or OI with napp-it will be rock-solid. Yes, you pass the controller thru and the VM sees the drives that way. You have the exact same config I do :) Here is the problem, you need the datastore for the SAN VM to be on local storage, which means (sadly) another HBA (although it can be a cheap one, long as ESXi supports it.) You do NOT want to create datastores on the 5 2TB drives - you set the motherboard sata controller as pass thru in advanced properties, and reboot, and then assign it to the SAN VM. But, like I said, you do need a separate controller for the local datastore.
 
unfortunately ESXi cannot passthrough a single disk directly to a VM. what you can do is pass a whole (supported) controller through to a VM. in the case of your onboard controller, I believe that works to passthrough. the kicker is that all disks attached to the controller get passed to the VM, and therefore you need at least 2 controllers to achieve this, one for the passthrough to the VM and a second to house the datastore where the VM's files are stored.

you won't get too far trying to keep your datastore hard drive on the same controller being passed to a VM.

here's a guide on how to setup the passthrough for the controller. http://www.servethehome.com/configure-passthrough-vmdirectpath-vmware-esxi-raid-hba-usb-drive/

be sure to reboot after marking the controller for passthrough!

i know a lot of people here, myself included, have a cheap SATA HBA installed just for the sole purpose of housing ESXi's datastore, freeing up the onboard controller for passthrough.

i suppose another non-novice route would be to to use an external SAN to serve ESXi's datastore over a storage network. but that seems to be outside your scope as you specify the all-in-one build which specifies the SAN be virtual. if you had an external SAN to house the datastore, you wouldn't need to be passing storage controllers to guest VMs :)
 
Last edited:
danswartz and i have both similar builds (i went the X9SCM-F route though) and similar [H] browsing/reply schedules :D
 
As it relates to passing a disk plugged into an onboard SATA port, the following works well.
Run the following commnad for each disk you want to pass to a VM making sure that each .vmdk has a unique name. The disk id can be found under host/configuration/storage

vmkfstools -r /vmfs/devices/disks/naa.unique disk id /vmfs/volumes/vm-name/disk1.vmdk
 
As it relates to passing a disk plugged into an onboard SATA port, the following works well.
Run the following commnad for each disk you want to pass to a VM making sure that each .vmdk has a unique name. The disk id can be found under host/configuration/storage

vmkfstools -r /vmfs/devices/disks/naa.unique disk id /vmfs/volumes/vm-name/disk1.vmdk

Careful :). Now you're talking about an RDM which not really disk pass through in the same sense. -r is a virtual mode rdm, and -z which you didn't mention is a physical mode rdm. The identifier for disks does not always begin with naa either.

The end result as far as data on the disk might be the same... meaning you could then take the disk (or LUN) and use it on a physical server later and the data would be there.
 
Wow, thanks for all the replies guys.

The main problem I had was that I didn't understand that the whole controller was either in passthrough or not. I was planning on getting the Intel HBA that is commonly used only when I needed more drives but I think the easiest way forward is to make that purchase early. I had a quick read about RDMs earlier and I don't think that's the right path for me. I can cope with the expense of the HBA after spending whatever else on the rig already. I vote with keeping it simple.

Thanks again for the help and the pointer about Nexenta and stability issues. I'll have a search of the forum.

Cheers.
 
Keep in mind also that (assuming the HW works LOL) an advantage of pass thru mode is you can hot-plug disks, they can see the smart info, etc...
 
Why would he need 2 HBA's? Couldn't he just run the 5 2tb drives off a single HBA passed through to the SAN VM and use the onboard controller as the ESXI install and SAN VM datastore?

Can the onboard controller on these supermicro boards be passed through to the SAN VM and get a cheap 2 port sata controller (or something like that) to use for the SAN VM datastore?
 
He doesn't need two HBAs, he does need two controllers (one HBA and one mobo) is what was meant... As far as physical disk passthru even if it works as well perf wise as passing thru the whole controller, I doubt you can do hot-plugging and such of the drives?
 
Why would he need 2 HBA's? Couldn't he just run the 5 2tb drives off a single HBA passed through to the SAN VM and use the onboard controller as the ESXI install and SAN VM datastore?

Can the onboard controller on these supermicro boards be passed through to the SAN VM and get a cheap 2 port sata controller (or something like that) to use for the SAN VM datastore?

absolutely. i said "you need at least 2 controllers" which certainly can include the onboard controller. and later even said

i know a lot of people here, myself included, have a cheap SATA HBA installed just for the sole purpose of housing ESXi's datastore, freeing up the onboard controller for passthrough.

so that should sum that up.
 
Thanks, I just wanted to make sure.
@jbraband Since the X9SCM-F has 4x Sata2 and 2x Sata 3.0 (I believe) are those able to be split up and shared with 2 different VM's or one used as datastore and one passed through? Or are they both on a single controller?
 
that is a great question that I don't have an immediate answer to. let me do some sleuthing over lunch.
 
i am also interested in this question, but as far as i know,
all Sata ports (sata2 and sata3) are delivered by the chipset and i doubt that they are delivered by
two independent pci-devices.

This will be needed to boot from one device and pass-through the other.
can you confirm that?

Gea
 
bad news.

my SuperMicro X9SCM-F shows a single onboard SATA controller under Configuration > Advanced Settings > Edit... (where you mark devices for passthrough)

for me it reads as 00:1f.2 | Intel Cougar Point 6 port SATA AHCI Controller

every other line is accounted for in terms of hardware, so its a no-go :(
 
I kinda had a feeling :( The good news is you can get a cheap LSI controller off ebay and stick the local datastore on it... That is what I did....
 
As per the op, I think i have misunderstood the concept regarding passing HDDs to the VMs.

I am in the final stages of putting together a server and believe that i may have messed up with component selection - I have already purchased it :(
Please let me know if this is the case! I am unable to begin testing/playing since im still waiting for the ram to turn up.

I planned to run ESXi 4.1 with OI or SE11 with napp-it
mobo: Asus m4a89gtd pro/usb3 (890GX)
storage: 6 x 2tb hdd connected to the onboard sata (zfs raidz2)

Was going to attempt to run the datastore via usb. Then realised this wasnt ideal and thought maybe i could just add a pci sata controller card i had lying around (sil3114) but now that Ive discovered the whitebox hcl I realise this isnt going to work :/

It appears;
- I will need a storage controller card (either for the datastore or for the vm running napp-it)
- the mobo wont support passthrough (no iommu support for this chipset)
which means i wont be able to passthrough either the HBA or onboard controller for direct use by the vm?

I hope im no hijacking this thread, after searching on the forums this seemed the closest match relating to my particular problem.

Thanks Andrew
 
Last edited:
Back
Top