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 (1) download, (2) extract, and (3) write the HAOS image for KVM to the ZVOL you created. In the 3rd command, replace tank/vm/haos
with the path to your ZVOL. Notice the full ZVOL path should begin with /dev/zvol/
wget https://github.com/home-assistant/operating-system/releases/download/13.2/haos_ova-13.2.qcow2.xz
unxz haos_ova-13.2.qcow2.xz
qemu-img convert -O raw haos_ova-13.2.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 1 virtual CPU with at least 2 cores 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.
QEMU Guest Agent
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
This guide is also posted in the Home Assistant forums and can be found HERE