This took a while to figure out as I had to try several combinations of settings to get it running.
When setting up the VM for FreeNAS, use “FreeBSD” as the template.
For BIOS use “OVMF” and Machine should be “i440fx-2.7”
When installing FreeNAS make sure it is set to UEFI boot.
In order to PASS THROUGH a generic PCIe device in UnRAID, (a SATA controller in my case), use this guide.