Installing HAOS in a VM on TrueNAS SCALE

Ok, i didn’t see your post before :slight_smile:
If you’ll have any new ideas please share it.

1 Like

Please still try the command to see if works on your system and kindly report back.

Also can say what version of SCALE you are using and what controller type you are trying for the ConBee II? It seems like USB passthrough is hit or miss but we don’t have enough information narrow the issue.

My system version is TrueNAS-SCALE-22.12.1 and i try qume-xhci and nec-xhci controller and both didn’t work and of corse i typed the command into cli shell

1 Like

I’ve spent a few hours trying to get the ConBee II working to no avail - At this point, I don’t think the issue is TrueNAS-related but something either with the ConBee II itself or a bug in KVM.

Here’s some reference to this issue reported on both Ubuntu and Debian host here and here

I also installed virt-manager with QEMU/KVM on my desktop (running Arch Linux), created a VM with HAOS, and tried adding the ConBee II - I’m getting the same error as on Scale.

Also of note - I dug up my old NORTEK HUSBZB-1 to test as well. I’m happy to say it shows up / works in my HAOS VM as expected (no module blacklist required)


EDIT: I just pre-ordered (3rd batch) a sky connect to test as well.

EDIT 2: I tried HAOS in VirtualBox on my desktop and the ConBee II is working there. So this seems to be something with KVM. But only with certain devices?!

I don’t think it’s a general problem. I had ha vm on a proxmox server. There it works.
Have a skyconnect and give it a try, but the skyconnect work’s in the past not so fine with zigbee2mqtt

1 Like

fyi the skyconnect work’s

1 Like

That’s great news! Did it simply work after you set up the passthrough in TrueNAS? Did you need any extra steps like blacklisting a kernel module?

Will you share which USB controller type you have selected in TrueNAS?

Thanks

No only passthrough and add it to zigbee2mqtt

pass

1 Like

This morning, I sorta got the ConBee II working…

image

Credit to the following thread…

I’m not sure how useable this will be on TrueNAS but it does work. I don’t use ZigBee myself but I can write a little script someone can use if they want to try it.


:information_source: Please see the next post for another solution

2 Likes

your script is really, really cool. i’m really new to TNS (and kinda new to HA now that i think about it)…

anyway, i i kinda stumbled on a way to do it without having to use a script. disclaimer: i don’t really know how i would’ve even gotten a script to run in TrueNAS Scale…i barely understand SSH to begin with

anyway, here’s what I did:

  1. in the TrueNAS Scale shell, run:
    ls /dev/serial*


    note the output at the bottom: pci-000…
    *if you aren’t seeing something like the above, see edit below

  2. In TrueNAS Scale, go to Virtualization → VM → Devices

  3. Add

  4. select: Type: PCI Passthrough Device
    From the PCI Passthrough Device, pick the one you noted earlier (will probably be something different for you, but here’s what it looked like for me)

    • Not sure if the order number (1002, 1003, 04, etc.) matters.
    • If it does, try setting the Conbee to start up before the DISK
      (note: I tried both ways, it didn’t matter for me either way)
      image
  5. this is what my thing ended up looking like:

  6. This next part is really important:
    Power Off the VM (don’t just Restart it via HA, actually shut it down from TrueNAS Scale’s VM management portal).
    image

  7. Then Start it.
    image

  8. profit
    image

edit:
i pulled a graphics card out of the machine that i wasn’t going to be using on there anymore and the ConBee passthrough broke. fortunately, i documented what i had to do to get it working :slight_smile:
unfortunately, when i was running the ls /dev/serial* command through TNS’s Shell, it wasn’t outputting anything anymore for some reason.

image
super annoying.

so, if for some reason you’re seeing something like that (e.g., nothing?), then do this:

ls /dev/serial/by-id
image

ls /dev/serial/by-path
image

ta-da! now I (& maybe one of you?) will know what to passthrough again!

5 Likes

Thank you for sharing! This is way better (correctness and convenience) than using a script. The only thing I would change is to recommend using the Stop button instead of Power Off.

My understanding is that Stop should issue a proper shutdown of the VM, while Power Off is like ripping the plug from wall.

1 Like

thanks for the heads up–good to know

Thanks @troy!

This worked for me using:
TrueNAS Scale 22.12.1
Sonoff Zigbee 3.0 USB Dongle Plus

  • USB Passthrough Device
  • Controller Type: qemu-xhci
  • Device: usb_1_11 CP210x UART Bridge (Silicon Labs)
  • Device Order: 1002
2 Likes

Hi everyone, sorry if my message comes out of this thread but it very close.

I trying configure Wi-Fi onboard wi-fi inside HAOS. Inside TrueNas i make PCI Passthru with Wi-Fi mobo but HAOS doesn’t found it. What possible to do with it?
image

Hi @NAGL95 - I’m not sure if what your trying to do will be supported, and it will undoubtedly be an edge case if it is. The usual response for any server setup is, don’t use WiFi. I don’t want to discourage you, but finding someone successfully using WiFi as the primary connection to Home Assistant may be challenging.

I noticed you made s separate post several days ago, but still no response. I would also try asking on Discord if you’re a member there. First, you should confirm if what you want to do is possible in HAOS.

Sorry I can’t be more helpful with your issue.

I don’t know if this is the right thread.

But have someone the problem, if the vm start/restart,that the addons where not loaded?

I’m not sure @daschmidt - Please confirm that each add-on has Start on boot enabled.

image

Thank you so much for this writeup, this really helped me solve an issue with my VM on Truenas.
In case anyone else is having similar issues to me I will describe the issues I was having. I created my Home Assistant VM on Truenas and moved my Home Assistant instance without understanding all of the settings. My VM seemed to be working fine but I was having some trouble with some add ons and the HomeKit integration. My AirSonos add on would stop working after someone tried to play music on a speaker. I have several HomeKit bridges configured and when I reconfigured one of them I was no longer able to add it to the Home app. This was really driving me crazy and all signs seemed to be pointing to some type of network issue. After reading this post I created a test installation and by turning on “Trust Guest Filters” I was able to use AirSonos and connect to HomeKit bridges. I did not create a bridge NIC but did use the VirtIO adapter type.
After recreating my VM using this posts guidelines everything seems to be working so far. Hopefully someone else having issues similar to me can benefit from this great post.
Thanks

1 Like

the problem is, that the Addon’s in the submenu is not listet settings->addons.

I got this error ever time i try to pass through my conbee 2

group 10 is not viable
Please ensure all devices within the iommu_group are bound to their vfio bus driver.