CPU Topology Auto-Assign Issue via PowerCLI
search cancel

CPU Topology Auto-Assign Issue via PowerCLI

book

Article ID: 390729

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When using PowerCLI to set "Cores per Socket" to "Assign at power on" after manually specifying a "NUMA Nodes" count, the NUMA Nodes field remains empty and continues displaying the previous value instead of automatically switching to "Assign at power on."

You are using PowerCli code:

$vm = Get-VM -name 'Test'

$spec = New-Object -TypeName 'VMware.Vim.VirtualMachineConfigSpec'

$spec.NumCoresPerSocket = 0

$vm.ExtensionData.ReconfigVM_Task($spec)

After running the PowerCLI code above using PowerCLI 13.3.0.24145081, you check the CPU Topology:

  • The NUMA Nodes field will be empty.
  • Cores per NUMA node will still show the old value instead of updating to "Assign at power on".
  • $vm.ExtensionData.Config.NumaInfo.CoresPerNumaNode will still show the old value even after powering on the VM
  • The key "numa.autosize.vcpu.maxPerVirtualNode" in $vm.ExtensionData.Config.ExtraConfig will still show the old value after powering on the VM

 

 

Environment

vCenter Server 8

PowerCli 13.3 24145081

 

Cause

Starting with HW version 20 there are separate configuration options in the VM config spec for the number of cores per socket and the number of NUMA nodes



Resolution

Setting NumCoresPerSocket to 0 is reflected as "Assigned at power on" in the UI for "Cores per socket" and this is expected
The NUMA node configuration is controlled by another property on the config spec (available in vSphere 8.0.1 and later)

The following configuration sets both Cores per Socket and NUMA nodes to "assigned at power on"

> $spec = New-Object -TypeName 'VMware.Vim.VirtualMachineConfigSpec'
> $spec.NumCoresPerSocket = 0
> $spec.VirtualNuma = New-Object -TypeName 'VMware.Vim.VirtualMachineVirtualNuma'
> $spec.VirtualNuma.CoresPerNumaNode = 0
> $vm.ExtensionData.ReconfigVM_Task($spec)