Greetings,
Goal: to run a fully featured OpenWRT within LXC with USB 5G modem as the uplink
Env: an up-to-date latest Proxmox (Debian 12)
The issue: I am unable to properly/completely pass USB modem to the container.
I am aware this is a solely LXC-related forum, but I had very little luck finding any resources to help me solve this issue.
My current Proxmox LXC container config is as follows:
arch: amd64
cores: 2
features: mknod=1
hostname: openwrt
memory: 1024
net0: name=eth0,bridge=vmbr0,hwaddr=BC:24:11:0E:D1:B1,type=veth
ostype: unmanaged
rootfs: local-lvm:vm-666-disk-0,size=8G
swap: 0
tty: 1
unprivileged: 1
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 65536
lxc.mount.auto: proc:mixed sys:rw cgroup:mixed
lxc.cgroup2.devices.allow: c 180:* rwm
lxc.cgroup2.devices.allow: c 188:* rwm
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB2 dev/ttyUSB2 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB3 dev/ttyUSB3 none bind,optional,create=file
lxc.mount.entry: /dev/cdc-wdm0 dev/cdc-wdm0 none bind,optional,create=file
lxc.mount.entry: /sys/devices/pci0000:00/0000:00:13.0/ sys/devices/pci0000:00/0000:00:13.0/ none bind,optional,create=dir
lxc.net.1.name: wwan0
lxc.net.1.type: phys
lxc.net.1.link: wwan0
I am aware it’s a mixed bag of different options, but I kept adding to the configuration, seeing whether anything works. This config requires me also to add o+rw
to abovementioned /dev
entries (to be replaced with an appropriate udev
rule once I have any results)
I’ve also tried using ArchLinux container with pretty much identical setup - while the devices are visible within the container, I can talk to the modem (and the ISP) using qmicli
but ModemManager
says that there are no modems detected.
Please advise. What am I missing? It feels I’m very close to the soluion, but I lack expertise with LXC and its configurations.
Resources I used so far:
https://lists.linuxcontainers.org/pipermail/lxc-users/2020-September/015337.html
https://forum.turris.cz/t/lxc-container-and-attach-usb-devices/4412/18
https://gist.github.com/crundberg/a77b22de856e92a7e14c81f40e7a74bd
https://forum.proxmox.com/threads/p...containers-in-proxmox-7-2.109981/#post-601753
https://gist.github.com/dragonfire1119/f3acd42414abfff762d2dad5e50f7cc6
https://forum.proxmox.com/threads/h...rsion-of-openwrt-and-run-it-on-proxmox.64786/
https://openwrt.org/docs/guide-user/virtualization/lxc#upgrading_to_the_latest_release