it-wiki:proxmox:usb_passthrough
Dies ist eine alte Version des Dokuments!
USB Device an einen Container durchreichen
(root@n1-pve-cluster marko) > lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Mich interessirt
Future Technology Devices International, Ltd FT232 Serial (UART) IC
Daher nehme ich als Major Nummer 003 und als Minor Nummer die 002
Nun schauen wir uns den dazugehörigen Verzeichnisbaum an
(root@n1-pve-cluster marko) > ls -l /dev/bus/usb/003/002 crw-rw-r-- 1 root root 189, 257 Feb 24 09:14 /dev/bus/usb/003/002
Für mich relevant sind die zwei Zahlen 189 und 257. Diese benötigen wir für unsere Container Konfiguration.
Nun bearbeiten wir das Container Configfile. Dafür liste ich mir alle Container von der Node auf und schaue mir dir Container ID meines Containers an welcher das USB Device bekommen soll. (p-fhem02)
(root@n1-pve-cluster marko) > pct list VMID Status Lock Name 201 running p-fhem02 202 stopped p-printserver 203 running p-psql01 208 running p-gitserver 213 running p-nextcloud
Das passende Konfigfile editiere ich nun
vim /etc/pve/lxc/201.conf <code> Und passen die entsprechenden 2 Zahlen an <code> lxc.cgroup.devices.allow: c 188: rwm lxc.mount.entry: /dev/SIGNALduino dev/SIGNALduino none bind,optional,create=file
(root@n1-pve-cluster marko) > udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1
vim /etc/udev/rules.d/98-RFXtrx-CUL.rules SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", SYMLINK+="RFXCOM_RFXtrx433_A1XEABQO", MODE="0666", GROUP="dialout"
it-wiki/proxmox/usb_passthrough.1583395298.txt.gz · Zuletzt geändert: von marko