Home Assistant VM on SCALE

PackElend

Explorer
Joined
Sep 23, 2020
Messages
60
Yep. HA is my last VM running on ESXi and I'm really looking forward to have everything on the new Hardware with TrueNas Scale.

KVM + ZFS is new for me so I'm still learning about that and didn't try yet with HA.

Hi
my electrician will be over next week, hopefully, we find a solution how to pull this ... fibre optic cable.
I guess a can continue diving into SCALE end of the month.
We can try to get that thing done together as you VM has properly much more features than mine, who is at the very beginning of using HA.

@dquercus, how what is the virtual hardware used by your HA VM?
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
TrueCharts should also support HomeAssistant (also thanks to the work by @tprelog ) as a SCALE app come next release of TrueNAS SCALE.
 

dquercus

Dabbler
Joined
Dec 31, 2020
Messages
13
Hi
my electrician will be over next week, hopefully, we find a solution how to pull this ... fibre optic cable.
I guess a can continue diving into SCALE end of the month.
We can try to get that thing done together as you VM has properly much more features than mine, who is at the very beginning of using HA.

@dquercus, how what is the virtual hardware used by your HA VM?
It's currently running a VM with 2GB RAM and 32GB disk in ESXI. Nothing fancy but I'm really happy with it.
 

PackElend

Explorer
Joined
Sep 23, 2020
Messages
60
TrueCharts should also support HomeAssistant (also thanks to the work by @tprelog )
referees to Home · tprelog/iocage-homeassistant Wiki (github.com), keep in mind The future of the Home Assistant Community plugin #28.
There is only one thing, the VM has certain advantages over the docker install, but that is up to personal preferences. Luckily there is Alternative way of running HassOS (full OS) on FreeNAS (without iocage or Docker) - Share your Projects! - Home Assistant Community (home-assistant.io), so all options will be open.
 

dquercus

Dabbler
Joined
Dec 31, 2020
Messages
13
TrueCharts should also support HomeAssistant (also thanks to the work by @tprelog ) as a SCALE app come next release of TrueNAS SCALE.
It's not the same .... The idea of the VM is running HassOS, that's the OS that includes HomeAssistant plus support for the plugins (also via containers). It makes it really simple to deploy Node-red, Grafana as plug & play addons for HomeAssistant.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
It's not the same .... The idea of the VM is running HassOS, that's the OS that includes HomeAssistant plus support for the plugins (also via containers). It makes it really simple to deploy Node-red, Grafana as plug & play addons for HomeAssistant.
I never said it was "the same", I just gave an alternative thats pretty much plug-and-play. You make it sound like the HassOS solution is superior, while the two options are pretty close.

That being said, I don't think you even know much about SCALE apps, otherwise you would've known that Node-Red and a lot of other Home-Assistant plugins are also already ported as SCALE apps, which gets pretty close to HassOS plugins.

That being said: SCALE Apps are still ALPHA/BETA state, just like the rest of SCALE.
 

dquercus

Dabbler
Joined
Dec 31, 2020
Messages
13
I never said it was "the same", I just gave an alternative thats pretty much plug-and-play. You make it sound like the HassOS solution is superior, while the two options are pretty close.

That being said, I don't think you even know much about SCALE apps, otherwise you would've known that Node-Red and a lot of other Home-Assistant plugins are also already ported as SCALE apps, which gets pretty close to HassOS plugins.

That being said: SCALE Apps are still ALPHA/BETA state, just like the rest of SCALE.

Don't take my post as criticism on SCALE apps. it is not. I'm already using and I'm really happy witth it but, as PackElend said, it's a personal preference and I find easier for my use case HassOS than installing all the SCALE apps separetely plus the manual configuration to make it work afterwards (example Visual Studio Code).
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Don't take my post as criticism on SCALE apps. it is not. I'm already using and I'm really happy witth it but, as PackElend said, it's a personal preference and I find easier for my use case HassOS than installing all the SCALE apps separetely plus the manual configuration to make it work afterwards (example Visual Studio Code).

It's a bit overdone for two people to keep hamering about their preference.
I never said I gave a damn, I even said I know what the differences are. Whats the need to keep explaining difference to someone that actually understands the differences.

Hell I made pretty a complicated WASP algorithm a few years back, in Home Assistant. So in case it isn't clear: I KNOW what i'm talking about and what you are talking about. I don't care about what you are using, I just gave an alternative for readers of the thread. thats all, no discsussion needed.

A bit of advice:
If someone writes "don't forget option x also exists", it isn't always needed to explain or defend your choice. Or leave it to OP to explain his choice once. Once OP explained his choice, there was no need to hammer on about it, mister 5 posts.
 
Last edited:

tprelog

Patron
Joined
Mar 2, 2016
Messages
297

Norumen

Dabbler
Joined
Dec 23, 2020
Messages
18
I am also trying to figure out how to install a Homeassistant VM on TrueNAS. The problem for me is converting the qcow2 format to whatever TrueNAS needs. Hoped this thread had the answer...
 

PackElend

Explorer
Joined
Sep 23, 2020
Messages
60
The problem for me is converting the qcow2 format to whatever TrueNAS needs. Hoped this thread had the answer...
Have you read Alternative way of running HassOS (full OS) on FreeNAS (without iocage or Docker) - Share your Projects! - Home Assistant Community (home-assistant.io) as that procedure does not require a qcow2 VM disk


I dropped a note in The future of the Home Assistant Community plugin · Discussion #28 · tprelog/iocage-homeassistant (github.com) to make them aware of what is said here.


@tprelog thx for keeping the plugin alive is really very highly appreciated to keep on putting effort into this. I dare to says as soon as SCALE is released, things will be clearer on what is still needed :smile:
 

tprelog

