azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Deleting a VM does not delete its network resources and attached disks

Open Vijayaraghavanl opened this issue 10 years ago • 5 comments

When resource manager VM's are deleted its network resources and attached disks do not get deleted automatically and are required to be deleted manually. Like to have an option that would allow us to choose to delete the attached disks and network resource.

Vijayaraghavanl avatar Jan 12 '16 04:01 Vijayaraghavanl

@Vijayaraghavanl Thanks for the suggestion. Adding the service team folks to help take a look. One mitigation would be to place these assets in a resource group, so that the resource group could be deleted. This doesn't work for all scenarios, however.

markcowl avatar Jan 14 '16 20:01 markcowl

@Vijayaraghavanl I believe the ability to delete the attached disks is coming, not sure about the timelines. Not sure about the NICs. I'll forward the suggestion to the service owners. Also adding networking tag for networking team's visibility.

singhkays avatar Jan 19 '16 18:01 singhkays

from a networkging prespective this is expected. The nics that were created on the VM can be reused by another VM (once the previous VM has been deleted)

DeepakRajendranMsft avatar Mar 12 '16 00:03 DeepakRajendranMsft

Closing this issue as this has been answered and works as designed.

markjbrown avatar May 12 '16 20:05 markjbrown

My script here in the following link can solve this http://cloudcompute.info/delete-azure-vm-and-all-associated-resources-using-powershell-script/

Thanks, Manu

azureonline-in avatar May 29 '20 22:05 azureonline-in