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 / Managing & silencing vSAN Health Checks using PowerCLI

Managing & silencing vSAN Health Checks using PowerCLI

04.24.2017 by William Lam // 4 Comments

One neat capability that was introduced with vSAN 6.6 is the ability to "silence" and disable specific vSAN Health Checks. A recent use for this came up on Duncan's blog where the vMotion health check would fail if you are using a vMotion network stack. As you can imagine, this feature can also come in handy for vSphere Home Labs where your hardware may not be on the official VMware HCL and wish to disable those specific vSAN Health Checks.



Today, silencing or re-enabling a specific vSAN Health Check is not available directly in the vSphere Web Client. Duncan already demonstrated one way of silencing a particular vSAN Health Check using RVC which is available when SSH'ing to vCenter Server Appliance (VCSA).

However, this capability can also be consumed remotely using the vSAN Management API which can then be consumed using a variety of vSAN Management SDKs including PowerCLI which now has complete access to the vSAN Management API. The following three new API methods have been added to the VsanVcClusterHealthSystem managed object that provides management of the underlying vSAN health Checks:

  • VsanQueryAllSupportedHealthChecks() - Retrieves all available vSAN Health Checks
  • VsanHealthGetVsanClusterSilentChecks() - Retrieves all silenced vSAN Health Checks
  • VsanHealthSetVsanClusterSilentChecks() - Silence or re-enable specific vSAN Health Checks

To demonstrate how these new vSAN APIs work, I created a quick PowerCLI script called VSANHealthChecks.ps1 which leverages the new Get-VsanView cmdlet that is included in latest PowerCLI 6.5.1.

To retrieve all available vSAN Health Checks which includes their TestName (what you see in the UI) as well as the TestId which will be needed if you wish to silence or re-enable a particular health check, run the following command:

Get-VSANHealthChecks


If you want a list of all currently silenced vSAN Health Checks, run the following command and provide the name of the vSAN Cluster:

Get-VSANSilentHealthChecks -Cluster VSAN-Cluster


Lastly, if we want to disable a particular set of vSAN Health Checks, you simply need to pass in a list of TestIds from the first command. In the example below, we are going to disable both HCL Controller and Firmware check by running the following:

Set-VSANSilentHealthChecks -Cluster VSAN-Cluster -Test controlleronhcl,controllerfirmware -Disable


If we re-run the previous query, we should see these additional two checks that have been silenced. In addition, we can also verify this by looking at the vSAN Health Check UI in vCenter Server. As you can see in the screenshot below, instead of showing "Failed" or "Warning" the specific silenced health check will now show "Skipped" with green status.


If you wish to un-silence or re-enable a given set of vSAN Health Check(s), just perform the reverse and pass in the -Enable flag as shown below:

Set-VSANSilentHealthChecks -Cluster VSAN-Cluster -Test controlleronhcl,controllerfirmware -Enable

More from my site

  • Translating vSAN VM Object IDs (UUID to VM and VM to UUID)
  • How to convert vSAN RVC commands into PowerCLI and/or other vSphere SDKs?
  • Correlating vSAN perf metrics from vSphere Web Client to both PowerCLI & vSAN Mgmt API
  • Getting started w/the new PowerCLI 6.5.1 Get-VsanView cmdlet
  • SMART drive data now available using vSAN Management 6.6 API

Categories // Automation, PowerCLI, VSAN, vSphere 6.5 Tags // PowerCLI, Virtual SAN, VSAN 6.6, vSAN Health Check

Comments

  1. JonB says

    09/28/2018 at 9:29 am

    William, is this vsanhealthcheck deprecated or different in PowerCLI 10.2? Here are the cmdlets I have available to me with PowerCLI 10.2:

    Name
    ----
    Get-VsanDiskGroup
    Get-VsanRuntimeInfo
    Get-VsanSpaceUsage
    Get-VsanView
    Get-VsanStat
    Get-VsanClusterConfiguration
    Get-VsanFaultDomain
    Get-VsanIscsiLun
    Get-VsanIscsiInitiatorGroup
    Get-VsanEvacuationPlan
    Get-VsanIscsiTarget
    Get-VsanDisk
    Get-VsanResyncingComponent
    Get-VsanIscsiInitiatorGroupTargetAssociation

    Am I missing something here?

    Reply
    • William Lam says

      09/28/2018 at 12:18 pm

      The Get-VSANHealthChecks is a custom PowerShell Function I wrote using the VSAN Management API via PowerCLI, so you need to actually load the function to use it. Please take a look at the article and the reference to the code

      Reply
  2. RK says

    11/05/2018 at 3:44 am

    Looks like it didn't work for vCSA 6.7 with vSAN 6.7 anymore? The same code worked for vCSA 6.5 / vSAN 6.6, but not the latest anymore. I've got "Specified argument was out of the range of valid values" on PowerCli "Get-VSANView -Id "vsanVcClusterHealthSystem-vsan-cluster-health-system".

    Reply
  3. Thomas says

    04/14/2021 at 2:45 am

    Hi, is there a way to report the Disk capacity from a Single Disk in a vSAN Diskgroup ?

    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

  • Self-Contained & Automated VMware Cloud Foundation (VCF) deployment using new VLC Holodeck Toolkit 03/29/2023
  • ESXi configstorecli enhancement in vSphere 8.0 Update 1 03/28/2023
  • ESXi on Intel NUC 13 Pro (Arena Canyon) 03/27/2023
  • Quick Tip - Enabling ESXi Coredumps to be stored on USB 03/26/2023
  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/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...