With the most recent update to the UCS Central PowerTool, I decided to start working some Powershell scripts into UCS Director (using the Execute PowerShell Command task). The built-in tasks for UCS Central seem to be lacking for the overall workflow I was trying to develop (a full bare metal to SAN booted ESX 5.5 Update 1 server).
I put together a few PowerShell scripts to supplement the built-in tasks. The scripts I did write helped perform the following tasks in my workflow:
- Create a Boot Policy in UCS Central (for later use to setup the SAN booting parameters)
- Modify the Boot Policy in UCS Central
- One modify script to add LAN boot parameters (for PXE booting from the Bare Metal Agent) and SAN boot parameters (WWNs and LUN IDs)
- After the Bare Metal Agent is used to deploy ESX to the SAN LUN, I remove the LAN boot section from the boot policy, leaving the SAN boot option as the only boot option.
Unfortunately, since I used the PowerShell options, I have yet to figure out how to pass variables (specifically the identity of the Boot Policy) so that it’s existence could be rolled back if/when the rollback feature is initiated.
I’ll work on publishing the script specifics in an update to this blog post when more time allows for exporting the files from my lab environment.