|1. Plug USB device|
|Bus 004 Device 005: ID 0658:0200 Sigma Designs, Inc.|
|2. Take a look of device|
|root@proxmox01:~# ls -l /dev/bus/usb/004/005|
|crw-rw-r-- 1 root root 189, 388 Oct 25 16:19 /dev/bus/usb/004/005|
|Take note of ID (example: 189, 388)|
|3. Edit lxc configuration|
|root@proxmox01:~# nano /etc/pve/nodes/proxmox01/lxc/101.conf|
|lxc.cgroup.devices.allow: c 189:388 rwm|
|lxc.mount.entry: /dev/bus/usb/004/005 dev/bus/usb/004/005 none bind,optional,create=file|
A little bit more detailed version of the same:
5. Now, by taking the Bus and Device from the previous output.
i followed the instructions above and my will bind with the CT just fine. But if I happen to shutdown or restart the Host for any reason the device number will change to something different. Then I need to edit the "conf" file with the new device number and also allow permission to the Host with "chmod o+rw /dev/ttyACM0" again to get it working. Is this normal for this to happen?
Wonder if a cron job could be done to update the device ID on a restart of the Host to solve this?
Hey, I did it little bit different way and it's working with persistent path using udev rules...
Get USB idProduct and idVendor:
Create udev rule:
Reload and trigger udev:
Get cgroup config:
Update your LXC config:
On your LXC container:
In my case I'm using this modem with smstools, so in config I pointed smstools to /dev/sms.
It works like a charm ;-)
Since I found some info here useful, and this was linked from the proxmox forum I'm just gonna raw-dump some info on how I went about adding a USB camera to a Xpenology NAS VM running Surveillance Station.
Use USB webcam in Surveillance Station, without installing additional packages in the Synology NAS.
Although there is a way to use Camera via the Linux installation in the Synology NAS VM the method of doing so is not up-to-date and adds a un-contained dependency to the solution. - If you want to go this route see here: https://community.synology.com/enu/forum/3/post/119524
The reason I don't want to use it is that I never want to have the lack of current webcam drivers in the NAS VM preventing me from an upgrade of the NAS OS.
Host: Proxmox 6.2
Assign webcam consistent linux device name so any USB port can be used
Camera: Logitech C270
Connect camera to a USB port.
add camera to LXC container
^^^ not sure if the USB mount entry is really needed...
camera streaming software
add camera to synology
Brand: [user define]