Raphael is very smart guy, vExpert fellow and PowerCLI guru. Recently he came up with a great idea, which turned into a great blog post and a powerful script available for free. All credits go to Raphael.
No need to remind you the benefits of Host Profiles in terms of configuration consistency and correctness across the datacenter. With PXE Manager and PowerCLI, you could free yourself from the hassle of deployment and with Host Profiles’ help you automate and monitor host configuration management (These features were greatly improved in vSphere 5).
Unfortunately Cluster configuration management hasn’t improved at the same pace and remains tedious with no visibility into changes. You configure properly your Cluster settings and 6 months later, after a few maintenance windows and some changes e.g. Admission Control set to disable and DRS set to Partially Automated, you find yourself in a situation where a broken Blade powers off VM’s which are unable to restart on other hosts in the Cluster because someone forgot to re-enable HA. We have experienced this situation but hopefully our latest PowerCLI script will help us to change once for all those bad habits and behaviors: Meet Manage-ClusterProfile
Manage-ClusterProfile was developed for three simple tasks:
- export Cluster configuration and settings to a cluster profile file.
- compare Cluster configuration and settings with a cluster profile file.
- import a cluster profile file to an existing Cluster.
The cluster profile file, which is a xml file, contains the entire configuration and settings of a Cluster (HA, DRS, DPM, rules, swapfile, etc…) and therefore allows a detailed comparison of similarities and differences.
Optionally you can send an email to vAdmins for instance.
The import function addresses only Cluster’s own configuration and settings. For instance, Affinity Rules or any other VM’s settings (e.g. HA/DRS/DPM customization) are not imported.
The script has the following input parameters:
- ManagedCluster [name of the Cluster]
- Action [import|export|check]
- ProfilePath [directory for export|path to xml cluster profile file for import and check]
- SendMail [1 for enable]
- ForceImport [1 for enable]
To summarize this blog post, this script will allow you to create new Clusters by importing cluster profile templates with all your predefined configuration and settings tailored to your own criterias. Also ran as a scheduled task, this script will allow you to track changes and stay compliance. Of course when you make changes to your Cluster, you will have to export them to a cluster profile file that you use to track changes.
As usual do not hesitate to share your feedback and suggestions in the comment area🙂