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.
Step 1 - Power off all virtual machines, then log in to the ESX Host Client and permanently delete the virtual machines.
Step 2 - Place the ESX host into Maintenance Mode. For vSAN-enabled hosts, select No Data Migration.
Step 3 - If NVMe Tiering is enabled on the ESX host, delete the NVMe Tiering partition.
For ESX 9.1, use the following command:
esxcli memtier config delete
For ESX 9.0, use the following command:
esxcli system tierdevice -d /vmfs/devices/disks/<disk>
Step 4 - If the ESX host has been configured with vSAN ESA, use the vdq utility to identify the vSAN disk and then clear the vSAN partition.
vdq -q
esxcli vsan storagepool remove -d /vmfs/devices/disks/<disk>
Step 5 - Identify the ESX installation device by running the following command. Look for the storage device that contains the ESX partition layout, including the two bootbank partitions, and make a note of the device name.
ls -l /vmfs/devices/disks

We can inspect the device to confirm the ESX partition by using the following command:
partedutil getptbl /vmfs/devices/disks/<disk>
![]()
Finally, we will delete partition 1,5,6 & 8 which will be the minimum to be able to reboot and reinstall ESX whether that is manual or through automated process.
partedutil delete /vmfs/devices/disks/<disk> X
Thanks for the comment!