I often redeploy my VMware Cloud Foundation (VCF) lab environment for a variety of reasons, from testing customer scenarios to testing the next version of our software. Because I have fully automated the ESX installation and configuration process in my lab, reinstalling ESX is a trivial task that takes less than 5 minutes from power-on to a fully configured system ready for VCF.
When reinstalling ESX, especially on systems configured with NVMe Tiering, vSAN, and local VMFS storage, the real challenge is clearing the existing partitions so the system is ready for a fresh installation. Traditionally, this can involve several manual steps and, in some cases, booting from a Linux live CD to remove stubborn partitions.
Given how frequently I redeploy my environment, I have developed the following workflow that consistently cleans up the various storage configurations without requiring a separate live CD environment. As I was performing yet another ESX reinstallation while writing this post, I realized I had never documented my workflow, so I thought I would share it in case it helps others.