Edit:
Solved. The correct config is:
lxc.mount.entry = /dev/ttyS0 dev/ttyS0 none bind,create=file 0 0
I get this error when i try to passthrough /dev/ttyS0:
lxc-start: tksuite: conf.c: mount_entry: 1854 No such file or directory - Failed to mount "/dev/ttyS0" on "/usr/lib/lxc/rootfs/dev/ttyS0"
Container config:
lxc.cgroup.devices.allow = c 4:64 rwm
lxc.mount.entry = /dev/ttyS0 dev/ttyS0 none bind 0 0
Host:
$ ls -l /dev/ttyS0
crw------- 1 root root 4, 64 May 15 00:27 /dev/ttyS0
I get this error in the log whenever i start the container. Not sure if its related.
lxc-start tksuite 20180514223638.359 ERROR lxc_utils - utils.c:safe_mount:1707 - No such file or directory - Failed to mount /usr/lib/lxc/rootfs/proc/tty onto /usr/lib/lxc/rootfs/proc/sys/net
I can add the device with ‘lxc-device -n tksuite add /dev/ttyS0’. Not sure if its accessible though. It didn’t respond on a first test.
How is it meant to be passed properly via config (to an unprivileged container in the end)? Does it need any sys_caps to access (rawio or sth)? Alpine template config revokes some of them.
Alpine/edge privileged (for now)
lxc-start --version = v2.1.1
kernel 4.14.37