listHAClusterNodes.pl

Version 3

    Motivated by c_shanklin twitter message about http://www.hypervisor.fr/?p=1320 this morning about listing primary HA nodes within vCenter cluster  using PowerCLI, I thought I provide an equivalent snippet of vSphere SDK  for Perl script. In additional to listing the primary nodes, I'm also  outputting the configuration and run state of each node in the cluster.

    Unfortunately, the vSphere API does not provide information about the secondary nodes

    Requirements:
    vCenter 4.0
    vSphere SDK for Perl or vMA 4.0

    Operations:

     

    • Specific cluster (user --cluster)
    • All cluster (default)


    Sample Execution:

    Specific cluster:

    ./listHAClusterNodes.pl --server reflex.primp-industries.com --cluster 'R&D'

     

    Picture 1.png

    All cluster:

    ./listHAClusterNodes.pl --server reflex.primp-industries.com

     

    Picture 2.png

    Your output should be much more defined ... my development environment is under construction still hence the uninitialized and error messages