PowerCli does not report correct CPU Shares (NumCpuShares) information.
search cancel

PowerCli does not report correct CPU Shares (NumCpuShares) information.

book

Article ID: 334549

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article helps in understanding how information is passed to the vpxd agent through the UI Client & thereafter consumed by PowerCLI cmdlet, when vCPU count is changed for a VM.

Symptoms:
  • When vCPU count for a VM is changed through Web Client & CPU Level is set to High, Low Or Normal, PowerCLI cmdlet "Get-VMResourceConfiguration" doesn't show the correct value 
  • When vCPU count for a VM is changed through HTML5 Client & CPU Level is set to High, Low Or Normal, PowerCLI cmdlet "Get-VMResourceConfiguration" shows the correct value
  • When CPU Level is set to Custom, irrespective of the Client used for changing vCPU count, correct information gets be displayed using PowerCLI cmdlet


Environment

VMware vSphere ESXi 6.5

Cause

CPU shares allocation is calculated by HTML5 client on it's own. However, Flex client does not have this intelligence built in and it fails to pass the information to vCenter VPXD agent and as a result, PowerCli displays old values of the VM CPU share allocation.

Resolution

This is an expected behaviour:

VMware recommends to use HTML5 client as that pushes the change to vpxd agent correctly, irrespective of CPU Level used.
With HTML5 client, if you change the number of CPUs while the VM is running, the shares get reflected in powercli client when you run command - 'Get-VM TestVM | Get-VMResourceConfiguration', but shares won't get reflected if it was triggered from any other client (like flex/NGC client). 

Workaround:
Set the CPU shares level to CUSTOM & use any client to change vCPU count, PowerCLI cmdlet would show correct CPU Shares.