A question that I had received during VMware Explore Barcelona, was how to automate the checking for new updates that are available for their vCenter Server? In the vSphere UI, when a new update is available and applicable, you will see a new blue label called Update Available under the Summary view when your vCenter Serve inventory object is selected.
When you click on the label, it will take you the vCenter Server Update Planner, a feature that was introduced back in vSphere 7, which is part of the overall vSphere Lifecycle Manager (vLCM) solution.
Here you will be shown a list of all applicable vCenter Server update(s) and/or upgrade(s) for your specific version of vCenter Server, including useful information like severity and even direct links to the release notes, which is extremely useful to quickly get a glance at a particular release.
As you might expect, all of the information displayed within the vSphere UI is available programmatically using the vCenter Server vLCM REST API, enabling users to periodically check when an update is available and create and run interoperability reports using the vCenter Server Update Planner feature.
To check whether there are any update(s) available for your specific vCenter Server, you can use the List Update Pending API which will return a list of update(s) that are applicable. To demonstrate this vCenter Server REST API, I will be using PowerCLI and the following snippet below will retrieve the version, build, type, severity, release date and release note URL.
Connect-CiSServer -Server 192.168.30.181 -user administrator[at]vsphere[dot]local -Password VMware1! $vcLcmUpdateService = Get-CisService -Name com.vmware.vcenter.lcm.update.pending $updates = $vcLcmUpdateService.list().updates $updates | select version, build, update_type, severity, release_date, release_notes
As you can see from the output, the information is exactly the same as what is provided in the vSphere UI. Using this API, users can now automate the checking for new updates versus having to use the vSphere UI and this can be setup as a scheduled job that you run periodically.