How to passthrough HBAs and NICs to Windows VM

paylesspizzaman

Explorer
Joined
Sep 1, 2015
Messages
92
Let me begin with: I know I'm not using recommended hardware (particularly ECC). I keep all my media backed up on a "proper" FreeNAS machine that remains off most of the time. I'm looking to setup a Windows Server 2012R2 VM within FreeNAS and VT-d passthrough some HBAs and NICs to the Windows VM. This sounds easy (and should be?), but I haven't been able to find much information on how to do it. Most everything I've found is either virtualizing FreeNAS or people complaining that GPUs currently can't be passed. If you have any advice, even if it's RTFM, please let me know.

I know the "recommended" method is to use ESXI as the hypervisor and setup VMs for Freenas and Windows Server. I was exploring this option until I figured out that it does not appear that the mobo sata ports/controller can be passed through to VMs. Basically this means I won't have enough PCIe slots for all the HBAs and NICs I would now need. I'm wanting to have 6 SATA ports for FreeNAS and 6 for Windows. I would also like FreeNAS and the Windows VM to each have their own NIC. I would go all Windows, but I don't really trust Windows to let me know when an HDD is beginning to fail. I considered only FreeNAS, but I want to be able to spin down my mostly un-accessed HDDs when not in use. I also considered only UnRAID, but my cameras need either their own partition or a quota so that the recordings overwrite once the partition is full. UnRAID doesn't have that. I guess I could probably use UnRAID as the hypervisor and do a Windows VM within it... I would trust UnRAID more than Storage Spaces. I really do like FreeNAS though! I also would prefer free versus $100 or whatever UnRAID costs these days.

Thanks for any info

System:
Asrock z390m-itx
Intel i3-8350k
Gskill Aegis 32gb 3000MHz
5x2TB HDDs for network camera storage.
6x10TB HDDs for movies, TV shows, music, and general storage.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288

paylesspizzaman

Explorer
Joined
Sep 1, 2015
Messages
92
Thanks for the reply! So this isn't something that is in the GUI? I guess I'll have to try to figure out where and how to edit the files needed. My last attempt messing with files in FreeNAS didn't work out for me.
 

2nd-in-charge

Explorer
Joined
Jan 10, 2017
Messages
94

paylesspizzaman

Explorer
Joined
Sep 1, 2015
Messages
92
So any idea if it would be possible to use the iohyve commands edit a VM I created in the FreeNAS GUI? If I'm reading correctly, iohyve would have to be enabled first, but then could I simply run "iohyve set bsdguest pcidev:1=passthru,2/0/0" (without the quotes) to do passthrough? Assuming of course my VM is named bsdguest and the PCI device address is 2/0/0. I'm also not clear on whether the PCI devices need to be masked from FreeNAS at boot?
 

seb101

Contributor
Joined
Jun 29, 2019
Messages
142
I am also looking for help with this. I want to direct-attach all four ports of a PCIE hardware NIC to a VM. Do I need to do this entirely from the command line or can I simply 'edit' my exisiting GUI-created VM for this?

If so... how? :)
 
Top