Install Home Assistant OS
Begin in the TrueNAS UI by adding a new ZVOL at least 32 GiB in size. Take note of the ZVOL path.
Then using the TrueNAS shell, run these commands to download, extract, and write the HAOS image for KVM to the ZVOL you just created. Replace tank/vm/haos
with your ZVOL path.
wget https://github.com/home-assistant/operating-system/releases/download/10.5/haos_ova-10.5.qcow2.xz
unxz haos_ova-10.5.qcow2.xz
qemu-img convert -O raw haos_ova-10.5.qcow2 /dev/zvol/tank/vm/haos
Create the Virtual Machine
In the TrueNAS UI, select Virtualization from the left-hand menu, then click the add button to begin the Virtual Machine Creation Wizard.
Step 1 - Set the guest operating system to Linux, give your VM a name, and ensure UEFI is the selected boot method.
Step 2 - Assign your vCPUs and a minimum of 2 GiB memory. Set the CPU mode to host passthrough.
Step 3 - Click use existing disk image and set the disk type to VirtIO. Select your existing HAOS ZVOL.
Step 4 - Choose a NIC for your VM. Set the adapter type to VirtIO. If you are not using a bridge, enable Trust Guest Filters to allow multicast.
Step 5 - Nothing is needed here.
Step 6 - Defaults should be fine.
Step 7 - Confirm options and save.
Add the QEMU guest agent
No further configuration is required on TrueNAS Scale 22.12.1 and later. A channel for the guest agent will be added to the VM automatically.
For more information about creating a VM, see the TrueNAS Scale documentation found HERE
For more information about installing Home Assistant OS in a VM, see the Home Assistant documentation found HERE