Try adding your usb device like this:
lxc config device add homeassistant ttyusb unix-char path=/dev/ttyACM0
Try adding your usb device like this:
lxc config device add homeassistant ttyusb unix-char path=/dev/ttyACM0
Figured its much simplier to just run Hass OS ā¦ and the Portainer Addon for my purposes.
Whenever I need anything I can simply pull the Image from Dockerhub and create an Container easily besides Homeassistant on the same Host.
Messing with LXD was a nice try but far from stable / complete ā¦ Homeassistant is moving much to fast for that so itās best to stick as close to their supported installations I guess.
Iād use their VM-Images next time instead If Iād want to run it on something more powerfull.
I got Home Assistant OS running in LXD without too much difficulty, and wrote up my notes here:
Hopefully thatās of help to anyone who finds this thread looking for a guide.
Very nice! I actually asked about this a month back and @tteck (famous for his proxmox setup repo) told me it was technically impossible, so I gave up and put HASS in a VM. I donāt see why LXD would be materially different than Proxmoxās implementation of base lxc.
You didnāt set that stuff up, but I see no reason why USB passthrough and nested docker (HASS OS āaddonsā are actually docker containers) wouldnāt work too.
Edit: Nevermind, youāre running a VM, not a container. Womp womp.
Iāve updated the title of the blog post to hopefully avoid future container vs VM confusion.
Totally my fault, you did say VM. I keep forgetting LXD does both lxc and VMs now. Used to run it myself before I moved to proxmox.
hey!
I am begginer in System Containers world and coming here with concept that I believe many of you been already thinking about, this is:
Simple saying, I like characteristic that LXC does require less resourcess.
This worked really well for me, despite my having no lxd experience.
My challenge now is that HA only has a bridged (NAT) network connection, and lxd wonāt allow port forwarding to VMs.
Does anyone have any suggestions? I feel like Iām missing something.
Do you mean you want to forward a port from your router to HA for external access? If so, all I think you need is for the HA VM to have its own IP address on your LAN, and the rest is a question of configuring your router. If the HA VM has a bridged-mode network connection, then it should have received its own IP address. I understand bridged-mode and NAT as being mutually exclusive - you are using either one or the other, not both.
Thanks Sean, I wasnāt at all clear enough in my question.
What I meant is that I want my lxd vm of haos to be visibly externally on the network so I can get to the web page from other machines, and I suspect it will help with device discovery.
Currently my VM has network access but only through the lxd bridge which does NAT to get out onto the network. It thus has an IP address that falls within the range allocated to the lxd controlled network, but is not visible outside the host it is running on.
The way Iād imagined making my haos VM visible on the network was to port forward the host machine ports to haos instance, but this apparently isnāt possible because the instance is a VM. This seems to be a limitation of lxd.
I suspect now my options are
Iām hoping thereās a better option though, and imagined that someone else may have solved this problem already.
Thanks again for your help, and for the great instructions for getting this far.
I donāt think we are on the same page regarding bridge mode vs NAT. I have HAOS running in an LXD VM that has got a real LAN IP address (10.0.0.206 as you can see in the screenshot in my blog post) via DHCP from my router. I did this by configuring bridge mode networking. There is no NAT happening in LXD or on the server itās running on, i.e., every container and VM gets its own IP address on the LAN.
I split out the steps I took to get bridge mode networking set up into its own blog post. Thereās a link in the blog post above, but hereās the direct link:
The first part covers covers configuring bridge networking as an alternative to macvlan.
Is that of any help?
Thanks Sean. I think youāre right, thereās something Iām not understanding about the lxd networking process, as my VM is only getting internal (lxd managed) IP addresses, and isnāt visible to my router. Iāll have a look at the link you sent.
Much appreciated