WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • Apple
You are here: Home / Automation / How to automate checking for new vCenter Server updates in vSphere Lifecycle Manager (vLCM)?

How to automate checking for new vCenter Server updates in vSphere Lifecycle Manager (vLCM)?

11.27.2022 by William Lam // 2 Comments

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.

More from my site

  • How to configure Hardware Compatibility List (HCL) database for vSphere Lifecycle Manager (vLCM) in an air-gapped environment?
  • Quick Tip - Downloading ESXi Image (ISO or ZIP) from vSphere Lifecycle Manager (vLCM)
  • Quick Tip - Automating allowed and not allowed Datastores for use with vSphere Cluster Services (vCLS)
  • Using vSphere Lifecycle Manager (vLCM) to remediate Nested ESXi host with CPU on the host is not supported 
  • Changes to vSphere Client Login UI customizations in vSphere 6.7

Categories // Automation, PowerCLI, vSphere 7.0, vSphere 8.0 Tags // vCenter Server, vSphere 7.0, vSphere 8.0, vSphere Lifecycle Manager

Comments

  1. Joffrey says

    11/29/2022 at 1:34 am

    Can we use the VEBA to be notified when there are news updates ?

    Reply
    • William Lam says

      11/29/2022 at 6:00 am

      It should be possible since both VUM/vLCM generate a number of events. You can view them at https://github.com/lamw/vcenter-event-mapping/blob/master/vsphere-8.0-IA.md and search for "com.vmware.vcIntegrity"

      Reply

Thanks for the comment! Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • Blocking vSphere HTML5 VM Console and allowing only Standalone VM Remote Console (VMRC)? 02/08/2023
  • Quick Tip - Inventory core count for vSphere+, vSAN+ & VCF+ Cloud Service 02/07/2023
  • How to automate adding a license into vCenter Server with custom label?  02/06/2023
  • Automated ESXi Installation with a USB Network Adapter using Kickstart 02/01/2023
  • How to bootstrap ESXi compute only node and connect to vSAN HCI Mesh? 01/31/2023

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2023

 

Loading Comments...