Hi Folks,
I posted this issue on the apcupsd mailing list (as I initially thought it was an apcupsd issue), but after receiving the response from the apcupsd team, we agree that this may be a problem with how the USB pass-through works within ESX. I've attached my original post to the apcupsd-users mailing list below, and the team's associated reply. I've also provided the original links for your reference. If anyone has similar experiences or can provide some insight into how this could be resolved, I would appreciate it.
Regards,
Armen
<...snip...>
I currently have an APC XS 1500 plugged in via a 940-0127E (USB->RJ45) cable
to a server running ESX 4.1. I've configured ESX to passthru the USB
connection to a VM running CentOS v5.5. The apcupsd version installed via
rpm download in the VM is: 3.14.8.
The issue I have is that the output from apcaccess is quite sparse
I'd say so...that's pretty bad.
As a test, I connected the same UPS to a physical machine running Ubuntu
with the same apcupsd version and ran the same apcaccess test, and all of
the highlighted items were filled in/correctly reflected.
I ran apcupsd in debug mode within the VM, and here's some output for the
specific attributes it's having trouble retrieving:
LINEV
47.932 apcupsd: usb.c:850 Enter usb_ups_read_volatile_data
47.932 apcupsd: newups.c:102 write_lock at usb.c:862
48.099 apcupsd: linux-usb.c:349 Def val=0 exp=0 dVal=0.000000 ci=5
48.099 apcupsd: usb.c:472 LineVoltage = 0
LOAD
8.865 apcupsd: linux-usb.c:349 Def val=0 exp=0 dVal=0.000000 ci=11
48.865 apcupsd: usb.c:496 UPSLoad = 0
BATTV
48.355 apcupsd: linux-usb.c:349 Def val=0 exp=-2 dVal=0.000000 ci=10
48.355 apcupsd: usb.c:490 BattVoltage = 0
My hunch is that something in the USB passthru code within ESX is preventing
the data being accessed from where it's being expected.
Any advice would be appreciated, and if you need additional output, let me
know.
The evidence indicates the problem is with ESX. The debug you posted
shows that the kernel is giving apcupsd bogus data for its USB
requests. There's not much apcupsd can do about that. I run CentOS
5.5. on several machines and its stock kernel works fine with apcupsd,
so the issue is likely with ESX.
<...snip...>
I have exacly the same problem with an APC Back-UPS RS 800!
Did you resolve it?
Same issue.
I posted about this some time ago (http://communities.vmware.com/message/1642432), but it seems there's no solution for now, at least for Linux.
However, the basic data (time left, on batt/on line) are still reported correctly, so I assume the system shutdown should take place (not tested).