You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-vmware/configure-storage-policy.md
+78Lines changed: 78 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,6 +171,84 @@ Run the `Update-StoragePolicyOfUnassociatedVsanObjects` cmdlet to modify curre
171
171
172
172
3. Check **Notifications** to see the progress.
173
173
174
+
## Delete unassociated vSAN objects using Run Command
175
+
176
+
Unassociated vSAN objects can remain in a cluster due to interrupted operations, policy mismatches, or failed workflows. These objects consume storage capacity and may block certain cluster operations.
177
+
178
+
This article explains how to **list** and **delete** unassociated vSAN objects in **Azure VMware Solution (AVS)** using **Run Command**.
179
+
180
+
### Prerequisites
181
+
182
+
Before listing or deleting unassociated vSAN objects, ensure that:
183
+
184
+
- You have access to the Azure portal with permissions equivalent to the **cloudadmin** role for the AVS private cloud.
185
+
- The cluster meets the minimum host requirements for its vSAN configuration (OSA or ESA).
186
+
- You are using the latest supported version of the **Microsoft.AVS.Management** Run Command package.
187
+
- You have validated that the objects to be deleted are **not required** by any workload, management VM, or system component.
188
+
189
+
### List unassociated vSAN objects
190
+
191
+
Before deleting any objects, list and review them to confirm that they are truly unassociated.
192
+
193
+
Use the **Get‑UnassociatedVsanObjectsWithPolicy** Run Command to list unassociated vSAN objects and obtain their UUIDs.
194
+
195
+
For detailed steps, see:
196
+
197
+
-[List storage policies for Unassociated objects](configure-storage-policy.md#list-storage-policies-for-unassociated-objects)
198
+
199
+
The output of this command includes the **UUID** of each unassociated vSAN object, which is required for deletion.
200
+
201
+
202
+
### Delete unassociated vSAN objects
203
+
204
+
After reviewing the list of unassociated objects, delete them **individually** by specifying their UUID and ClusterName.
205
+
206
+
> [!IMPORTANT]
207
+
> Deleting a vSAN object is irreversible. Ensure that the object is not associated with any VM, management component, or system service before proceeding.
208
+
209
+
### Run Command parameters: `Remove-AvsUnassociatedObject`
210
+
211
+
| Field | Description |
212
+
|------|-------------|
213
+
|**UUID**| UUID of the unassociated vSAN object to delete. Obtain this value from the output of `Get‑UnassociatedVsanObjectsWithPolicy`. |
214
+
|**ClusterName**| Name of the vSAN cluster that contains the unassociated object. |
215
+
|**Retain up to**| Retention period for the Run Command output. |
216
+
|**Specify name for execution**| Alphanumeric name used to identify this Run Command execution. |
217
+
|**Timeout**| Time after which the command exits if it does not complete. |
218
+
219
+
1. Navigate to your AVS private cloud in the Azure portal.
:::image type="content" source="media/run-command/run-command-overview-remove-unassociated-object.png" alt-text="Screenshot showing the Remove-AvsUnassociatedObject Run Command in the Azure portal." lightbox="media/run-command/run-command-overview-remove-unassociated-object.png":::
224
+
225
+
4. Provide the **UUID** and **ClusterName** of the unassociated object you want to remove.
226
+
227
+
:::image type="content" source="media/run-command/run-command-remove-unassociated-object.png" alt-text="Screenshot of the Remove-AvsUnassociatedObject Run Command execution." lightbox="media/run-command/run-command-remove-unassociated-object.png":::
228
+
229
+
5. Select **Run** and monitor execution progress.
230
+
231
+
Once the command completes successfully, the specified vSAN object is permanently removed from the cluster.
232
+
233
+
### Best practices and safety guidance
234
+
235
+
- Always **list objects first** and review them carefully before deletion.
236
+
- Delete objects **one at a time** to minimize risk.
237
+
- Avoid deleting objects with names or attributes associated with:
238
+
- Management VMs
239
+
- vCenter
240
+
- NSX
241
+
- HCX
242
+
- SRM
243
+
- Backup or replication components
244
+
- If you are unsure about an object, do not delete it and investigate further.
245
+
246
+
### Next steps
247
+
248
+
- Review storage policy assignments to prevent future unassociated objects.
249
+
- Monitor vSAN health checks regularly.
250
+
- Use Run Command outputs and retention settings to maintain auditability.
251
+
174
252
## Specify a storage policy for a cluster
175
253
176
254
Run the `Set-ClusterDefaultStoragePolicy` cmdlet to specify a default storage policy for a cluster.
0 commit comments