USB Passthrough to LXC that will survive a reboot

n7qnm

New Member
Jan 4, 2024
12
0
1
Prosser, WA, USA
www.n7qnm.net
I'm trying to run a Software Defined Radio USB dongle and the program RTL_433 that reads it - I've managed to get a passthrough set up with these lines in /etc/lxc/<vm>.config:
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/003/002 dev/bus/usb/003/002 none bind,optional,create=file

That's great; but it won't survive a reboot of the node where the dongle is connected.

Worst case, the USB ids change, BEST case "only" the permissions on the /dev entry on the host nodes change.

is there a way to do this?

Thanks!
 
Usually, one would pass the dev-node(s) that are created by the driver (which are stable) on the Proxmox host, instead of /dev/usb/...
I don't know which files those are (since I only know them for my USB TV-tuner) but then you can also use the new way of passing dev-nodes via the Proxmox GUI (which makes dealing with users/groups/permissions much easier). I would compare the /dev directory tree before and after inserting the USB device.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!