If your Raspberry Pi is fresh out of the box. You will need to boot into Pi OS and run the following commands.

    sudo apt update sudo apt full-upgrade

Then, update the firmware with:

    sudo rpi-update sudo rpi-eeprom-update -d -a wget https://github.com/raspberrypi/rpi-eeprom/raw/master/firmware/stable/pieeprom-2023-01-11.bin --no-check-certificate rpi-eeprom-config ./pieeprom-2023-01-1l.bin> bootconf.txt sed -i s/0x1/0x21/g bootconf.txt rpi-eeprom-config --out pieeprom-2023-01-11.bin-netboot.bin --config bootconf.txt pieeprom-2023-01-11.bin sudo rpi-eeprom-update -d -f ./pieeprom-2023-01-11.bin-netboot.bin

Now on your TrueNAS Server where you have TFTP boot folder created from create a folder with last 8 serial of board. The serial number can be found from booting your Raspbery Pi with no boot media.

    sudo chmod -R a+rwx (serialnumberfolder)/ sudo chown admin (serialnumberfolder)

Copy the Raspbery PI UEFI Files to the folder.

Create isci drive

Now naviate to the TrueNAS interface, you will need to make an iSCI drive for the raspberry pi to use once it boots.

Tho techically you can do this whole process without any usb, I find install from a USB easier. Write the ESXI ARM install to a usb drive. Leave this unconnected as we will need it later.

You will need to modify the UEFI setting that limits ram to 3GB. Since ESXI requires at minium 4GB. You will add a iSCI drive. This is your TrueNAS server that you created a iSCI drive eariler. target: and lun reboot

Now boot from the USB drive. Install ESXI. Make sure to point to the ISCI drive and not the USB.