WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple

VSAN vCheck Plugins

04.07.2014 by William Lam // 5 Comments

After creating my VSAN Configuration Maximum query script I thought it would also be useful to create an equivalent set of VSAN vCheck Plugins. For those of you who have not heard of or used vCheck (pretty rare unless you do not use PowerShell/PowerCLI in your environment), it is a PowerShell reporting HTML framework created by Alan Renouf. vCheck allows you to schedule a series of PowerCLI scripts/checks against your vSphere environment and produces a daily report on the things you care most about such as datastore capacity being under a certain threshold or potential snapshots growing out of control in your environment.

Given this is the primary use case for vCheck, I figure it would make sense to implement these same set of VSAN configuration maximum checks in vCheck as well. This would also give me the opportunity to learn more about vCheck as I have never used it before. If you are new to vCheck, I highly recommend you check out Jonathan Medd's article on how to get started with vCheck here.

Here is a sample report of a real VSAN environment to get an idea of what the report could look like: VSAN-vCheck-Report.html

Below are the VSAN vCheck Plugins that I have created which also includes a bonus plugin which reports on the capacity of a VSAN Datastore. You can pick and choose the VSAN plugins that you want to use in your environment and then customize the threshold parameter for each report based on your requirements.

  1. 990 VSAN Capacity Report.ps1
  2. 991 VSAN Configuration Maximum Disk Group Per Host Report.ps1
  3. 992 VSAN Configuration Maximum Magnetic Disks Per Disk Group Report.ps1
  4. 993 VSAN Configuration Maximum Total Magnetic Disks In All Disk Groups Per Host Report.ps1
  5. 994 VSAN Configuration Maximum Component Per Host Report.ps1
  6. 995 VSAN Configuration Maximum Hosts Per Cluster Report.ps1
  7. 996 VSAN Configuration Maximum VMs Per Host Report.ps1
  8. 997 VSAN Configuration Maximum VMs Per Cluster Report.ps1

For those of you who are looking to evaluate VSAN in their environment, hopefully these VSAN vCheck reports will come in handy. If there are others that you feel that might be useful, feel free to leave a comment or contribute back to the vCheck project on Github.

Categories // VSAN, vSphere 5.5 Tags // configuration maximum, PowerCLI, vCheck, VSAN, vsanDatastore, vSphere API

Exploring VSAN APIs Part 8 – Maintenance Mode

04.02.2014 by William Lam // Leave a Comment

When it is time to patch, upgrade or service an ESXi host running VSAN, the first thing you will want to do is to place the host into Maintenance Mode. If you have never performed this operation on a VSAN host before, you should be aware that there is a new option to specify how the data for VSAN will be migrated. Below is a screenshot of the three options provided when using the vSphere Web Client.

vsan-host-maint-0
To learn more about the new VSAN data migration option, I highly recommend you check out Cormac Hogan's blog article here which goes into more detail. From a vSphere API point of view, the Maintenance Mode operation is still being provided by the traditional EnterMaintenanceMode_Task() method, but there is now a new optional property called HostMaintenanceSpec that specifies the option (exposed as an enum) to use for VSAN data migration. To demonstrate this functionality, I have created a sample vSphere SDK for Perl script called vsanHostMaintenanceMode.pl

Disclaimer:  These scripts are provided for informational and educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

The script requires three input parameters:

  • vihost - Name of the ESXi host to perform the maintance mode operaton
  • operation - The operation to perform [enter|exit]
  • mode - The VSAN data migration policy [ensure|evac|no]

Here is an example of placing an ESXi host into Maintenance Mode using the "Ensure Accessibility" VSAN data migration option:

./vsanHostMaintenanceMode.pl --server vcenter55-1.primp-industries.com --username root --vihost vesxi55-1.primp-industries.com --operation enter --mode ensure

vsan-host-maint-1
To take the ESXi host out of Maintance Mode, you can run the following command:

./vsanHostMaintenanceMode.pl --vcenter55-1.primp-industries.com --username root --vihost vesxi55-1.primp-industries.com --operation exit

vsan-host-maint-2

  1. Exploring VSAN APIs Part 1 – Enable VSAN Cluster
  2. Exploring VSAN APIs Part 2 – Query available SSDs
  3. Exploring VSAN APIs Part 3 – Enable VSAN Traffic Type
  4. Exploring VSAN APIs Part 4 – VSAN Disk Mappings
  5. Exploring VSAN APIs Part 5 – VSAN Host Status
  6. Exploring VSAN APIs Part 6 – Modifying Virtual Machine VM Storage Policy
  7. Exploring VSAN APIs Part 7 – VSAN Datastore Folder Management
  8. Exploring VSAN APIs Part 8 – Maintenance Mode
  9. Exploring VSAN APIs Part 9 – VSAN Component count
  10. Exploring VSAN APIs Part 10 – VSAN Disk Health

Categories // VSAN, vSphere 5.5 Tags // maintenance mode, VSAN, vSphere API

VSAN Configuration Maximum Query Script

03.31.2014 by William Lam // 1 Comment

In addition to the vSphere Web Client, a great way to further explore VSAN in greater depth is by leveraging RVC and the new VSAN namespace on the command-line. If you have not played with the new the VSAN commands in RVC, Florian Grehl has written a fantastic series that is worth checking out here. While exploring the VSAN commands myself, one command that particularly stood out to me was the vsan.check_limits. The command provides a quick summary of the internal VSAN limits based on your current VSAN Cluster and configuration.

vsan-configuration-maximum-script-0
This actually got me thinking about the vSphere Configuration Maximums for VSAN and how manual of a process it is today to validate that you are currently running within the supported maximums not only for VSAN but for other areas as well. I thought it would be useful have a script that you could periodically validate the current VSAN configuration maximums against an existing VSAN Cluster. Creating this script was also a nice way for me to take what I have learned about the VSAN APIs over these last couple of weeks in my Exploring VSAN APIs series and build something that could be useful.

Disclaimer:  These scripts are provided for informational and educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

I created a vSphere SDK for Perl called vsanConfigMaximumCheck.pl which just accepts the name of a VSAN Cluster and will automatically check the current VSAN configuration maximums which I pulled out of the latest vSphere 5.5 Configuration Maximums document. It implements the majority of the configuration maximums that I thought made sense to display. This script works on any system with the vSphere SDK for Perl installed but does require one additional Perl Module called JSON. The script reports on the following VSAN configuration maximums:

  • VSAN Disk Groups per Host
  • Magnetic Disk per Disk Group
  • SSD Disks per Disk Group
  • Total Magnetic Disks in all Disk Groups per Host
  • Components per VSAN Host
  • Total VSAN nodes in VSAN Cluster
  • VMs per VSAN Cluster

Note: I also have plans on creating a VSAN vCheck report which is something I am still working on. Hopefully you will hear more about that very soon 🙂

Here is an example of running the script against VSAN Cluster called "VSAN-Cluster" by using the following command:

./vsanConfigMaximumCheck.pl --server vcenter55-1.primp-industries.com --username root --cluster VSAN-Cluster

Here is a screenshot of what the results would look like:
vsan-configuration-maximum-script-1
I personally think this information would be really useful to include in the vsan.check_limits RVC command but I also think it would be useful to have outside of RVC for any type of external reporting which can also leverage the vSphere API.

Categories // VSAN, vSphere 5.5 Tags // configuration maximum, VSAN, vSphere API

  • « Previous Page
  • 1
  • …
  • 42
  • 43
  • 44
  • 45
  • 46
  • …
  • 53
  • Next Page »

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

  • 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
  • vCenter Server Identity Federation with Kanidm 04/10/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...