June 12, 2024

Updated Pure Storage FlashArray Best Practices Checker for vSphere (v5)

I’m happy to announce that I’ve updated the Pure Storage Best Practices Checker for VMware vSphere.

If you aren’t familiar with the Best Practices Checker, it is a PowerShell script that will look at a vSphere environment and check each vSphere Host to ensure it is properly configured when connected to FlashArray.

I was introduced to the previous version when I started at Pure Storage in 2020. Cody Hosterman had been managing this script (v4.5), and it can be found in his personal GitHub repository here: https://github.com/codyhosterman/powercli/blob/master/bestpracticechecker.ps1

Cody put a LOT of work into this script, and I champion him for his efforts. He’s truly a machine. I knew this as an outsider to Pure, and am even more aware of this as I’ve come to work here. But Cody has only so many cycles, so I asked to take on the task of updating the script.

Why did it need to be updated?

Well, some things have changed since the last update (April 15, 2018):

  • vSphere 6.7 Update 1, which added the Latency SATP option (October 16, 2018)
    This is a new SATP rule for storage, and while it is available, vSphere 6.x versions of vSphere still have a recommendation of iops=1. This is the default for vSphere 6.0 Patch 5 or later, vSphere 6.5 Update 1 or later, and vSphere 6.7.
  • vSphere 6.0 P08 (September 12, 2019),vSphere 6.5 P03 (November 29, 2018) – PR 2078782/2156841
    These releases, along with vSphere 6.7 Update 1, address the DiskMaxIOSize recommendation for earlier releases to be 4MB, rather than the 32MB default. Cody covers this in a blog post here: https://www.codyhosterman.com/2020/08/disk-diskmaxiosize-and-the-blue-screen-of-death/ The TL/DR is that this no longer needs to be changed with more recent releases of vSphere.
  • vSphere 7.0 GA released, which added support for NVMe-oF datastores (April 2, 2020)
    The Latency SATP added in vSphere 6.7U1 is now the default for Pure Storage FlashArray devices.

The previous release (v4.5) unfortunately required some updates to address the SATP rule change, as well as the DiskMaxIOSize setting, both dependent on the versions of vSphere being used.

It isn’t uncommon to see several different releases of vSphere installed, and it didn’t make sense to have different scripts for each.

This script will determine vSphere versions, and check the settings appropriately for different releases.

Also, now that PowerShell added support (with PowerShell Core) for Windows/Linux/Mac OS environments, it only made sense to update it to run on PowerShell Core as well as PowerShell Desktop.

I’ve dispensed with the use of forms, as it really isn’t worth the effort on PowerShell Core.

The log generated after each run will be created in the same directory as the execution of the script, and a text menu will allow you to choose either all hosts connected to vCenter or only hosts in a selected cluster.

The output is also a little cleaner as well.

What it doesn’t do

There are a couple of other things that I need to call attention to, that neither the old, nor updated script address. These are:

  • NVMe-oF configuration – This is not checked yet – I’m hoping to steal some time in Cody’s lab to add this support
  • It doesn’t check Pure volume to Host/Host Group relationships – Suggest using the Pure Storage Plugin for vSphere version 4.5 or higher to view these

Where can I find it?

The updated script can be found in the VMware Scripts repository on Pure Storage Open Connect site on GitHub.


It only made sense to post it there, with all the other contributions of code that can be used to manage and take advantage of Pure Storage’s code integrations.

What’s next?

Honestly, I had been working on this script for a while, with the ability to see some inline reporting, as well as the ability to feed this best practice checker into other scripts for even greater extensibility.

I refocused on getting the script updated a few weeks ago, and left most of that largely by the wayside. But rest assured, I plan on trying to add those capabilities, as well as at some point include some native cmdlets in the Pure Storage FlashArray VMware module.

And now that VMware has released Parallel Foreach support with PowerCLI 12.2, I might have to look at parallelizing it…

Until then, let us know what you think, and feel free to report any issues on GitHub.

3 thoughts on “Updated Pure Storage FlashArray Best Practices Checker for vSphere (v5)

  1. Great work !
    Just a little error line 213 preventing to write the Disk.DiskMaxIOSize recommended value in the logfile :
    $MaxIOReommended instead of $MaxIORecommended

    1. Just seeing this question.

      Sorry Mike, one of the folks that handles our PowerShell SDK would probably be the ones to update that, as I moved on to another role here at Pure in mid 2022.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.