PCIe Passthrough of LSI 2308 in Hyper-V on Server 2016

hammer8

Cadet
Joined
May 18, 2019
Messages
4
Hi, I’m running FreeNAS as a Hyper-V vm and am currently passing individual disks to the vm. Would it be possible to pass through the LSI 2308 card to which the disks I am using with FreeNAS are connected to instead? I think this will allow me to enable the SMART service in FreeNAS (currently failing to start). I’ve done a bunch of searches and am getting conflicting answers on whether or not it’s possible to passthrough this card. Has anyone been been able to get this to work? Thank you.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
and am currently passing individual disks to the vm.
You should not do it that way. It can lead to data loss.
Would it be possible to pass through the LSI 2308 card to which the disks I am using with FreeNAS are connected to instead?
Does Hyper-V support that functionality. We usually suggest using ESXi because it does and that is how we suggest handling it. You can't change methods while there is data on the pool. There is a high risk of data loss if you attempt it. Passing the controller is the better way.
I think this will allow me to enable the SMART service in FreeNAS
Yes, one of many things that will be better.
I’ve done a bunch of searches and am getting conflicting answers on whether or not it’s possible to passthrough this card.
It works in ESXi, but I don't know about Hyper-V. Two different products with different base OS.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080

hammer8

Cadet
Joined
May 18, 2019
Messages
4
You should not do it that way. It can lead to data loss.

Does Hyper-V support that functionality. We usually suggest using ESXi because it does and that is how we suggest handling it. You can't change methods while there is data on the pool. There is a high risk of data loss if you attempt it. Passing the controller is the better way.

Yes, one of many things that will be better.

It works in ESXi, but I don't know about Hyper-V. Two different products with different base OS.

Thanks...unfortunately, I’m stuck using Windows Server...

Does anyone have experience / success with passing through this card to a Hyper-v vm?

Thank you.
 

tsgill

Dabbler
Joined
Aug 13, 2023
Messages
19

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
Hi, I’m running FreeNAS as a Hyper-V vm and am currently passing individual disks to the vm. Would it be possible to pass through the LSI 2308 card to which the disks I am using with FreeNAS are connected to instead? I think this will allow me to enable the SMART service in FreeNAS (currently failing to start). I’ve done a bunch of searches and am getting conflicting answers on whether or not it’s possible to passthrough this card. Has anyone been been able to get this to work? Thank you.
I use Hyper-V for all my TrueNAS servers. I have virtualized 3 instances and they all work perfectly. The main problem I have come across is the LSI HBA cards in IT mode only see the first drive. I have a LSI 92078E I assume is in JBOD mode because all the drives show up fine. Other instances I just use motherboard controllers and I have a marvell 6 port sata card for 4 drives and that works well. I have taken all the drives and moved them to native installations of TrueNAS and it picks them up so if I ever lost my server I know the drives can simply be moved to another machine but this will never happen because I have copies of the TrueNAS virtual disk backed up. In windows, set the hard drive to offline then in Hyper-V you can add them as a physical disks under a SCSI controller.
 

tsgill

Dabbler
Joined
Aug 13, 2023
Messages
19
I use Hyper-V for all my TrueNAS servers. I have virtualized 3 instances and they all work perfectly. The main problem I have come across is the LSI HBA cards in IT mode only see the first drive. I have a LSI 92078E I assume is in JBOD mode because all the drives show up fine. Other instances I just use motherboard controllers and I have a marvell 6 port sata card for 4 drives and that works well. I have taken all the drives and moved them to native installations of TrueNAS and it picks them up so if I ever lost my server I know the drives can simply be moved to another machine but this will never happen because I have copies of the TrueNAS virtual disk backed up. In windows, set the hard drive to offline then in Hyper-V you can add them as a physical disks under a SCSI controller.
So how do pass thru the pci-e card. Is there no need. Currently I'am passing thru via SATA and I have bought the card specially because I was told to use it because its better and safer plus I can use SMART then. Since I bought I cannot find any tutorial or steps how to pass thru the card into Hyper-v
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
I have never passed the entire HBA card, just the drives. That may actually solve the problem of certain HBA cards showing only the first drive. From what I can tell, IT Mode maps the drives in groups and TrueNAS can't get the paths correctly. If I want to see SMART info then I look in Windows. I have the same problem with my 5 drive USB docking station, only the first drive shows up. I am adding some drives with the M.2 version of this
I've used similar add on cards with no issues. I'll report back if I have an issue, I might since it is M.2.

I think this link may help you pass through.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
If you get the HBA card passing through let me know. I would like to try that.
 

tsgill

Dabbler
Joined
Aug 13, 2023
Messages
19
Well I read into it. Not sure how to pass through the hba card. Tried to modify the powershell comands I get stuck where I have to dismount the card.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
Well I read into it. Not sure how to pass through the hba card. Tried to modify the powershell comands I get stuck where I have to dismount the card.
Have you tried just adding the drives to the VM from windows? You need to format the drives, NTFS is fine, then set them to offline in windows. After that go into Hyper-V settings for your VM and add or go to a SCSI Controller and you should be able to add a Hard Drive and select it from a drop down of physical disks. If you can see all your drives in TrueNAS then that should work fine, this is how I run all of mine. If not you'll need to configure your HBA card for JBOD mode or just get a SATA add on card like I mentioned above. Those all work fine. Just make sure you get one that is PCIE 3.0 not 2.0 and not x1. I use all my servers for other things, I really don't want to dedicate them just for TrueNAS.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
1695327786356.png
 

tsgill

Dabbler
Joined
Aug 13, 2023
Messages
19
Thank you already added the drives like that but not using the HBA yet as I was told it is better to pass through the card rather the drives.

Currently they are connected not to the hba. They simply connected via SATA to the motherboard. I am not knowledgeable but I thought you pass the hba card somehow. I have not hooked up the drives to the HBA yet. Dont worry no data on the drives yet.

If hook up the drives to the HBA will I be able to use SMART in TrueNAS currently it is not possible. Iam just testing for now. The HBA is alreayd in IT mode.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
Thank you already added the drives like that but not using the HBA yet as I was told it is better to pass through the card rather the drives.

Currently they are connected not to the hba. They simply connected via SATA to the motherboard. I am not knowledgeable but I thought you pass the hba card somehow. I have not hooked up the drives to the HBA yet. Dont worry no data on the drives yet.

If hook up the drives to the HBA will I be able to use SMART in TrueNAS currently it is not possible. Iam just testing for now. The HBA is alreayd in IT mode.
I really don't see any reason to pass the card through. If you ever figure it out later, as long as true NAS can see all the drives it will see the disks exactly the same way as in the VM. I have taken all the disks from my Hyper-V WM and put them into a bare metal installation and all my data showed up exactly the same as the did in the VM. I did that because I was getting weird network errors in TrueNAS and everyone wanted to blame Hyper-V but I had the same issue using bare metal. Eventually it was discovered to be a bug in TrueNAS SMB service and a patch fixed the issue. I assume if you use the HBA you can see SMART info in TrueNAS but really who cares when you can just look at CrystalDiskInfo and see SMART info for your entire server. But again I will say that you probably won't see all of your drives in TrueNAS using the HBA in IT mode without either passing the card through or setting the card up as JBOD. That's just my experience though.
 
Top