VMware Cloud Community
UberGeek1
Enthusiast
Enthusiast

vSphere Update Manager Host Upgrade Images and Baselines - PowerCLI

I have multiple vCenters, 17 to be exact, and I'm trying to find a way to automate the process of importing an ESXi image into VUM then creating the Host Upgrade baseline.  So the added part is I run hardware from multiple vendors, so I have to upload 3 ESXi images to each VUM and create the baselines, so that what, 52 operations across multiple vCenters that I have to do manually.

So the answer is not simply "Run one vCenter" or "Use one hardware vendor", the size of the environment and location dictates the architecture and use of multiple vendors.  I have a script to create a Host Patch or Host Extension baseline based on an XML file that I export from my "golden master" vCenter, and the script also has the logic to know which baseline to add to each host, on a host by host basis, depending on the hardware so that each host get's the proper baselines and we aren't cross installing stuff that can have issues, like installing the HPe AMS Agent on a Cisco blade, that causes a PSOD every time.

My ask here is if anyone knows of a way I can incorporate those manual 52 steps into the logic of my script so that it can also import the ESXi images and create the Host Upgrade baselines.

Sincerely, Jody L. Whitlock
0 Kudos
1 Reply
dave012345
Enthusiast
Enthusiast

I typically start my script with Import-Csv which is a list of all my vCenter servers. Then I use a foreach loop to iterate through all my servers and execute whatever I want. In your case you would just have 3 instances of New-PatchBaseline.

Alternatively you can upload your patches to a shared repository and script the entire install process and not even use VUM (this is what I have done in the past).

0 Kudos