Problem: When customers try to Destroy a DataStore, they might get this alert:
“Failed to unmount and detach datastore. Please ensure that there are no registered VMs on this datastore and try again. Then it’s 1/2 deleted and inaccessible in vcenter.” With Pure vSphere plugin 4.2.x.
Please check these in your environment.
Before unmounting a LUN, ensure that:
- If the LUN is being used as a VMFS datastore, all objects, (such as virtual machines, snapshots, and templates) stored on the VMFS datastore are unregistered or moved to another datastore.
- Note: All CD/DVD images located on the VMFS datastore must also be unregistered from the virtual machines.
- The datastore is not used for vSphere HA heartbeat.
- The datastore is not part of a datastore cluster.
Ref Kb: https://kb.vmware.com/s/article/2004605
- Please also ensure that this Datasore only uses Pure Luns.
- If this datastore used as heartbeat datastore, you may need to switch that role. (Consult Vmware for this operation).
- If there is any host in maintenance mode, make sure to rescan storage/hba for that hosts manually.