WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Disabling vCenter Lifecycle Manager automatic download using vSphere API

Disabling vCenter Lifecycle Manager automatic download using vSphere API

10.02.2023 by William Lam // 1 Comment

By default, vCenter Server will automatically check and download the latest ESXi updates that can then be used by either the deprecated vSphere Update Manager (VUM) or its replacement which is vSphere Lifecycle Manager (vLCM), both of which can be managed under the Lifecycle Manager section in the vSphere UI.

Interestingly, I have had a number of inquiries about disabling the automatic download setting using automation, as I assume users have setup Update Manager Depot Service (UMDS) instance for consolidated and/or offline access.


Disabling the automatic download in the vSphere UI is very straight forward by going to Lifecycle Manager->Settings->Administration->Patch Downloads and clicking on the Edit button to enable or disable the setting.

Because the Lifecycle Manager section combines functionality for both VUM and vLCM, it can sometimes be confusing on which vSphere API to use and this is important becauase VUM does not have any public API and only subset of its functionality can be automated using specific VUM PowerCLI cmdlets. This is another benefit to using vLCM, not only is it the replacement for VUM going forward, but all of its functionality is available using both the vSphere UI or vSphere REST API.

With that said, the automatic download setting is actually a VUM-based configuration and as mentioned earlier, there are no public APIs for managing these settings. However, I recently found a clever workaround that would allow users to automate disabling this setting.

If you look closely at the text next to the setting, you will see a reference to this automatic download being implemented as vCenter Scheduled Task, which can confirm by navigating to the vCenter Server inventory object and going to Configure->Scheduled Tasks


Since the vCenter Scheduled Tasks functionality does have vSphere API, I was wondering if we simply removed the scheduled task, would it automatically disable the Lifecycle Manager download setting? 🤔

Long story short, the answer is yes! After manually verifying the behavior using the vSphere UI, I knew that we could now automate this using the vSphere API!

The following PowerCLI snippet demonstrates the use of scheduled tasks vSphere API to delete an existing schedule task with the following label "VMware vSphere Lifecycle Manager Update Download":

$scheduleTaskMgr = Get-View $global:DefaultVIServer.ExtensionData.Content.ScheduledTaskManager
$scheduleTasks = $scheduleTaskMgr.RetrieveEntityScheduledTask((Get-Folder -Name Datacenters).ExtensionData.MoRef)

foreach ($scheduleTask in $scheduleTasks) {
    $scheduleTaskRef = Get-View $scheduleTask
    if($scheduleTaskRef.Info.Name -eq "VMware vSphere Lifecycle Manager Update Download") {
        Write-host -ForegroundColor Cyan "`nDeleting vLCM Automatic Download Scheduled Task ...`n"
        $scheduleTaskRef.RemoveScheduledTask()
        break
    }
}

Here is an example screenshot of running the following snippet above:


If we navigate back to the vCenter Lifecycle Manager settings, we now see that the automatic download is disabled!

More from my site

  • Custom ESXi "Dummy" Reboot VIB for vSphere Lifecycle Manager (vLCM)
  • Retrieving detailed vSphere Lifecycle Manager (vLCM) Image information from vSphere Cluster using PowerCLI
  • Quick Tip - Downloading ESXi Image (ISO or ZIP) from vSphere Lifecycle Manager (vLCM)
  • Quick Tip - VMware Cloud Foundation (VCF) Bringup fails without persistent ESX-OSData
  • Is my vSphere Cluster managed by vSphere Lifecycle Manager (vLCM) as a Desired Image or Baseline?

Categories // Automation, PowerCLI Tags // vLCM, vSphere Lifecycle Manager

Comments

  1. *protectedPer N says

    01/31/2024 at 7:49 am

    Thanks for this article. Saved me time on auto deployed systems. However, to go even further is it possible to disable the four pre-configured Download Sources with PowerCLI too?
    Thanks in advance,
    Per

    Reply

Thanks for the comment!Cancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025

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 © 2025

 

Loading Comments...