Ever wanted to check the hosts in your vCenter to make sure they are all the same type, you can use the following one liner to do this:
Get-VMHost | Sort Name | Get-View | Select Name, @{N=“CPU“;E={$_.Hardware.CpuPkg[0].Description}} | Export-Csv c:\cpuinfo.csv
Sample Output:
Name | CPU |
tesesx01.mydomain.com | Intel(R) Xeon(R) CPU 5160 @ 3.00GHz |
tesesx02.mydomain.com | Intel(R) Xeon(R) CPU 5160 @ 3.00GHz |
tesesx03.mydomain.com | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx04.mydomain.com | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx05.mydomain.com | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx06.mydomain.com | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx07.mydomain.com | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
Or if you want to add the cluster name in there as well:
Get-VMHost | Sort Name | Get-View | Select Name, @{N=“Cluster“;E={Get-Cluster -VMHost (Get-VMHost $_.Name)}},@{N=“CPU“;E={$_.Hardware.CpuPkg[0].Description}} | Export-Csv c:\cpuinfo.csv
Sample Output:
Name | Cluster | CPU |
tesesx01.mydomain.com | Test | Intel(R) Xeon(R) CPU 5160 @ 3.00GHz |
tesesx02.mydomain.com | Test | Intel(R) Xeon(R) CPU 5160 @ 3.00GHz |
tesesx03.mydomain.com | Production | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx04.mydomain.com | Production | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx05.mydomain.com | Production | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx06.mydomain.com | Production | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
tesesx07.mydomain.com | Production | Intel(R) Xeon(R) CPU E5450 @ 3.00GHz |
We have some new Dell ESX-Hosts and the type of the CPU hardware does not match the shown type of the VMs.
Is there any way to get the CPU-type reported to the VM via PowerCLI to Review all VMs?
@Daniel Hernandez
I checked but can’t see the stepping info through PowerCLI, you could always use the method as documented here by LucD: http://communities.vmware.com/thread/225472?tstart=15
Do you know how to also extract the CPU stepping ?
When you cat /proc/cpuinfo
The stepping value is what am looking for.
I know on some HP BL460c G1 the 5420 processors have different stepping and dont work in the same cluster unless you have the option to turn on EVC.
So extracting the stepping value in a report would be nice.