Hello,
Just spend Hours trying tho make apcupsd run in a LXC.
I've an APC USB UPS connected on the host
I've passed the usb to the LXC this way in the LXC conf:
Code:
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/001 dev/bus/usb/001 none bind,optional,create=dir
and run this on the Host:
chmod o+rw /dev/bus/usb/001
and/or
chmod o+rw /dev/bus/usb/001/010
This is the result of udevadm info /dev/bus/usb/001/010 in the host
Code:
udevadm info /dev/bus/usb/001/010
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6
N: bus/usb/001/010
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6
E: DEVNAME=/dev/bus/usb/001/010
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=51d/2/106
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=010
E: MAJOR=189
E: MINOR=9
E: SUBSYSTEM=usb
E: USEC_INITIALIZED=40697041102
E: ID_VENDOR=American_Power_Conversion
E: ID_VENDOR_ENC=American\x20Power\x20Conversion
E: ID_VENDOR_ID=051d
E: ID_MODEL=Back-UPS_XS_1400U_FW:926.T2_.I_USB_FW:T2
E: ID_MODEL_ENC=Back-UPS\x20XS\x201400U\x20\x20FW:926.T2\x20.I\x20USB\x20FW:T2\x20
E: ID_MODEL_ID=0002
E: ID_REVISION=0106
E: ID_SERIAL=American_Power_Conversion_Back-UPS_XS_1400U_FW:926.T2_.I_USB_FW:T2_4B1925P01987
E: ID_SERIAL_SHORT=4B1925P01987
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030000:
E: ID_VENDOR_FROM_DATABASE=American Power Conversion
E: ID_MODEL_FROM_DATABASE=Uninterruptible Power Supply
This is the result of udevadm info /dev/bus/usb/001/010 in the LXC:
Code:
udevadm info /dev/bus/usb/001/010
P: /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6
N: bus/usb/001/010
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6
E: DEVNAME=/dev/bus/usb/001/010
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=51d/2/106
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=010
E: MAJOR=189
E: MINOR=9
E: SUBSYSTEM=usb
So the passtrough is not "complete"
I've tried everyting I found but that's the best I have and apctest cannot connect to the UPS
Code:
apctest
2020-07-12 00:14:34 apctest 3.14.14 (31 May 2016) debian
Checking configuration ...
sharenet.type = Network & ShareUPS Disabled
cable.type = USB Cable
mode.type = USB UPS Driver
Setting up the port ...
apctest FATAL ERROR in apctest.c at line 321
Unable to open UPS device.
If apcupsd or apctest is already running,
please stop it and run this program again.
apctest error termination completed
Any suggestion to have full passtrough of an UPS to an LXC ?
It would be much appreciated
