LXC USB Passthrough

droidus

Member
Apr 5, 2020
107
2
23
34
I am trying to pass through a USB-attached device to my server, through proxmox, to a LXC container. Before doing anything, I did a lsusb, and saw the device, but knew that as is, I probably would not be able to interact with it. I found some instructions on how to proceed from here. Here is what I followed: https://medium.com/@konpat/usb-passthrough-to-an-lxc-proxmox-15482674f11d. When I check to see if the program can contact the usb device, it still is unable to contact it. Is there something else I must do?
 
hi,
once you passthrough the device (like in that post for example), you should be able to see the device in /dev/ or wherever you mounted it (inside the container).

from there you should be able to interact with this device normally.

When I check to see if the program can contact the usb device, it still is unable to contact it.
which program? how do you try this?

just to make sure you can post your pct config CTID output for that container to see if anything is wrong
 
This is the program: https://www.cyberpowersystems.com/product/software/power-panel-personal/powerpanel-for-linux/
systemctl start pwrstatd.service
then
pwrstat -status
which shows:
"The UPS information shows as following:
Current UPS status:
State........................ Lost Communication"

arch: amd64
cores: 2
hostname: cyberpower-panel
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,gw=<ip>,hwaddr=<mac>,ip=<ip>,type=veth
onboot: 1
ostype: ubuntu
rootfs: local-lvm:vm-116-disk-0,size=8G
swap: 1024
unprivileged: 1
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/002/002 dev/bus/usb/002/002 none bind,optional,create=file
 
hiddev doesn't seem to exist in the lxc container.
From the proxmox-side of things, it should be working then?

EDIT: I may have discovered my problem. In the pwrstatd.log file, I see this error message: "
The H2C device can't be used, because the linux system does not support libusb or libusb version is too old."
 
Last edited:
have you asked the vendor about this? is it even supported to work in containers?
 

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!