Patron
Joined
Mar 2, 2016
Messages
297
So The future of the Home Assistant Community plugin #28 could be closed by what you just said, couldn't it?

Well, like @ornias said... yes and no

The context should at least be changed. The question for the future now is; Do we just maintain the plugin as is, or build out some remaining ideas I have. For example, if I update the console menu, it's silly you need to run a full Plugin UPDATE, just for one file. I thought about including some of the files from the overlay in a zip release, that could be simply downloaded and applied right from Home Assistant.

because it does showcase the future of plugins in general.

But there is still still one key piece that is missing. That is the ability to add an external mount point before you press the install button. IMO, that is the biggest downfall for Plugins on CORE. I should not need a wiki page to explain how to safely store configuration outside of the plugin-jail. I mean let me be honest - I think in general, iocage plugins on CORE have improved, but still carry some bad stank from the old warden days. I think most experienced FreeNAS / TrueNAS users who do not need a wiki for help, have already passed over these plugins without second thought. Most opting to just use a regular jail instead. -- Seriously, I only know of ONE person who really knows their shit, and still chooses to use my plugin.

---

I might be reading this wrong, so I apologize in advance if I'm saying something you already know

hx for keeping the plugin alive is really very highly appreciated to keep on putting effort into this. I dare to says as soon as SCALE is released, things will be clearer on what is still needed

Just to be clear - The Home Assistant Community Plugin is only TrueNAS CORE and it is not coming to SCALE

Home Assistant has added a new installation page to help with names

Home Assistant offers four different installation methods. We recommend one of the following two:

  • Home Assistant Operating System: Minimal Operating System optimized to power Home Assistant. Comes with Supervisor to manage Home Assistant Core and add-ons pre-installed. Recommended installation type.
  • Home Assistant Container: Standalone container-based installation of Home Assistant Core (e.g. Docker).
In addition there are two installation methods available for experienced users:

  • Home Assistant Supervised: Manual installation of the Supervisor.
  • Home Assistant Core: Manual installation using a Python virtual environment.

Home Assistant - TrueNAS CORE Community Plugin
- installs Home Assistant Core

Home Assistant - TrueNAS SCALE Community TrueCharts App
- installs Home Assistant Container

---

I have nothing against Home Assistant Operating System and the convenience it provides but I just can't get my head wrapped around running it from FreeNAS / TrueNAS - It just seems like to many layers, installing an appliance software (say TrueNAS) to run a hypervisor (the VM) to run an appliance software (HA-OS) to run another layer of containerization (Home Assistant and the add-ons themselves)
 

dquercus

Dabbler
Joined
Dec 31, 2020
Messages
13
I am also trying to figure out how to install a Homeassistant VM on TrueNAS. The problem for me is converting the qcow2 format to whatever TrueNAS needs. Hoped this thread had the answer...

This seems to work for me but I didn't have much time to test it yet:

Code:
sudo qemu-img convert -O raw hassos_ova-5.11.qcow2 /dev/zvol/main/HasOSS-f11jpf
taken from here

where I use the zvol created for the VM.
 

FlangeMonkey

Contributor
Joined
Dec 6, 2012
Messages
111
I apologize in advance, I've not read all posts here, I got lost in some form of miss understanding, so I skipped it... Anyway...

For Home Assistant, I'm sure it's been stated that there are a couple of flavors, which adds confusion and it's changed yet again. Myself, I would not recommend the HA OS, my experience wasn't fulfilling. I'd recommend going with what they now call "Supervised". Install Debian, which is supported by HA (so you don't need to mess with images), install their dependencies and run the install script. This is the best experience for me.


Hope this helps.
 

Norumen

Dabbler
Joined
Dec 23, 2020
Messages
18
Hi everyone.
I gave up this in February. I am now back and wondering if someone has a good explanation on how to install Hom Assistant Operating System as a KVM VM in TrueNAS SCALE. I know how to setup a VM. The problem is how I get the qcow2 over to the VMs zvol.
 

warllo

Contributor
Joined
Nov 22, 2012
Messages
117
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
 

Kosygor

Dabbler
Joined
Sep 28, 2021
Messages
18
I apologize in advance, I've not read all posts here, I got lost in some form of miss understanding, so I skipped it... Anyway...

For Home Assistant, I'm sure it's been stated that there are a couple of flavors, which adds confusion and it's changed yet again. Myself, I would not recommend the HA OS, my experience wasn't fulfilling. I'd recommend going with what they now call "Supervised". Install Debian, which is supported by HA (so you don't need to mess with images), install their dependencies and run the install script. This is the best experience for me.


Hope this helps.
To make this easier for beginners:
Installation manual on Debian 11
Bypass Shell
 

RidJuan

Cadet
Joined
Sep 6, 2021
Messages
3
@Norumen
Here is what I used.

Make sure to use a location on your data pool as a working directory, don't use any system directory.

Use wget to get the ova file:
Code:
wget https://github.com/home-assistant/operating-system/releases/download/6.6/haos_ova-6.6.ova

Extract the ova file using tar:
Code:
tar -xvf haos_ova-6.6.ova

Convert the vmdk to a raw image file, I had to use the full working directory for the source:
Code:
qemu-img convert -f vmdk -O raw /must include full working path/home-assistant.vmdk hassos.img

Create a Zvol using the TrueNas Scale GUI - Be sure to make it large enough for dd to complete, I used 35 Gib.

Use dd to write the image file to your zvol
Code:
dd if=hassos.img of=/dev/pool/yourzvolhere

Create a virtual machine using the gui and attach the zvol you just created as the hdd

Enjoy Hassos. Hope this helps.
Thank you very much! This worked perfectly (I just updated the link with version 7.0)

For anyone wondering be patient with the dd command, I think it took around 8 minutes to complete.
 
Top