VMware Cloud Community
LucFullenwarth
Enthusiast
Enthusiast
Jump to solution

PowerCli reports wrong CoresPerSocket

Hello,

I have a VM with 1 socket and 1 core.

LucFullenwarth_0-1680255022562.png

 

However PowerCli reports 1 NumCpu and 2 Cores per socket.

 

 

 

 

 

PS> Get-VM -Name MyComputer | Select-Object -Property NumCpu,CoresPerSocket

NumCpu CoresPerSocket
------ --------------
     1              2

 

 

 

 

 

Any idea about the origin of the wrong PowerShell output ?

PowerCli version is: 13.0.0

UPDATE:

There are in fact more VMs with inconsistent CPU information.
In the output below, the third column is supposed to be an integer.

But sometimes the number of Socket Per Cpu exceeds the total number of Cores (NumCpu).

However, when I look at the console, numbers are different.
For example the VM with a NumCpu of 2 and 4 CoresPerSocket displays 1 CorePerSoket and 2 sockets in the console.

 

 

PS> Get-VM |Select-Object -Property NumCpu,CoresPerSocket,@{Label = 'Socket'; Expression = {$_.NumCpu/$_.CoresPerSocket}}

NumCpu CoresPerSocket Socket
------ -------------- ------
    12             12      1
   ...
     1              1      1
     8              2      4
     1              2   0,50
     4              2      2
    16              2      8
   ...
     2              2      1
     2              2      1
     1              2   0,50
     1              1      1
     1              1      1
  ...
     4              4      1
     2              2      1
     2              4   0,50
    16              2      8
 ...
     2              2      1
     2              1      2
     1              2   0,50
     1              1      1
     4              4      1
   ...

 

 

 

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

In fact when you are having 1 vCPU and there are 2 cores per socket, then you are using half a socket.

Also, the vCPU and the cores/socket you define on a VM are virtual.
The number of cores per pCPU on an ESXi node has nothing to do with that virtual definition on the VM, besides the limit on the number of vCPU and virtual cores/socket you can define.

Not sure what the issue is.


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

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

What is the powerstate of the VMS? And if you are on vSPhere 8.*, what is autoCoresPerSocket set to?

LucD_0-1684760302613.png

 


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

Reply
0 Kudos
LucFullenwarth
Enthusiast
Enthusiast
Jump to solution

All those VMs are Powered On.

Unfortunately, hosts are still in v6.7.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

In fact when you are having 1 vCPU and there are 2 cores per socket, then you are using half a socket.

Also, the vCPU and the cores/socket you define on a VM are virtual.
The number of cores per pCPU on an ESXi node has nothing to do with that virtual definition on the VM, besides the limit on the number of vCPU and virtual cores/socket you can define.

Not sure what the issue is.


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

Reply
0 Kudos
LucFullenwarth
Enthusiast
Enthusiast
Jump to solution

Okay! In fact I viewed the CoresPerSocket value as a max value (max number of cores per socket).
That's why I expected the Socket value to be an integer, whether the socket is full or not.
Because in the real world you are not obliged to fill all your sockets on a motherboard...

But your answer make sense and explains the current result.
Thanks for your help Luc 🙂

PS: I also just realized that the Socket value was completely built by myself in the command line... 🙈

Reply
0 Kudos