6 Replies Latest reply on Jan 21, 2020 3:05 PM by LucD

    Get Details of VSAN Cluster

    sc2317 Novice


      I am looking for some script or automated way to get details of VSAN cluster like number of nodes, disk groups, RAID, Disks etc. Can someone please suggest or redirect me to the tested script to fetch details of VSAN environment.

        • 1. Re: Get Details of VSAN Cluster
          LucD Guru
          vExpertUser ModeratorsCommunity Warriors

          Have you checked the Reporting Recipes chapter in Jase's paper POWERCLI COOKBOOK FOR VMWARE VSAN

          Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
          • 2. Re: Get Details of VSAN Cluster
            sc2317 Novice


            Thanks, I have checked it and fetched most of the information. However, I am still confused how to get the health status of the VSAN cluster that details if there are any issues also on VSAN cluster.

            I could see one healthcheck script "vghetto-scripts/VSANHealthChecks.ps1 at master · lamw/vghetto-scripts · GitHub ", However I am not sure if this is getting the health of the VSAN cluster. As I am going to directly run on production environment so bit reluctant to do until I am sure what it does.

            As far as I can understand it is disabling or enabling the health checks which I don't want. I am looking or health report of VSAN cluster that includes the issues if there are any.

            • 3. Re: Get Details of VSAN Cluster
              TheBobkin Virtuoso
              VMware EmployeesvExpert

              Hello sc2317,


              You can get health info in current builds of vSAN 6.6/6.7 using:

              # esxcli vsan health cluster list


              [root@hostname:] esxcli vsan  health cluster list

              Health Test Name                                    Status

              --------------------------------------------------  --------------------------

              Overall health                                      red (Cluster health issue)

              Cluster                                             red

                ESXi vSAN Health service installation             green

                vSAN Health Service up-to-date                    green

                Advanced vSAN configuration in sync               red

                vSAN CLOMD liveness                               green

                vSAN Disk Balance                                 green

                Resync operations throttling                      red

                Software version compatibility                    green

                Disk format version                               green

              Network                                             green

                Hosts disconnected from VC                        green

                Hosts with connectivity issues                    green

                vSAN cluster partition                            green

                All hosts have a vSAN vmknic configured           green

                vSAN: Basic (unicast) connectivity check          green

                vSAN: MTU check (ping with large packet size)     green

                vMotion: Basic (unicast) connectivity check       green

                vMotion: MTU check (ping with large packet size)  green

                Network latency check                             green

              Physical disk                                       green

                Operation health                                  green

                Disk capacity                                     green

                Congestion                                        green

                Component limit health                            green

                Component metadata health                         green

                Memory pools (heaps)                              green

                Memory pools (slabs)                              green

              Data                                                green

                vSAN object health                                green

              Limits                                              green

                Current cluster situation                         green

                After 1 additional host failure                   green

                Host component limit                              green

              Performance service                                 green

                Stats DB object                                   green

                Stats master election                             green

                Performance data collection                       green

                All hosts contributing stats                      green

                Stats DB object conflicts                         green



              • 4. Re: Get Details of VSAN Cluster
                LucD Guru
                vExpertCommunity WarriorsUser Moderators

                If you want to stay with PowerCLI, you can retrieve the same with


                $clusterName = 'cluster'

                $esxcli = Get-Cluster -Name $clusterName | Get-VMHost | Get-Random | Get-EsxCli -V2


                Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                • 5. Re: Get Details of VSAN Cluster
                  sc2317 Novice



                  Thanks, Yes I can get that, However If I want details of errorr/warning of health if its "Red". For example, by using esxcli vsan health cluster get -t="Physical disk", then I get more details. Could you please suggest if I can get that by using PowerCLI ?

                  • 6. Re: Get Details of VSAN Cluster
                    LucD Guru
                    User ModeratorsCommunity WarriorsvExpert

                    You can get the status of an individual test by using the get method with the TestName.

                    Something like this (you specify the name of the test in the hash table.


                    $esxcli.vsan.health.cluster.get.Invoke(@{test='vSAN object health'})



                    Be aware that sometimes not all tests are available/valid.

                    You can check which ones are available in your environment with


                    $clusterName = 'cluster'

                    $esxcli = Get-Cluster -Name $clusterName | Get-VMHost | Get-Random | Get-EsxCli -V2

                    $esxcli.vsan.health.cluster.list.Invoke() |

                    ForEach-Object -Process {

                        Write-Host "$($_.HealthTestName): " -NoNewline



                            Write-Host -ForegroundColor green 'ok'




                            Write-Host -ForegroundColor red 'nok'



                    Blog: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
                    1 person found this helpful