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.
Click on "local (pve)" on the left. Select "ISO Images" and click "Upload". Upload the TrueNas image.
In the top of the screen click the "Create VM" button.
Select Start at boot and optionally Start/Shutdown order.
Set the Guest OS to "Other". Proxmox will select the best defaults and lower level settings. Especially important when installing a Windows guest.
Set Machine to
Select SCSI as Bus/Device and set the Disk size to 8-16 GB. Select the Discard option and SSD emulation (if installing on SSD). The discard option will free up disk space on the host when files are deleted in the guest.
First set the number of Sockets, Cores and VCPUs. The number of vCPU's = Sockets x Cores. Only use multiple sockets if the host has multiple too. Set Type to
host and select Enable NUMA if the host machine has multiple sockets. Also scroll all the way down and enable "aes".
Set the amount of RAM. TrueNas with ZFS loves RAM so set is as high as possible. Setting a minimum is of no use here as TrueNas will take everything it can (you can disable "Ballooning Device").
Select the network Bridge that should be used by the guest and select "VirtIO" as model.
Confirm and finish.
Wait a few moments for the VM to be initialized.
Go to the VM and start it.
Open the console and the installer should be started. (I'll open a windowed console (button above the VM screen) to make the next screenshots.)
Select "Install/Upgrade" and press 'enter' to continue.
Press 'space' to select the virtual harddisk and 'enter' to continue.
You will get a warning. Press 'enter' to continue.
Enter a password.
Choose to boot via BIOS.
Installation will start. Depending on the underlying harddisk type this can take a few minutes.
When installation is done reboot the system.
Although the installer asks to remove the installation medium, do not do this. After removing, the reboot "button" does not work anymore. You can always remove it later using the Proxmox GUI.
After reboot you can login using the WebGUI. The address will be displayed in the console.
The best way to add storage disks to TrueNas is by passing a HBA straight to the VM. In How to enable PCIe passthrough in Proxmox you can read how to enable this in Proxmox. If you have enabled passthrough, you can continue.
Shutdown the VM.
Add the HBA as a PCI Device to the VM. Select the correct device and select "All functions".
Start the VM. The HBA will be booted inside the VM.
Initially when I added the PCIe HBA, TrueNas inserted the drives attached to the HBA in front of the OS disk. During boot the VM wanted to boot from a HBA drive instead of the virtual OS drive. After disabling the boot option of the HBA TrueNas booted fine. To disable the boot option on a LSI card, you have to erase the BIOS, see How to flash an IBM M1115 HBA card.
Configuration of TrueNas in Proxmox is not different from configuring a stand alone instance. In How to do basic TrueNas configuration I go into the details.