To identify the number of CPU licenses (supporting up to 32 physical cores per CPU) required for upgrading to a new major version of vSphere and vSAN (starting Apr 2, 2020 as described in the blog post ) in one of two ways:
- For small deployments and ESXi hosts not connected to a vCenter Server: Navigate to Host > Hardware > CPU and check the value of Cores per socket to determine if your host has more than 32 physical cores per CPU.
- For larger deployments: VMware has developed the attached PowerCLI tool that collects and consolidates information on the quantity of CPU licenses (supporting up to 32 physical cores per CPU) required for each host connected to a vCenter Server.
Prerequisite:
- VMware PowerCLI 10.x or greater installed
- Download and extract the attached 77098_vSphereCPUSocketToCoreUsage.zip
- Connect to vCenter Server:
Connect-VIServer -Server vCenter_Server
- Import PowerCLI function:
Import-Module .\vSphereCPUSocketToCoreUsage.psm1
- Run Get-vSphereCPUSocketToCoreUsage function to retrieve results. By default, the script will iterate through all vSphere Clusters.
CPU_LICENSE_COUNT: The current Licensing method's CPU count
LIMITED_CPU_CORE_LICENSE_COUNT: CPU count under the new licensing model.
If the CPU_LICENSE_COUNT and LIMITED_CPU_CORE_LICENSE_COUNT values are equal, there will be no change in licensing. If LIMITED_CPU_CORE_LICENSE_COUNT is larger than CPU_LICENSE_COUNT, the licensing will need to be changed.
To specify a specific vSphere Cluster, you can use -ClusterName option:
Get-vSphereCPUSocketToCoreUsage -ClusterName Cluster_Name
To output the results into a CSV file, you can use -Csv option:
Get-vSphereCPUSocketToCoreUsage -Csv
To name the CSV file, you can use -Filename option:
Get-vSphereCPUSocketToCoreUsage -Csv -Filename name.csv