I am passing a USB/Serial device /dev/ttyACM0 to the LXD container Ubuntu 18.04.
host /dev/ttyACM0 root:dialout
container: /dev/ttyACM0 root:root
sudo chown root:dialout /dev/ttyACM0 doesn’t retain permissions after reboot.
I have seen this post and @huru2000 was trying to connect a device that I am trying but G5. I was able to connect it but my problem is this device permissions.
Thank you so much for pointing me in the right direction.
lxc config device add mycontainer ttyACM0 unix-char mode=0666 gid=20 path=/dev/ttyACM0 did the trick.
(I could leave a default mode=0660 and use only gid=20 (dialout), but 0666 is a peace of mind)
It is a steep learning curve.
By the way, how can I add multiple lxc config set mycontainer raw.lxc "lxc.cgroup.devices.allow ...
lxc config show --expanded mycontainer lists only one lxc.cgroup.devices.allow