Installing HAOS in a VM on TrueNAS SCALE

Can I ask why I should use this method instead of the “built in” (sort of) charts app?

The last time I setup a virtual machine on my truenas box the power usage went from around 50w to 100w permanently. Can anyone tell me how to avoid that?

HAOS “just works” — It’s supported by and provides the experience the Home Assistant developers intended. It’s easy to extend with add-ons that are preconfigured to integrate with Home Assistant. Basically, it’s maintenance-free and allows you to focus on Home Assistant rather than trying to figure out how to get it working. It’s an official and most popular installation method. There is lots of community support, so it’s easy to get help when needed.

The SCALE apps run in Kubernetes. Enabling the SCALE apps system (before you install a single app) creates additional overhead and constant CPU usage. For comparison, on my server, simply enabling the app system consumes a constant 5-10% CPU while my entire HAOS VM, with all add-ons I use running, sits at 0-1% CPU. I’m not sure why you saw such an increased power usage when you last installed a VM - I’ve never seen anything like that but I’ve only run HAOS in a VM.

The SCALE Home Assitant app is not an official installation method. It is NOT a typical container install using Docker. It has opinionated, preconfigured additional complexity added. It is not supported by Home Assistant developers and is not maintained by people who understand the requirements of Home Assistant. If you want things (in Home Assistant) to work as expected, you need additional knowledge of Kubernetes. I’m not aware of any support for the Home Assistant SCALE app, so it will be difficult to find help when needed.

If you don’t want to use HAOS - I would suggest using Docker and going with the official Home Assistant container installation - This works extremely well, is supported by, and provides the experience the Home Assistant developers intended. It is used by a lot of people and easy to find help.

Many thanks for the detailed reply that you obviously spent some time writing.

I am not a fan of the scale home assistant app. I tried to update to a new version and options in the app config disappeared and my network config no longer worked… I had to rollback and then all sort of other stuff stopped working!

I did try to run in docker - that would be my preferred way to do it but I am pretty sure that I ran into issues doing that. I think that I was unable to configure some network options that would normally be available for docker but are hidden in truenas as it doesn’t run docker, it runs kubernetes!!!
(Do you have any suggestions or experience of running HA in docker in truenas? Are you aware of the limitations that I came up against)

I am pretty low skilled when it comes to truenas and especially kubernetes. I have some experience with docker and would much prefer just to be able to run docker compose rather than k8.

I don’t need addons. I have node red and a few other bits running as seperate apps in truenas and that all works fine. I actually still have zigbee2mqtt running on a raspberry pi… I should try and move that onto truenas as well at some point!

Maybe I’ll try another VM install at some point and see how it goes.

Many Thanks

I used to install/run native Docker directly in the TrueNAS OS back in the Angel Fish days. That has since become much more difficult and no longer recommended. That’s when I finally switched to HAOS. I only intended it to be a stop-gap until I came up with another solution. But I’ve been so happy with HAOS (and the lack of free time I used to enjoy) that I just decided to stick with it.

The most obvious answer is to run a VM and install Docker there, but at that point, you might as well run HAOS instead.

If I were going to run Docker on TrueNAS today, I would use Jip-Hop’s Jailmaker script

While not officially supported by IX-System, it’s what they recommend, and it won’t interfere with the TrueNAS system itself and shouldn’t break during TrueNAS updates. At some point in the future, a GUI configuration may even be added to the TrusNAS UI. (This was stated by Kris Moore, SVP of Engineering at IX-Systems, but I can’t find the specific comment for a reference) They have even added documentation for Jailmaker to the TrueNAS docs

The other option I can’t recommend anymore is to use a script that will enable apt and install Docler directly on the base system. I don’t like this because it modifies the TrueNAS OS and has the most potential to break on TrueNAS updates. Also, the script’s maintainer thinks they know more about how to use TrueNAS than the TrueNAS developers themselves. But if you want to live on the edge, here’s a link to that as well

1 Like

Just want to say thank you for this guide. I tried Home Assistant Supervised and it was a pain in the ass :smiley:

Then I found out that HAOS is much easier followed your guide and had in 10 minutes a replacement HAOS VM running. Imported the backup from the supervised version and done.

1 Like

Once again thanks for the detailed and comprehensive reply to my question.

I have also moved to HA OS and so far everything is going great… There are quite a few broken automations and integration with Google Home but I think that’s just because a few entities name’s changed and a couple of other things not related to the migration.

1 Like

Just created an account to thank you for this guide. Worked perfectly!

1 Like

Hi @troy,
I feel guilty asking for help, given all the help you have given already, however, I cannot find a solution anywhere

Note; I did change 12.2 to 12.3.

I created a ZVOL, executed the first line and it worked;

root@truenas[~]# ls
dead.letter haos_ova-12.3.qcow2.xz samba tdb

The second command yielded this;

root@truenas[~]# unxz haos_ova-12.3.qcow2.xz
unxz: haos_ova-12.3.qcow2.xz: File format not recognized

The whole process stopped there. Is there another way to open the xz or should I use a different image?

Regards,

Frank

Hi @Tromperie,

Best guess is you have a corrupt download. Please remove the file and try to download it again. If that doesn’t work, maybe try 12.2. If you’re still having this issue, please say what TrueNAS version you’re running and I’ll try to reproduce it on my end in the next day or two.

Also, I don’t update the HAOS version in the guide until I see the update pushed to my install. (But I doubt 12.3 has anything to do with your issue, I’m mentioning that as information only)

1 Like

Thank you Troy for the quick response.

Embarrassingly, I tried 12.2 and it worked. All up and running.

Thank you too for your advice. It has never failed me.

1 Like

Looks like IX-System is listening to the community – Native Docker / Docker Compose support is (officially) coming to SCALE this fall!

How well will this work for Home Assistant? Only time will tell…

Has anyone set this up with a subdomain using ngnix proxy manager app on truenas scale?
I can’t seem to get it to work. My other apps work, but HAOS in a VM doesn’t seem get proxied correctly. CloudFlare is my name server and it just times out with 504 bad gateway.

@vakulenchuk - Have you seen this? Maybe it will help.

Hello i have a problem to install haos os whe, i tape this command i had an error

Signed up just to tell you how great this was. Only issue I had was selecting the correct NIC :smiley:

1 Like

Sorry I missed your post @Alphaprob

Im guessing the PATH variable isn’t set for the root user.

I’m away from server at the moment, so I can’t say for sure but its likely something like /usr/bin/qemu-img