Have you tried using a bridge?
TrueNAS Scale: Setting up a Static IP and Bridge // Access NAS host from VM
Have you tried using a bridge?
TrueNAS Scale: Setting up a Static IP and Bridge // Access NAS host from VM
Thanks for the answer. I will try to bridge a network tonight.
Probably need to plug in a second Ethernet-cable because
I have a bunch of apps running attached to the TrueNAS IP.
Unset the apps pool. Then re-set it after making the change.
I have set this up pretty much exactly as described but for some reason ngnix proxy manager does not proxy my domain to the VM from outside my lan.
Other apps on truenas work with the same proxy config. (Although they are not in a VM)
I have also added trusted proxies to my configuration.yaml
I have NPM running as an app in truenas scale and several other services are proxied properly (immich, nextcloud ā¦)
HAOS is running in a VM as per this guide.
I have bridge setup as per the video Stux created. (br0 is attached to my HAOS vm)
I have cloudflare as a name server for my domain and all cloudflare IPs as trusted proxies in the http directive of the HA configuration.yaml. Also the IP of the reverse proxy is in this trusted proxies list and the internal docker network.
I have 443 and 80 forwarded from my router to the NPM proxy ports.
I have my HA host in NPM configured to use websockets and is on the same subnet as HAOS vm.
each machine is reachable from inside the local network.
HAOS works with IP address.
There are 504 timeout errors in NPM, but the log seems to show the request comes in and is sent to the correct internal IP address.
So, I am thinking I need some sort of ingress manager to allow traffic into the truenas kubernetes cluster?
Anyway, I setup a cloudflare tunnel, and its working good enough for me, I would prefer to manage everything in nginx proxy manager but without putting that in its own vm and reconfiguring all other services in the cluster I dont think it will work, so this is least effort for me
Hi everyone, I donāt know if this might help someone, but I solved the passthrough problem with the Conbee 2 like this:
root@nas:~# virsh -c qemu:///system?socket=/run/truenas_libvirt/libvirt-sock list
Id Name State
---------------------------------
7 3_HomeAssistant running
virsh -c qemu:///system?socket=/run/truenas_libvirt/libvirt-sock edit 3_HomeAssistant
Add this XML snippet:<serial type='dev'>
<source path='/dev/ttyACM0'/>
<target type='isa-serial' port='1'>
<model name='isa-serial'/>
</target>
</serial>
virsh -c qemu:///system?socket=/run/truenas_libvirt/libvirt-sock autostart 3_HomeAssistant
I hope this helps someone!
Yeah, I just start my vms via a postinit startup script, that was I can start things in the order I want (apps & vm order matters for all my stuff). For one of the VMs which wonāt start anyway (Mac OSX) from the UI, it starts fine from the command line via a slightly modified libvirt xml config file. Same idea, different implementation.
Is the missing feature not being able to pass-through a serial port/device?
Is this a possible feature request?
Thereās something different about the Conbee 2. The problem does not occur on my adapter or many others. My Zwave device comes in as /dev/ttyUSB0, which I do not need to fudge or pass but maybe thatās due to whatever is included in the vm by default. For my Zooz zwave device, I simply pass through the usb device and it works.
I donāt fully understand the issue with the Conbee 2. Itās the only Z-Wave / ZigBee adapter I know of that doesnāt work with SCALEās USB passthrough.
I have the Aeotec Gen 5 that shows up as /dev/ttyACM0
, and as @sfatula mentions with his Zooz device, it simply works with USB passthrough.
Iāve never pursued the Conbee issue any further because I donāt fully understand whatās happening. Is USB serial device the correct terminology to use when reporting an issue or creating a feature request? Iāve been under the impression that all these Z-Wave / ZigBee USB hubs worked the same.
In the past, Iāve used the following in my XML
<target type="usb-serial" port="1">
<model name="usb-serial"/>
</target>
Iām curious @andrea-mattioli - Have you tried restarting your TrueNAS - Do the changes to your XML survive a reboot? I wonder if theyāll survive an update.
Previously, Iāve added the XML using this init script, but I can rewrite that to enable the VM to autostart using virsh
- The only issue I see with using <source path='/dev/ttyACM0'/>
is that the path can change. In the script I previously mentioned, I used the /dev/serial/by-id/...
path, which was detected automagically.
Yes, certainly. I performed all the reboot tests on TrueNAS, and the Home Assistant VM boots correctly every time with the modified XML. Of course, I removed the autostart flag from the TrueNAS GUI and managed it directly through libvirt.
Unfortunately, the Conbee 2 is a very strange device. I havenāt delved deeply into the USB passthrough issue, but I know for certain that once enabled on the hypervisor, it continuously disconnects and reconnects the serial port. I have no issues using the device directly, since thatās the only one I have!
I only installed TrueNAS yesterday and am not very familiar with it. I needed to test the CSI driver for OpenShift, and on that occasion, I migrated all my homelab workloads, including Home Assistant, from an old HP Microserver with Fedora to a Gen10 Microserver with TrueNAS.
Yeah, looking at dumpxml for my HA vm, I see the relevant section for my Zooz Zwave, which is:
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x10c4'/>
<product id='0xea60'/>
<address bus='3' device='2'/>
</source>
<alias name='hostdev0'/>
<address type='usb' bus='1' port='1'/>
</hostdev>
But thereās no USB serial device or anything else related, and works fine. Never disconnects. I suspect itās more a non compliant implementation in their firmware. Yes, it may work on some systems, but thatās doesnāt mean itās has no bugs.
Iām trying to help someone in the Home Assistant forum install HAOS, and I could use some help, please. Theyāre getting stuck at the last step, and Iām at a complete loss with this one.
The error says No such file or directory
when trying to write to the ZVOL.
admin@truenas[~]$ qemu-img convert -O raw haos_ova-12.4.qcow2 /dev/zvol/APPLICATIONS/vm
qemu-img: /dev/zvol/APPLICATIONS/vm: error while converting raw: Could not create ā/dev/zvol/APPLICATIONS/vmā: No such file or directory
They have provided a screenshot of the ZVOL details, and as far as I can tell, the path is correct.
We have also tried using sudo
, but theyāre still getting the same error.
admin@truenas[~]$ sudo qemu-img convert -O raw haos_ova-12.4.qcow2 /dev/zvol/APPLICATIONS/vm
qemu-img: /dev/zvol/APPLICATIONS/vm: error while converting raw: Could not create ā/dev/zvol/APPLICATIONS/vmā: No such file or directory
Does anyone have any idea what going on here? I canāt see what Iām missing
Iāve seen the device fail to be constructed at the location, especially when under load.
I suspect if you ls
the location, you wonāt see the device.
Suggest a reboot.
Thank you @Stux - The ls
command gave us the missing clue. It turns out they have a space at the end of their APPLICATIONS
dataset name.
/dev/zvol/APPLICATIONS+/vm
This may have been not on purpose, but it amazes me how many times non Linux people pretty things up the way they want it with spaces or lack thereof and then wonder why it doesnāt work. And here comes yaml with Electric Eel!
Home Assistant users should already be familiar with Yaml, at least those of us whoāve been using it for a while
I noticed that as well, after looking at the output from their ls
command
I also learned that the zsh
shell seems to require the +
to fill the space, unlike bash
, which I believe works by using quotes.
zsh
/dev/zvol/APPLICATIONS+/vm
bash
"/dev/zvol/APPLICATIONS /vm"
Of course, there are escape characters as well, but I tend to stay away from those unless absolutely necessary.
Here is another solution, if you donāt have a problem using Conbee2 with HAOS connected via IP and not directly as USB device.
This is what I did:
I am not sure if it is the best solution, but it seems to work. Hope it helps
Did you manage to get this working, reaching the HA OS VM via nginx proxy manager?
I really thought that this would be easy to fix by creating a bridge and setting up the Letās Encrypt add-on in HA OS but neither of these have worked.
Strangely, there is no āuntrusted proxyā warning/errror message in the logs. Neither is there an error in the Nginx logs.