getNumofvCPUInCluster.pl

Version 2

    While waiting for VUM to finish up on some new vSphere ESX 4.0 hosts, I was reading VMTN blogs and noticed this interesting article by Jason Boche: http://www.boche.net/blog/index.php/2009/08/18/hidden-virtual-cpu-limit-restriction-in-esx-3-5/

     

    This script will query a specific cluster and extract out the number of vCPU for the given cluster, each individual host and the advanced configuration Misc.RunningVCpuLimit set for each host.

     

    In ESX 3.5 as Jason pointed out the default is 128 with maximum support of 192 and with vSphere ESX 4.0, this has changed to default of 512

     

    Requirement:

    VI Toolkit for Perl/vSphere SDK for Perl/VIMA 1.0/vMA 4.0

    vCenter 2.5 / 4.0

     

    Sample Execution:

     

    On ESX 3.5:

    [vi-admin@scofield]$ ./getNumofvCPUInCluster.pl --server reflex.primp-industries.com --username primp --cluster primp-cluster
    This could take a few minutes depending on the size of the cluster ...
    
    Cluster: primp-cluster
         Host: primp-esx01
              Misc.RunningVCpuLimit: 128
              # of vCPU on host: 12
         Host: primp-esx02
              Misc.RunningVCpuLimit: 128
              # of vCPU on host: 13
         Host: primp-esx03
              Misc.RunningVCpuLimit: 128
              # of vCPU on host: 16
         Host: primp-esx04
              Misc.RunningVCpuLimit: 128
              # of vCPU on host: 16
          ..........
          # of vCPU: 463
    

     

     

    On ESX 4.0:

    [vi-admin@scofield]$ ./getNumofvCPUInCluster.pl --server mauna-loa.primp-industries.com --username primp --cluster primpProd-cluster
    This could take a few minutes depending on the size of the cluster ...
    
    Cluster: primp-cluster
         Host: primp-esx01
              Misc.RunningVCpuLimit: 512
              # of vCPU on host: 21
         Host: primp-esx02
              Misc.RunningVCpuLimit: 512
              # of vCPU on host: 22
          # of vCPU: 23