- DSM UI show only one Infrastructure policy. However, DSE (VCD DSM UI) would show multiple policies under Infrastructure policies tab.
- On vCenter under DSM, we see only one Infrastructure policy.
- The below VCD DSM integration UI show multiple infrastructure policies.
VMware DSM 2.2.1
VMware Cloud Director
The issue is seen when DSM was integrated with VCD and was removed or destroyed without proper steps. This would leave the infrastructure policies associated older DSM to show on DSE UI though those policies does not appear on vCenter or DSM UI as the DSM has been redeployed and old one was destroyed.
There is no specific solution from UI to remove them though there is no tenant associated with it.
Use the RDE API to list the infra policies using the below curl 'https://<vcd-host>/cloudapi/1.0.0/entities/types/vmware/dsInfrastructurePolicy/' \
-H 'Accept: application/json;version=38.1' \
-H 'authorization: Bearer xxx'
The above API would generate json
file and would include all the Infrastructure policies associated with DSE. The dsInfrastructurePolicy-response.json
would show the report as below.
Out of the below policies, only one policy is ACTIVE and associated with current DSM and vCenter. The rest of the policies have different ID and can be deleted manually.
{"resultTotal":4,"pageCount":1,"page":1,"pageSize":25,"associations":null,"values":
[
{"id":"urn:vcloud:entity:vmware:dsInfrastructurePolicy:f701a4b1-bd72-40ca-9b1d-####","entityType":"urn:vcloud:type:vmware:dsInfrastructurePolicy:0.1.1","name":"policy-name","externalId":null,"entity":{"kind":"DSInfrastructurePolicy","spec":{"enabled":true,"vmClasses":["large","medium","small"],"description":"","storagePolicies":["StoragePolicy_PLATINUM"],"enableCrossClusterHA":false},"status":{"vmClasses":[{"cpu":"8","name":"large","memory":"16"},{"cpu":"4","name":"medium","memory":"8"},{"cpu":"2","name":"small","memory":"4"}]},"metadata":{"name":"company","annotations":{"vcd-ds/infra-id":"b88a155a-b3cb-4116-aec3-####"},"creationTimestamp":"2025-03-26T10:52:02Z"},"apiVersion":"vcloud.vmware.com/v1alpha1"},"state":"RESOLVED","entityState":"RESOLVED","owner":{"name":"iij_tran","id":"urn:vcloud:user:4dd5848e-e060-4e56-b126-####"},"org":{"name":"System","id":"urn:vcloud:org:a93c9db9-7471-3192-8d09-####"}},
{"id":"urn:vcloud:entity:vmware:dsInfrastructurePolicy:d7522f9d-4bf4-45d2-a633-####","entityType":"urn:vcloud:type:vmware:dsInfrastructurePolicy:0.1.1","name":"vcdds-dsm-pol","externalId":null,"entity":{"kind":"DSInfrastructurePolicy","spec":{"enabled":true,"vmClasses":["large","medium","small"],"description":"","storagePolicies":["StoragePolicy_GOLD"],"enableCrossClusterHA":false},"status":{"vmClasses":[{"cpu":"8","name":"large","memory":"16"},{"cpu":"4","name":"medium","memory":"8"},{"cpu":"2","name":"small","memory":"4"}]},"metadata":{"name":"vcdds-dsm-pol","annotations":{"vcd-ds-meta/infra-id":"f9a24bca-50f0-4961-ad42-####"},"creationTimestamp":"2025-03-22T05:41:11Z"},"apiVersion":"vcloud.vmware.com/v1alpha1"},"state":"RESOLVED","entityState":"RESOLVED","owner":{"name":"iij_tran","id":"urn:vcloud:user:4dd5848e-e060-4e56-b126-####"},"org":{"name":"System","id":"urn:vcloud:org:a93c9db9-7471-3192-8d09-####"}},
{"id":"urn:vcloud:entity:vmware:dsInfrastructurePolicy:e4be71e7-1f49-4501-81f3-####","entityType":"urn:vcloud:type:vmware:dsInfrastructurePolicy:0.1.1","name":"company-dsm-policy","externalId":null,"entity":{"kind":"DSInfrastructurePolicy","spec":{"enabled":true,"vmClasses":["large","medium","small"],"description":"","storagePolicies":["StoragePolicy_PLATINUM","StoragePolicy_GOLD"],"enableCrossClusterHA":false},"status":{"vmClasses":[{"cpu":"8","name":"large","memory":"16"},{"cpu":"4","name":"medium","memory":"8"},{"cpu":"2","name":"small","memory":"4"}]},"metadata":{"uid":"urn:vcloud:entity:vmware:dsInfrastructurePolicy:e4be71e7-1f49-4501-81f3-####","name":"company-dsm-policy","annotations":{"vcd-ds-meta/infra-id":"f9a24bca-50f0-4961-ad42-####","vcd-ds-meta/object-hash":"6bd8b77c47"},"creationTimestamp":"2025-03-22T05:41:11Z"},"apiVersion":"vcloud.vmware.com/v1alpha1"},"state":"RESOLVED","entityState":"RESOLVED","owner":{"name":"iij_tran","id":"urn:vcloud:user:4dd5848e-e060-4e56-b126-####"},"org":{"name":"System","id":"urn:vcloud:org:a93c9db9-7471-3192-8d09-####"}},
{"id":"urn:vcloud:entity:vmware:dsInfrastructurePolicy:47b88177-bd01-45f4-8291-####","entityType":"urn:vcloud:type:vmware:dsInfrastructurePolicy:0.1.1","name":"company-dsm","externalId":null,"entity":{"kind":"DSInfrastructurePolicy","spec":{"enabled":true,"vmClasses":["large","medium","small"],"description":"","storagePolicies":["StoragePolicy_PLATINUM"],"enableCrossClusterHA":false},"status":{"vmClasses":[{"cpu":"8","name":"large","memory":"16"},{"cpu":"4","name":"medium","memory":"8"},{"cpu":"2","name":"small","memory":"4"}]},"metadata":{"name":"company-dsm","annotations":{"vcd-ds-meta/infra-id":"cb5c8bdb-cf4b-4d83-8c07-####"},"creationTimestamp":"2025-04-01T09:04:43Z"},"apiVersion":"vcloud.vmware.com/v1alpha1"},"state":"RESOLVED","entityState":"RESOLVED","owner":{"name":"iij_tran","id":"urn:vcloud:user:4dd5848e-e060-4e56-b126-####"},"org":{"name":"System","id":"urn:vcloud:org:a93c9db9-7471-3192-8d09-####"}}]}
- Once the STALE policies are identified, the below API can be used to delete the policies that are not required.
curl -X DELETE 'https://<vcd_host>/cloudapi/1.0.0/entities/urn:vcloud:entity:vmware:dsInfrastructurePolicy:16120cdc-81be-40d8-b54c-####'' \
-H 'Accept: application/json;version=38.1' \
-H 'authorization: Bearer xxx'
/cloudapi/1.0.0/entities/types/vmware/dsStorageLocation/
and this is the delete backup location RDE api path example /cloudapi/1.0.0/entities/urn:vcloud:entity:vmware:dsStorageLocation:dd63aa7f-2317-4a43-b5e0-####