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 / 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 // 2 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

  • 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?
  • How to check if your vCenter Server is using vSphere+ / vSAN+ Subscription?
  • Automating subscription and usage retrieval for vSphere+ and vSAN+ Cloud Service

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

Comments

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

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

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/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...