Battery Info not available to guest VM

jjcuen

New Member
Mar 10, 2021
1
0
1
54
Hi,
Im pretty new with Proxmox so hopefully this is not a super dumb question:
I have managed to get my proxmox server up and running on an old Samsung laptop (i3, 8GB RAM) and have installed a couple of VM's (Debian 10 and Home assistant - I think it uses Alpine Linux)
Anyway, everything works perfectly: networking, USB ports, ip virtualization, external drive, video, etc. except for the battery/power management. Proxmox server is able to verify battery status and acpi retuns a bunch of data (battery, ac adapter, cpu temperature ). The problem is that none of the VM's I have installed are able to find any of that information. It seems like Proxmox is not able to make that data available to the VM's (I don't even know if this is the right way to explain it)

Here are the results of running different commands on the guest VM's:
- acpi -V : returns no support for device type: power supply
- upower -d: returns power supply: none
- /sys/class/power_supply directory is empty

I already tried disabling/enabling acpi, kvlm support and nothing changes.

Any suggestion?
Thanks!
 
That's by design. Guest VMs are isolated from the host...

LXC, can access this things if allowed.

If you want battery power in your vm, you need something that exports/imports it over the network. Probably an option is to make a Website of battery stats on the host, or use grafana or whatever and check it on windows.

But other as that there is no way, and never will be. Cheers
 
Hi,

QEMU is currently not able to emulate or pass-through a battery device's status.

But there's a feature request on upstream QEMU bug/feature tracker:
https://bugs.launchpad.net/qemu/+bug/1502613

And there's even a person working on it, with some level of success at least. IMO this would be a sensible feature for QEMU, as lots of OS code acts quite differently when they detect a battery as main power source e.g., over ACPI and both, allowing to pass through the real thing or emulate it to verify software/OS behaviour during energy saving modes would be nice to have for an general purpose emulator.

Maybe you can chime in on the linked report and friendly ask about the status and show your support for this feature.
 

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!