Installing HAOS (Home Assistant OS) in a VM

Hey, I actually didn’t. I ended up using a Cloudflare tunnel and the cloudflared addon in HA.
I can’t find the exact guide i used but there are a few around. It was pretty easy since I was already using Cloudflare as my nameserver.

I managed to fix it, thanks to @ctag !!! The solution was to go into the Kubernetes “Advanced Settings” on the Apps tab in the Truenas GUI, and set

  • the v4 Interface to empty (or rather select “–”) instead of the network bridge br0 you probably created since you are using a VM
  • v4 gateway: leave empty, instead of e.g. putting your router IP there.

See @ctan’s post (and link) in this topic: Apps can’t reach VM on same bridge

It’s been mentioned that the nginx proxy manager can’t access IP’s on your local network because official Truenas app just get redirected to the network gateway (see Truenas apps can’t access physical devices on local network. I have tried implementing a rule on my router to then pass on that traffic to the right IP but couldn’t get that working.

1 Like

so what you suggested is to install Deconz as a truenas app and not install it in HomeAssistant (I run it as VM) ?

I’ve been jumping between foruns, and looks the community is identical between here and the home assistant one :slight_smile:

My doubt is if anyone running HA in TrueNas Core with a ZigBee USB dongle connected?

Struggling to make it work, and I was trying to avoid to keep using a Rpi just for zigbee :frowning:

I just got HA installed as a VM on EE. Worked like a charm.

My question now is what controller type do I pick for my zwave usb stick?

Glad you were finally able to get something working… I use qemu-xhci

1 Like

Thanks Tony, I am struggling to get a couple HA Addons to load they are just not starting.

Ive tried Node-Red and Terminal

Really great job. I just installed without a hitch.

But why did you use a thick volume instead of sparse provisioning?

It uses 2.38GiB after it boots,

I solved the NPM forwarding problem by enabling websockets.

I also set the URL in the System>Networking screen to the external URL so it would confirm external access is enabled.

There is an IP ban file that gets deleted on reboot so check that.

I got the ssh working by not enabling sftp. No password. Just my ed25519 public key. works great.

Hi All,

Glad i found this topic, maybe someone can help me with a little problem i have. And thank you in advance !
I have HA OS installed in a VM on TrueNAS Core for 2 years now and eveything is running ok.
Lately i installed Frigate and saw the disk used jump.
Went into TrueNAS and increased the size of the VM to 192 Gb from 128 Gb.
But for the life of me i have no idea what is needed to expand HA onto the full new size. Or maybe it did expand and i just simply dont understand it.
Here are some pics from various places showing the disk utilization:

HA / Storage shows 61% used - 62.2 GB free
This is from HA Settings/System/Storage - according to those numbers it doesnt seem it expanded.

This is from Glances addon - it shows 115G but a total of 188G. No idea what to make from this.

and this is from Frigate which shows the 188 Total.

I did delete all the HA snapshots in Truenas and restarted the VM, still the same.
So if i have 188 Gb in total, why is HA system reporting 61% used and 65 GB free ?!

many thanks !!

PS i’ll come with the pics as soon as i get the rating to post them :slight_smile:

I could not find in the forum rules what it takes to be able to post pics, but i guess more then one post is needed :upside_down_face:

Hmmm scratch my question, running df -h from the Terminal addon shows Size: 188.3G and used 115.6G. So it did expand to the entire volume.

Still , du -sh /* shows only 30G or so used.

Is there a way to find out what is eating up the rest of 80G please ?
I know the terminal addon will shows only whats in the container, but is there a way to ssh into the VM on truenas core ?

Cheers

brilliant, worked great

Since I’ve become more dependent on Home Assistant, I’ve moved my HAOS install off of TrueNAS and onto a dedicated device. I’ll try to keep the OP updated with the latest version of HAOS, but I may fall behind. I’ve now made the first two posts into wikis so anyone can hopefully edit them as needed.

2 Likes

:information_source: Upcoming changes in TrueNAS SCALE 25.04 (Fangtooth)

Virtualization in TrueNAS 25.04

TrueNAS 25.04 changes the virtualization hypervisor backend from the previous KVM implementation (TrueNAS 24.10 and earlier) to Incus for virtual machine (VM) deployment and adds support for Linux system containers (LXC). This feature offers lightweight isolation functionality similar to jails in TrueNAS CORE. This is an experimental community feature, with full Enterprise support planned for a future TrueNAS release version.

With this change comes redesigned Virtualization screens in the TrueNAS UI.

Manual Migration Required

Due to configuration incompatibilities between the previous KVM hypervisor implementation (TrueNAS 24.10 and earlier) and Incus in TrueNAS 25.04 (and later), existing VMs do not automatically migrate on upgrade from 24.10.X to 25.04. However, storage zvols are retained, allowing users to easily recreate previously configured VMs.

I installed the 25.04 beta release and recreated a HAOS VM using the new UI and Incus backend. Although the setup screens were different, the process was straightforward, and I’m happy to report that I encountered no issues.

Screenshots for TrueNAS 25.04 Instance Creation

I should also mention that I’ve moved my primary instance of HAOS to a dedicated device, so my TrueNAS VM is only a backup and is used for testing.

4 Likes

I’m going to try to install HAOS on my 25.04 system. I’d appreciate someone could weigh in and let me know if any of the initial steps for getting the qcow2 image onto the zvol change with the usage of Incus instead of KVM. (My limited knowledge and some research would indicate that it remains the same since Incus uses a KVM hypervisor.)

Thanks in advance!

Steps are the same for writing the image to zvol.

Does anyone have a tutorial for doing a fresh install of HAOS on the new fangtooth incus system? I was able to follow the top of this post, even imported the zvol, and I can see HA running in the console, but I can’t access it from my browser to set it up. The networking is completely borked. It used some default iP address that wasn’t even in my range, started with 10.xx.xx.xx so I forced an IP on it that was available (192.168.100.111), but then the VM itself has a “NIC” settings, and nothing was there, so I added an available NIC (because the one running on TrueNAS threw an error), but no matter what I try, all I can see in the 172.xx.xx.xx of the docker running inside the VM when using VNC or the console, but nothing can access it from outside to complete the setup. Please help.

The installation part is the same as before. Download, extract, and write the image to zvol has not changed.

When you create the VM, uncheck Use default network settings and select your bridge or select your NIC under Macvlan

If you use Macvlan, discovery and all communication with devices should work, but you must use a bridge if you want to configure Home Assistant backups to save on TrueNAS

There are screenshots of the new instance setup, a few posts back


For creating a bridge on TrueNAS, see the following

1 Like

I’ll try to get a fully updated guide for Fangtooth posted ASAP. But it’s going to be at least a few days before I have time.

1 Like

Great info troy, thank you. I somehow got it to work, but one strange thing happened. Once you import the zvol to incus it disappears from Datasets in TrueNas. I had a “VM” dataset with a “HAOS” zvol. Now I only see the dataset “VM” …it’s like incus took it over, which is a bummer because I wanted to setup replication to another dataset for backups. I SSH’d in to see where it went, and it’s here now: /dev/zvol/VM/.ix-virt/virtual-machines …which technically is still in the VM dataset I created for it, but hidden I guess?