One goal of updating to Proxmox was to be able to run TrueNAS Core as a VM, which would then have my NAS in a ZFS Pool. To do this, there are multiple ways to pass hard drives from Proxmox to the TrueNAS VM – the two I looked at were passing the drives directly or passing the drive controller. Passing the controller has some benefits, it will pass all drives attached to the HBA (host bus adapter), and it should be possible to hot swap drives while working in TrueNAS without having to pass every single one (spoiler alert, hot swap works great!).
I read that the Machine works best as q35. Eventually, the finished working version had this as the setting. Also, the BIOS was UEFI – again, the version I got working had this as the setting. This did cause some problems initially, but we’ll get there later. I’m not sure if choosing SeaBIOS will work here. I added the EFI disk (my main VM storage), checked the Qemu agent, and hit next. The next page, I also chose vmstorage0 for the main storage of the VM. I chose the number of cores, RAM, and network settings, and I was done. Settings below:
OK – so now we have TrueNAS Core working, but no drives! Buckle up, here’s where things get interesting.
1. Unplug ALL hard drives
2. Make a USB stick with FAT/FAT32 NOT exFAT or NTFS
3. Unzip and copy the files from the UEFI folder onto a USB stick
4. Boot the server and Hit F11 and booted into the UEFI Shell
5. Switched to the USB stick with “fa0:” command
6. Run SMC2308T.nsh and following the instruction to enter the last 9 digits/character of the SAS address.
7. If you are having problem to enter the SAS address, please use the command below to set the controller SAS address.
sas2flash.efi -o –sasadd “Controller SAS address”
For example: sas2flash.efi -o –sasadd 5003048 0070a8b00
8. Reboot the system
I booted up Proxmox and made a brand new (UEFI) VM. Then I passed the PCI, as per above; I did not add any of the extra settings mentioned above. This worked!!! I was able to boot into TrueNAS Core, and all of the drives showed up.