Hello,
I'm at my wits end.
I want to pass through a USB device (for instance my UPS is connected via USB and I have other devices like z-wave and zigbee as well).
This is what I do (and is according to proxmox manual and all tutorials out there):
Create a LXC container (debian 10 or ubuntu 20 doesnt matter).
In my proxmox shell to see my devices:
# lsusb
Bus 005 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
and:
# ls -al /dev/bus/usb/005/002
crw-rw-r-- 1 root root 189, 513 Jul 29 19:45 /dev/bus/usb/005/002
I go to my LXC with winscp and edit the file corresponding to my LXC ID:
/etc/pve/nodes/pve/lxc/112.conf
I add the following and save it:
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/005/002 dev/bus/usb/005/002 none bind,optional,create=file
I create a udev rule:
SUBSYSTEM=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", SYMLINK+="ups"
Restart of proxmox.
Start LXC and do lsusb in LXC shell:
Bus 005 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
I would think that the device is created in /dev/ups in my LXC or /dev/usb.
But there is only:
# ls /dev
bus console core fd full hugepages initctl log lxc mqueue null ptmx pts random shm stderr stdin stdout tty tty1 tty2 urandom zero
If I do this in proxmox shell then I can see usb. But it is empty
ls -l /dev/usb
total 0
crw------- 1 root root 180, 0 Jul 29 20:36 hiddev0
I'm sure it is something simple like permissions or something.
I'm not a Linux user from start.. but I am logged in as root in both proxmox shell as in the LXC.
Any ideas?
I'm at my wits end.
I want to pass through a USB device (for instance my UPS is connected via USB and I have other devices like z-wave and zigbee as well).
This is what I do (and is according to proxmox manual and all tutorials out there):
Create a LXC container (debian 10 or ubuntu 20 doesnt matter).
In my proxmox shell to see my devices:
# lsusb
Bus 005 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
and:
# ls -al /dev/bus/usb/005/002
crw-rw-r-- 1 root root 189, 513 Jul 29 19:45 /dev/bus/usb/005/002
I go to my LXC with winscp and edit the file corresponding to my LXC ID:
/etc/pve/nodes/pve/lxc/112.conf
I add the following and save it:
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/005/002 dev/bus/usb/005/002 none bind,optional,create=file
I create a udev rule:
SUBSYSTEM=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="0764", ATTRS{idProduct}=="0501", SYMLINK+="ups"
Restart of proxmox.
Start LXC and do lsusb in LXC shell:
Bus 005 Device 002: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
I would think that the device is created in /dev/ups in my LXC or /dev/usb.
But there is only:
# ls /dev
bus console core fd full hugepages initctl log lxc mqueue null ptmx pts random shm stderr stdin stdout tty tty1 tty2 urandom zero
If I do this in proxmox shell then I can see usb. But it is empty
ls -l /dev/usb
total 0
crw------- 1 root root 180, 0 Jul 29 20:36 hiddev0
I'm sure it is something simple like permissions or something.
I'm not a Linux user from start.. but I am logged in as root in both proxmox shell as in the LXC.
Any ideas?
Last edited: