Skip to content

Commit 81f7c56

Browse files
Merge pull request #224604 from cynthn/patch-32
Update delete.md - fixes https://github.com/MicrosoftDocs/azure-docs/issues/104099
2 parents 7d30c4f + 3d2f1e4 commit 81f7c56

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

articles/virtual-machines/delete.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/provider
171171

172172
## Update the delete behavior on an existing VM
173173

174-
You can change the behavior when you delete a VM. The following example updates the VM to delete the NIC, OS disk, and data disk when the VM is deleted.
174+
You can change the behavior when you delete a VM.
175175

176176
### [CLI](#tab/cli3)
177177

@@ -183,6 +183,8 @@ az resource update --resource-group myResourceGroup --name myVM --resource-type
183183

184184
### [REST](#tab/rest3)
185185

186+
The following example updates the VM to delete the NIC, OS disk, and data disk when the VM is deleted.
187+
186188
```rest
187189
PATCH https://management.azure.com/subscriptions/subID/resourceGroups/resourcegroup/providers/Microsoft.Compute/virtualMachines/testvm?api-version=2021-07-01
188190
@@ -317,18 +319,18 @@ You can use the Azure REST API to apply force delete to your virtual machines. U
317319

318320
---
319321

320-
## Force Delete for virtual machine scale sets
322+
## Force Delete for scale sets
321323

322-
Force delete allows you to forcefully delete your **Uniform** virtual machine scale sets, reducing delete latency and immediately freeing up attached resources. . Force Delete will not immediately free the MAC address associated with a VM, as this is a physical resource that may take up to 10 min to free. If you need to immediately re-use the MAC address on a new VM, Force Delete is not recommended. Force delete should only be used when you are not intending to re-use virtual hard disks. You can use force delete through Portal, CLI, PowerShell, and REST API.
324+
Force delete allows you to forcefully delete your **Uniform** Virtual Machine Scale Set, reducing delete latency and immediately freeing up attached resources. . Force Delete will not immediately free the MAC address associated with a VM, as this is a physical resource that may take up to 10 min to free. If you need to immediately re-use the MAC address on a new VM, Force Delete is not recommended. Force delete should only be used when you are not intending to re-use virtual hard disks. You can use force delete through Portal, CLI, PowerShell, and REST API.
323325

324326
### [Portal](#tab/portal5)
325327

326-
When you go to delete an existing virtual machine scale set, you will find an option to apply force delete in the delete pane.
328+
When you go to delete an existing scale set, you will find an option to apply force delete in the delete pane.
327329

328330
1. Open the [portal](https://portal.azure.com).
329-
1. Navigate to your virtual machine scale set.
331+
1. Navigate to your Virtual Machine Scale Set.
330332
1. On the **Overview** page, select **Delete**.
331-
1. In the **Delete virtual machine scale set** pane, select the checkbox for **Apply force delete**.
333+
1. In the **Delete Virtual Machine Scale Set** pane, select the checkbox for **Apply force delete**.
332334
1. Select **Ok**.
333335

334336
### [CLI](#tab/cli5)
@@ -355,7 +357,7 @@ Remove-AzVmss `
355357

356358
### [REST](#tab/rest5)
357359

358-
You can use the Azure REST API to apply force delete to your virtual machine scale set. Use the `forceDeletion` parameter for [Virtual Machines Scale Sets - Delete](/rest/api/compute/virtual-machine-scale-sets/delete).
360+
You can use the Azure REST API to apply force delete to your scale set. Use the `forceDeletion` parameter for [Virtual Machines Scale Sets - Delete](/rest/api/compute/virtual-machine-scale-sets/delete).
359361

360362
---
361363

@@ -376,9 +378,9 @@ A: This feature is supported on all managed disk types used as OS disks and Data
376378
A: No, this feature is only available on disks and NICs associated with a VM.
377379

378380

379-
### Q: How does this feature work with Flexible virtual machine scale sets?
381+
### Q: How does this feature work with Flexible Virtual Machine Scale Set?
380382

381-
A: For Flexible virtual machine scale sets the disks, NICs, and PublicIPs have `deleteOption` set to `Delete` by default so these resources are automatically cleaned up when the VMs are deleted.
383+
A: For Flexible Virtual Machine Scale Set the disks, NICs, and PublicIPs have `deleteOption` set to `Delete` by default so these resources are automatically cleaned up when the VMs are deleted.
382384

383385
For data disks that were explicitly created and attached to the VMs, you can modify this property to ‘Detach’ instead of ‘Delete’ if you want the disks to persist after the VM is deleted.
384386

0 commit comments

Comments
 (0)