Unable to delete a vSAN Storage Policy that shows no VMs associated with it.
search cancel

Unable to delete a vSAN Storage Policy that shows no VMs associated with it.

book

Article ID: 326866

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

This article outlines potential causes of being unable to delete a vSAN Storage Policy.

Symptoms:
When attempting to delete a Storage Policy via the vSphere Web Client the task fails stating that the policy is in use:
The selected VM storage policy is in use and cannot be deleted

Environment

VMware vSAN 7.0.x
VMware vSAN 6.x
VMware vSAN 8.0.x

Cause

There are a number of ways a vSAN Storage Policy can be in use other than being applied to registered VMs in vCenter:
  • There are VMs residing on vsanDatastore with the applied Storage Policy in use that are no longer registered in inventory - these will not show in the 'VMs' tab of the Storage Policy.
  •  There are healthy/unhealthy Unassociated Objects with the Storage Policy applied. Procedures for identifying Unassociated vSAN objects. (70726)
  • The vSAN Performance stats Object has this Storage Policy applied:
    • Cluster > Configure > vSAN > Services > Performance Service > Stats object storage policy
  • A vSAN namespace is being used for host logging (unsupported) and has this policy applied.
  • Other non-VM Objects are using the Storage Policy including but not limited to:
    • ISOs or other miscellaneous use namespace directories
    • Content Libraries
  • The Storage Policy in question is set as the vsanDatastore default policy:
    • Datastores > vsanDatastore > Configure > Default Storage Policy
  • The policy is the 'vSAN Default Storage Policy' that is automatically generated on cluster creation - this cannot be renamed or deleted, only changes to the rules of this policy can be changed.

Resolution

Check to see if any of the examples listed in the "Cause" section above are using the vSAN Storage Policy to be deleted. If so then either delete the unassociated objects if no longer in use, otherwise change the Storage Policy to a different policy other than the one to be deleted.

Note: Open a case with vSAN Support for assistance with deleting unassociated objects