NUT Server leading to USB Questions

yankeeinlondon

New Member
May 30, 2023
2
0
1
I spent a few hours yesterday on a Proxmox LXC (un-priviledged) trying to setup a NUT Server to monitor my office's two UPSes (both Cyber Power). Things were going swimmingly until near the end when try as I might I couldn't convince the NUT monitor to start. I won't go into detail here as my presumptive feeling was ... maybe I should be using a full VM and not this LXC container. That leads me to now and my general confusion about how to best setup a NUT Server.

  • I have setup a Debian 11 VM in Proxmox; base install of a CloudImage template I use
  • After installing `nut`, `nut-client`, and `nut-server` (I plan on having this node as a server but also want the client services available)
  • I then went into the Proxmox hardware settings and had no problem adding the UPS's to the VM:
2023-05-30_10-37-44.png
  • After rebooting the VM (and then eventually the full Proxmox host) I am baffled to see that commands like `lsusb`, `usb-devices`, and `nut-scanner` return absolutely nothing:
2023-05-30_10-45-46.png












  • I then read the WIKI article about USB devices and VMs and this got me thinking that I should use the proxmox CLI to assign these USB devices to the VM in question. I did this and from the following output I believe it would believe it took hold:
  • Sadly the VM commands shown above produce the same results (after reboot of the VM). In fact, I'd have thought the CLI results and UI results should be identical but then hope springs eternal (only to be crushed by inevitable winter).
  • I then -- in a serendipitous moment -- tried typing lsusb -t and the "-t" part apparently forced the command to give me some feedback which was that "/sys/bus/usb" doesn't exist! This is above my pay grade ... i'm not a beginner but I'm not a pro. I would have though that some "base" directory would be created for any VM or at least when I added the USB devices it would create this directory.
This leaves me with the following questions I'd really like more clarity on:
  1. Does anyone have a strong point of view on whether a VM or an LXC container is more suitable for running a NUT Server? If so ... why?
  2. Does anyone know why I can't get any USB info from within the VM whereas on the LXC container it was immediately available?
  3. Based on my discovery of the missing "/sys/bus/usb" directory ... who's responsibility is this to create this and am I correct in saying that it must exist for the VM to probe the USB info?
  4. Does anyone have any good instructional content or configuration files for setting this up? I used Techno Tim's video and notes as a starting point and then found this blog post helpful too
 
Last edited:
Ok, I'm making progress on the issue of why the VM is not able to detect any USB devices and that's because my Debian 11 cloudimg template apparently doesn't support USB devices. I found this out by running `lsusb -t` and noting that the `/sys/bus/usb` directory is non-existant. I'll redo the VM steps once I'm back from my coffee break. Still interested in whether LXC or VM is the better answer and whether other have gotten NUT Server to work with an LXC Container (priv or non-priv). In general I like the lower overhead of LXC.
 

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!