WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / Updating the VSAN HCL & Release Catalog DB using VSAN API

Updating the VSAN HCL & Release Catalog DB using VSAN API

06.15.2020 by William Lam // 3 Comments

Both the VSAN Hardware Compatibility List (HCL) and the VSAN Release Catalog database which provides VSAN build recommendations should be updated periodically to ensure that you have the latest VSAN recommendations from VMware. In addition to using the vSphere UI to perform these update, customers can also automate either of these tasks using the VSAN Management API which can be consumed using any of the supported VSAN Management SDKs including PowerCLI.


I recently had a question about which VSAN API to use to update VSAN Release Catalog.

Updating VSAN HCL

The VsanVcClusterHealthSystem provides two methods for updating the VSAN HCL. The first is VsanVcUpdateHclDbFromWeb() which updates the HCL from VMware and the second VsanVcUploadHclDb updates from offline file.

  • Offline VSAN HCL JSON: https://partnerweb.vmware.com/service/vsan/all.json

Once you have downloaded the offline HCL file from the link above, below is an example using this VSAN Management API using PowerCLI:

# Read HCL DB JSON File
$HclDBRaw = Get-Content $HclDBFile

# Convert content into Byte array
$HclDBBytes = [System.Text.Encoding]::UTF8.GetBytes($HclDBRaw)

# Gzip compress
# Credit to https://gist.github.com/marcgeld/bfacfd8d70b34fdf1db0022508b02aca
[System.IO.MemoryStream] $output = New-Object System.IO.MemoryStream
$gzipStream = New-Object System.IO.Compression.GzipStream $output, ([IO.Compression.CompressionMode]::Compress)
$gzipStream.Write( $HclDBBytes, 0, $HclDBBytes.Length )
$gzipStream.Close()
$output.Close()

# Base64 Encode
$HclDBBytesString = $output.ToArray()
$EncodedText =[Convert]::ToBase64String($HclDBBytesString)

$vcchs = Get-VsanView -id  VsanVcClusterHealthSystem-vsan-cluster-health-system
$vcchs.VsanVcUploadHclDb($EncodedText)

Note: If you are using PowerCLI, you can simply use the Update-VsanHclDatabase cmdlet which just accepts the HCL file.

Updating VSAN Release Catalog

The VsanVumSystem provides the VsanVcUploadReleaseDb() method for updating the VSAN Release Catalog.

  • Offline VSAN Release DB: https://vcsa.vmware.com/ph/api/v1/results?deploymentId=2d02e861-7e93-4954-9a73-b08692a330d1&collectorId=VsanCloudHealth.6_5&objectId=0c3e9009-ba5d-4e5f6-bae8-f25ec506d219&type=vsan-updates-json

Once you have downloaded the offline release catalog file from the link above, below is an example using this VSAN Management API using PowerCLI:

$vsanReleaseJson = Get-Content -Raw $ReleaseDBFile

$vvs = Get-VsanView -id VsanVumSystem-vsan-vum-system
$vvs.VsanVcUploadReleaseDb($vsanReleaseJson)

More from my site

  • Programmatically accessing the Broadcom Compatibility Guide (BCG)
  • How to check when the VSAN Hardware Compatibility List (HCL) is updated?
  • How to download offline VSAN HCL file for VSAN Health Check Plugin?
  • How to get notifications when a component on the VMware HCL changes?
  • Enable TRIM/UNMAP from Nested vSAN OSA/ESA to physical vSAN OSA

Categories // Automation, PowerCLI, VSAN Tags // hcl, VSAN

Comments

  1. *protectedJoschua says

    06/16/2020 at 2:36 am

    Thank you very much for describing the automated update process for the release catalog. The first step (update the HCL) can be done a little bit easier with following commandlet Update-VsanHclDatabase.

    Reply
    • William Lam says

      06/16/2020 at 7:09 am

      Yes, see the "Note" section which I describe exactly this 🙂

      Reply
  2. *protectedA. Mikkelsen says

    07/11/2023 at 12:48 am

    Thanks for all your content.
    Tried updating the vSAN Release Catalog via API (as above) but get an Exception error:

    $vsanReleaseJson = Get-Content -Raw -Path $strvSANReleaseCatalogPath | ConvertFrom-Json
    >> $vvs = Get-VsanView -id VsanVumSystem-vsan-vum-system
    >> $vvs.VsanVcUploadReleaseDb($vsanReleaseJson)
    MethodInvocationException:
    Line |
    3 | $vvs.VsanVcUploadReleaseDb($vsanReleaseJson)
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | Exception calling "VsanVcUploadReleaseDb" with "1" argument(s): ""

    Tried to manually update the Release Catalog via GUI, and that worked...

    Hope you know whats wrong

    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

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • 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

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...