What started as a project to run "some crypto applications" grew into something much bigger, but also more useful. I learned a tremendous amount about virtual machines, lxc containers and Proxmox. And although I'm just scratching the surface and I don't actually understand it, I know how to do some things. I'll write them down here, partly for myself, but also for you in hopes it will save one of us a lot of time and frustration.
If you want to use a software RAID solution for your storage or pass it to a VM, you (probably) need a HBA card. Sometimes they come with the server, but mostly you have (or want) to buy and add them yourself. In my VM server (HP) I added a HP H220 to combine 6 SSD's into a ZFS RAID-Z2 array for the OS and VM disks. In my storage server (Dell) I pass the Dell Perc H310, that came with it, straight to the TrueNas VM that takes care of my storage disks.
When I started doing this -working with ZFS and FreeNas- popular ones were the IBM M1015 or M1115, because you could buy used ones cheaply on Ebay. You still can, but technology has evolved, SSD's are cheaper and SATA/SAS3 has become mainstream. Servethehome.com has written an excellent guide Top Picks for FreeNAS HBAs to help you find the best HBA for your application.
Most HBA cards you can buy are configured with IR firmware by default. In this mode the card will take care of the RAID functionality. If you want to use software RAID (or ZFS) you don't want that. You want your OS to take care of that. Therefor you have to (cross)flash most cards to IT mode (some have native IT mode capability, like the earlier mentioned HP H220). I've done this with the Dell Perc H310 in my Dell server and with the earlier mentioned IBM M1115. The process is basically the same for all cards. I also flashed my HP H220, but for different reasons as mentioned in the warning below.
HP, now HPE, is notorious for being very picky about the hardware you install. If it is not HP(E) labeled/branded, the server doesn't recognize the sensor data and assumes the worst. This results in very high fan speeds and thus an unbearable amount of noise. So in the HP server I had to install an HP branded HBA: the HP H220.
This guide is a compilation of multiple guides that are available. If you search for
crossflash lsi it <your card here> you will probably find the perfect one for you. At the end of this part I have listed the ones that helped me most.
Prepare a DOS bootable USB stick. I use Rufus for that.
Find the SAS address of your card. This is very important!!
When booting in BIOS mode (assuming you're doing this on an HP server):
Boot the server from USB. You should now see a DOS command line.
Type and run the following command to find the SAS number if you haven't done so in step 2.
Find the number of the card (0 if only one is installed) and use that number in the next command.
sas2flsh.exe -c 0 -list
Now write down the SAS address. This is very important!!
Run the next commands one by one to wipe the existing firmware.
sas2flsh.exe -o -e 7
Flash the new firmware and BIOS.
sas2flsh.exe -o -f H220_it.FW -b mptsas2.ROM
Reboot the server to BIOS and enter the SAS number (change to the number -without spaces and dashes- you wrote down in step 2):
sas2flsh.exe -o -sasadd 500605Bxxxxxxxxx
You are done. Reboot.