VMware Cloud Community
User20000
Enthusiast
Enthusiast
Jump to solution

Logical cores?

Is there a way to find the logical core count in PowerCLI?

My first idea was something like the code below, but that returns physical cores.

$hostview = get-vmhost $hostname | get-view

$hostview.hardware.cpuinfo.numcpucores

Reply
0 Kudos
1 Solution

Accepted Solutions
MKguy
Virtuoso
Virtuoso
Jump to solution

I'm pretty sure he's referring to the properties of his physical host and not to VMs.

And he was pretty close already, just query the NumCpuThreads property instead:

$hostview.hardware.cpuinfo.NumCpuThreads
16
$hostview.hardware.cpuinfo.numcpucores
8
-- http://alpacapowered.wordpress.com

View solution in original post

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

You mean something like this Vcpu per Guest


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

Reply
0 Kudos
MKguy
Virtuoso
Virtuoso
Jump to solution

I'm pretty sure he's referring to the properties of his physical host and not to VMs.

And he was pretty close already, just query the NumCpuThreads property instead:

$hostview.hardware.cpuinfo.NumCpuThreads
16
$hostview.hardware.cpuinfo.numcpucores
8
-- http://alpacapowered.wordpress.com
Reply
0 Kudos
User20000
Enthusiast
Enthusiast
Jump to solution

That was it.  Thanks!

Reply
0 Kudos