pages

Wednesday, December 22, 2010

vCO - cluster AAM compliance check

Normal productive clusters are spread over two or more fire compartments. But only maximum five hosts in a cluster are primary hosts for AAM. What happens if all primary hosts reside in one section and this section fails?!  Check your cluster AAM fire compartment compliance:
The following code is compressed in one task for better viewing. For production use split it up in action & workflow(s), depending on sections. It will check, if minmum 2 host in each cell (fire compartment) is a primary host. Adapt these values for your use.
Parameters:
  • (input) Cluster [VcClusterComputeResource]: the cluster to be checked
  • (input) Cell1, Cell2 [Array/VcHostSystem]: an array containing the hosts in each fire compartment (e.g. use vCO configurations)
  • (output) compliant [boolean]: the cluster compliance
  • (output) Cell1Primary, Cell2Primary [Array/VcHostSystem]: primary hosts found for cell
Depending on compliance state you can use the both arrays in a next step email workflow to inform about the cell compliance.

If you are running vSphere 4.1 you can use DRS groups to get already defined host lists:

<Cluster>.configurationEx.group contains the group listing (array).
Cluster.configurationEx.group[x].host constains the host list of group x (array). You can use this to feed the parameters Cell1 & Cell2 dynamically with values from vSphere.

Regards, Andreas

No comments:

Post a Comment