As described in my previous blog post, the firmware deployment method needs to be configured on two components. The OneView Server Profile Install Method and the HPE Smart Update Tools Install Mode. changing the HPE OneView Server Profile or updating the Server Profile from the modified Template might be a time-consuming and annoying task without proper automation. This post will show some examples of how to use VMware PowerCLI in combination with the HPE OneVew PowerShell Module to automate these tasks.
For the following explanation, I assume that the current configuration is Install Method “Manual” and all ESXi Hosts Server Profiles should be switched to Install Method “Firmware Only”.
Note:
If the HPE Smart Update Tools Install Mode is already set to “AutoDeploy, or AutoDeployReboot” the Deployment process will start right after the reconfiguration of the Server Profile Install Method. In the case you have enable the ESXi Lockdown Mode the firmware deploment will fail. For more details please have a look at the introduction to this series.
In my environment, I have prepared the next step by copying the current OneView Server Profile Template and only switching the Install Method to “Firmware Only” in the new template.
Script - Switch to the new OneView Server Profile Template
From my perspective, it is the most transparent procedure to switch from a Server Profile Template with the Install Method “Manual” to a new Server Profile Template with Firmware Install Method “Firmware only using Smart Update Tools”. With this procedure, you are able to monitor the progress of the reconfiguration (how many Server Profiles are assigned to the old Server Profile Template) and not all Server Profiles are raising a warning (differ from Template) at the time you change the template. Another method might be changing the current Server Profile Template and then applying the changes to all dependent Server Profiles - See next chapter.
|
|
The script is designed to apply the changes on all Hosts of a vSphere Cluster.
You can see in the script region “Reconfigure Server Profile with new Template” that the Firmware config is updated. This seems to be redundant as already the new Profile should contain these changes. I had a few situations where the updated firmware settings in the profile had not been applied, this workaround solved that issue for me.
Script - Update Server Profile from Template
Updating server profiles from their templates may be necessary in various situations:
-
Modified Settings in the Server Profile Template
-
New Firmware Baseline in the Server Profile Template
-
New Hardware installed with the wrong firmware
-
Error when applying settings or installing the firmware
And like the other scripts of this blog post series, it is designed to be applied to a vSphere Cluster.
|
|
Other Parts of this series
-
HPE Firmware Management for VMware ESXi - Smart Update Tools Install Mode
-
HPE Firmware Management for VMware ESXi - Server Profile Install Method (this post)
-
HPE Firmware Management for VMware ESXi - Update Activity Logs [TBD]