I have attached a UPS to my Proxmox server and run some NUTs containers in an LXC. Management of the UPS is via USB and works if I use something like /dev/bus/usb/001/003 as passthrough. The nut-upsd container in the LXC then used
However after a proxmox reboot, that USB port changes meaning I need to update both the LXC config and the code for the docker container.
I tried to fix that with a sym link setup on the Proxmox node. I created a sym link called eaton_ups
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", SYMLINK+="eaton_ups", GROUP="nut", MODE="0666"
After every reboot, 'readlink /dev/eaton_ups' always resolves to the correct USB port on the Proxmox node.
In this case 'bus/usb/001/003'
If I add that to the docker config for nut-upsd
the container fails to start with:
chgrp: /dev/bus/usb: No such file or directory
Inside the LXC I can run, ls -l /dev/eaton_ups and get some output. Same for ls -l /dev/bus/usb/001/003.
Whole idea is to prevent a docker container inside an LXC failing to start due to incorrect USB port assignment.
Code:
devices:
- /dev/bus/usb/001/003
However after a proxmox reboot, that USB port changes meaning I need to update both the LXC config and the code for the docker container.
I tried to fix that with a sym link setup on the Proxmox node. I created a sym link called eaton_ups
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", SYMLINK+="eaton_ups", GROUP="nut", MODE="0666"
After every reboot, 'readlink /dev/eaton_ups' always resolves to the correct USB port on the Proxmox node.
In this case 'bus/usb/001/003'
If I add that to the docker config for nut-upsd
Code:
devices:
- /dev/eaton_ups
the container fails to start with:
chgrp: /dev/bus/usb: No such file or directory
Inside the LXC I can run, ls -l /dev/eaton_ups and get some output. Same for ls -l /dev/bus/usb/001/003.
Whole idea is to prevent a docker container inside an LXC failing to start due to incorrect USB port assignment.
Last edited: