scaphandre icon indicating copy to clipboard operation
scaphandre copied to clipboard

Support VMware/ESXi virtual machines

Open TheElectronWill opened this issue 1 year ago • 2 comments

Problem

Scaphandre is able to analyze qemu/KVM virtual machines (if qemu is started in system mode, it doesn't seem to work in user mode. For instance, it doesn't work with a simple vm managed by Gnome Boxes, but it does work with virt-manager). However, the implementation is specific to libvirt and doesn't work with the VMware ESXi hypervisor.

Solution

A method similar to qemu/KVM support (i.e. detecting vms on the host, computing their power consumption and offering a fake interface to the guest OS) could be implemented for VMWare ESXi.

If RAPL isn't available on the hypervisor, maybe we could use the vSphere metrics API.

Alternatives

Never support VMware ESXi, but that would be a bit sad because it's quite popular.

Additional context

The vSphere UI shows power metrics for hosts and for VMs, so that information is available to the hypervisor in some way.

TheElectronWill avatar Feb 08 '23 15:02 TheElectronWill

Since April 2023, on ESXi 8.0 Update 1, they introduced per VM metric on the power usage.

So querying the PerformanceManager we can get the Power (watt) and Energy (joule) for Host and VM.

Seraf avatar Nov 07 '23 17:11 Seraf

Interesting link. Is it known how this splitting is done on the hypervisor level?

ArneTR avatar Nov 08 '23 12:11 ArneTR