sautax
Contributor
Contributor

How to accurately get the power consumption of a single virtual machine ?

Hello
I’m trying to read the energy consumtpion of a virtual machine using PowerCLI.
I tried using the Get-Stat cmdlet like this :

 

 

$entity = Get-VM -Name Test 
Get-Stat -Entity $entity -Stat "power.power.average" -Realtime -MaxSamples 1

 

 

But the output is very high and unreal like 1500 watts for a single vcpu and 2 GB of ram.

Do i need to enable a metric ? How can i do that?

Thanks in advance

0 Kudos
3 Replies
LucD
Leadership
Leadership

Which Power Profile did you select for the ESXi node?
Do you see the same value in the Web Client under Monitor - Performance -Advanced?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
sautax
Contributor
Contributor

The selected power profile is "balanced" (the interface is in french so i’m not sure about the translation).
And in the web client it’s exactly the same value.

0 Kudos
LucD
Leadership
Leadership

If the Web Client shows the same value, it is obviously not a PowerCLI related question.

I will move the thread to the vSphere Discussions community.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos