While there is the possibility of installing Home Assistant on FreeNAS in iocage (or as a community plugin) or through Docker, FreeNAS also allows for the use of VMs.
This guide is not about installing Home Assistant in FreeNAS or onto a Linux VM machine running on FreeNAS but burning a HassOS virtual appliance as a VM running on FreeNAS.
Downside of running FreeNAS is that there is no clean, easy way to passing devices (ie. Z-wave/Zigbee) to the VM but otherwise this is a fully blown Hassio install. However, a Raspberry Pi running Hassio addons for Zigbee and Z-wave to MQTT can overcome this.
Requirements: FreeNAS machine, VM software running on the PC (such as Virtual Box), a way of transferring files (approx. 6GB, the size of the HassOS install) from PC to FreeNAS, terminal access to FreeNAS (or use of Shell in FreeNAS GUI).
On PC:
a. Download the virtual machine disk drive (https://www.home-assistant.io/hassio/installation/), look for VDI (this is how the page currently looks; whenever other files are added to the download section, the page will also change).
and unrar it (gz is an archive file; use 7zip to unrar it).
b.1. Install Oracle Virtual Box if not already installed
https://www.virtualbox.org/wiki/Downloads
b.2. Convert the virtual machine disk drive (in this case vdi drive for Oracleās Virtual Box but vmdk should work too) to img by running (if running on Windows open a Command Prompt and change directory to Virtual Box install folder - defaults to c:\Program Files\Oracle\VirtualBox)
(replace source/hassos_vm.vdi and destination/hassos_vm.img with own locations)
VBoxManage clonehd source/hassos_vm.vdi destination/hassos_vm.img --format raw
The size of the img should be around 6 GB (up from 400 MB for the vdi).
c. Copy the hassos_vm.img to FreeNAS
On FreeNAS:
d. Create a new Zvol (the difference between Dataset and Zvol is that Zvol is a chunk of block storage accessible as a raw physical drive while Dataset is file-based storage):
Navigate to Storage -> Pools and click the three dots -> Add Zvol
Set a reasonable size for the Zvol (at least 32 GiB; it should be noted that the space is immediately allocated to Zvol and not accessible for file storage anymore; this is particularly important if already running FreeNAS with free space below 20% of the pool size as it will crash FreeNAS).
The new Zvol will then be accessible at /dev/zvol/pool_name/zvol_name (its path will be needed later).
e. Create a new VM (donāt power it yet)
Step 1: Navigate to Virtual Machines add Virtual Machine (VM)
Step 2: Set Guest OS as Linux and Boot Method as UEFI
Step 3: Add number of Virtual CPUs and Memory size accessible to the VM (this can be modified later)
Step 4: Select Use existing disk image and select the Zvol created above
Step 5: Modify Network Adapter if needed (ie. in order to easily locate the NIC when router leases its IP)
Step 6: Next (donāt add installation image)
Step 7: Submit
f. Burn the hassos_vm.img to the Zvol created above by running the following command:
dd if=/mnt/pool_name/dataset_name/location_of_hassos_vm/hassos_vm.img of=/dev/zvol/pool_name/zvol_name
g. Power on the VM (hassos will then occupy the entire Zvol storage that was set above)