Installing HAOS in a VM on TrueNAS SCALE

I’m a bit confused myself… Please share how you got to this login.

For example, did you click the VM display button?

I’ve never experienced any kind of lag or delay but I only use 5 addons.

I really don’t have any idea. Maybe some things to check might be:
How did you configure the CPU for your VM?
How much RAM did you give the VM?
Does the ZPOOL have enough free space?
Is your ZVOL getting full?

Just making some guesses about things that might affect performance.

Т


his is what happens when i open the display.

and here is my VM settings

And here is my VM settings. I did change them before was like you suggested.
Here is ZVOL settings

OK, thanks for the screenshots. I see a problem - notice how only 588MiB of data is written.
image

It should use more space than this (after it starts the first time). It looks like HAOS has failed to expand correctly. You may need to try again.

I just created a test VM to grab some screenshots. The first screenshot is right after running the qemu-img convert command. Notice that the data written is around 574 MiB - right now, this looks good because I have not started the VM yet.

Next, I’ll start the VM for the first time. I give HAOS a few minutes to start and recheck ZVOL details. Notice the data written has increased to 3 GiB. We want to see this as it indicates successful file system expansion!


I can see here you have tried this a few times.

Let’s delete ALL of those downloads and extracted images, then try again.

rm haos_ova-10.5.*

Your ZVOL size looks good, so we can just overwrite the existing install with a fresh one. You can still use the existing VM as well, just make sure it’s stopped before moving on.

wget https://github.com/home-assistant/operating-system/releases/download/10.5/haos_ova-10.5.qcow2.xz
unxz haos_ova-10.5.qcow2.xz
qemu-img convert -O raw haos_ova-10.5.qcow2 /dev/zvol/Proba/home_vm1

If you have any errors, stop, and please share the output from all the commands you have run to that point. After running qemu-img convert, check your ZVOL details, and you should have around 574 MiB of data written. If that looks good, start the VM and give it an extra minute or two for the initial bootup. Check your ZVOL details a final time and hopefully, you see around 3 GiB of data written.

Good luck!

EDIT: Looking at your VM setting - I also recommend the following changes.

There’s nothing wrong with having loads of CPU HAOS, but unless you know it’s needed, you can also reduce the number of threads to free up resources for TrueNAS.

Thank you so much. It work, so i did it with sudo and change every setting like you suggested.

.

Now is working, but I can’t install Supervisor and HAES

image
Here is what i get when i try to download HACS

Sorry i think supervisor is working but i cant instal HACS.

So the supervisor comes installed with HAOS; there is nothing to do there. As for HACS, I see in the first screenshot (I assume that’s the VM display) you can ping google

And I assume this second screenshot is using the ssh add-on. Can you ping google while using this addon? I’m not sure how helpful I can be in resolving DNS issues, but we can certainly give it a try.

Another way to get HACS installed is by using the Samba add-on. Which you could use to access the Home Assistant config directory from another computer. Installing HACS is simply a matter of unzipping the folder and coping to /config/custom_components/hacs (You may need to create the custom_components directory if it does not already exist)

The latest release of HACS can be downloaded from GitHub - Look for hacs.zip


i did instal the plugin but i cant connect to windows and i dont see the files in VSC

i don’t know if there is some connection with networking but i don’t see the problem because i can ping google.com.

Thanks Troy. VM has 2 vCPUs, 1 core, 2 threads, 6GB RAM. ZPOOL and ZVOL are both under 20%. I am running the bridge via a lagg interface. I might try with a single interface to rule out network issues.

Just wanted to say thanks for this guide!

New to TrueNAS and this was super useful. I have a Conbee II and wasn’t able to pass through my PCI ports to the VM as my CPU / Mobo doesn’t allow virtualisation so I ended up pulling Mosquito and Zigbee2MQTT into their own container, and creating a network bridge (so the VM and containers could talk).

Great learning experience and will considering pulling HASS out of a VM into a container in the future too :slight_smile:

1 Like

Hi all… new here… Imalso very new to Y
VMs and himeassistant as well… I’ve gotten to the long where I see the homeassistant command-line. But when I try and log in from the web address nothing happenes. I tried the ping command and when I hit enter ping is written twice and says there’s no such command. I typing ping only once

From this screenshot, you need to login first, then you should be able to run ping google.com

So I’ve been at this whole thing for about 6 hours troy and I’m throwing in the towel without your help :confused: I’ve read through this entire page and cannot find my solution. I get the UEFI Interactive Shell screen for my display. I’ve tried to convert the image to the /dev/zvol/Main\ Data/localhomeos and it says incorrect file directory it doesn’t exist, as well as just /dev/Main\ Data/localhomeos and the only one that actually works in a sense of not bringing back an directory doesn’t exists is when the path is /mnt/Main\ Data/localhomeos the other variable in my situation is the fact my overally pools name is Main Data and i messed up when I created my TrueNas installation. But I’ve learned through the shell that the \ inbetween solves that issue when doing cd /mnt/Main\ Data/localhomeos so I don’t think thats the issue

Hi @officialxndr, sorry to hear you’re having trouble.

Are you sure you created a ZVOL for HAOS - I wonder if you created a dataset by mistake. Please share screenshots of the Zvol Details and Zvol Space Management for localhomeos.

I think you made a dataset. It is not possible to cd into a ZVOL


Off topic here, but it is possible to rename your zpool without destroying it.

You can also use quotes " like this: cd "/mnt/Main Data/localhomeos"

UPDATE
I started completely from scratch with a new zVol and VM and it seems to have worked. The only variable that was different was using " " and a + inbetween my dataset that has a space in it lmao so leaving this here for future seekers of knowledge

Thank you Troy! for all you’re doing and the shout with the tip about the " " saved my life haha

2 Likes

Hello! One issue I am running into is after having the VM running with Home Assistant correctly, I can’t access the url as I would be expecting to


Not sure if this is something you have seen before, but unsure as to why this would be a problem if I am able to ping the website from inside the VM, any help in the right direction would be appreciated. Thank you in advance for your time!