Nut Server LXC USB Passthrough

TheBossUT

New Member
Oct 25, 2023
1
0
1
Hi Community,
I could use some help, I installed NUT-CLIENT, NUT-SERVER, NUT In a unprivileged LXC and then passed the USB to NUT. I am having issues getting the driver to work and I think the issue is due to LXC

This is the USB device I am trying to pass
crw-rw-r-- 1 root root 189, 257 Oct 24 03:46 /dev/bus/usb/003/002 (USB Port on a Tripplite 4U UPS)


this is in my LXC config
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/003/002 dev/bus/usb/003/002 none bind,optional,create=file

Inside my NUT LXC
root@NUT:~# nut-scanner -U
SNMP library not found. SNMP search disabled.
Neon library not found. XML search disabled.
IPMI library not found. IPMI search disabled.
Scanning USB bus.
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "09AE"
productid = "3014"
bus = "003"

when I run upsdrvctl start
Output is
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Can't claim USB device [09ae:3014]: could not detach kernel driver from interface 0: Operation not permitted
Driver failed to start (exit status=1)

I think NUT needs Root or this file needs permissions changed.
root@NUT:~# ls -al /dev/bus/usb/003/002
crw-rw-r-- 1 nobody nogroup 189, 257 Oct 24 07:46 /dev/bus/usb/003/002

any help much appreciated Really enjoying Proxmox been a Hyper-V person.

after reading more this a issue with the Guest not able to read / write permissions to the usb device.

Thanks
 
Last edited:
Can't claim USB device [09ae:3014]: could not detach kernel driver from interface 0: Operation not permitted
This is not possible from the guest. Try to find out what driver it is and manually unload it on your PVE host.

Maybe just go with a QEMU/KVM VM and passthrough the device directly.
 

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!