Delete VM with all associated resources
Deleting a VM is a lot of click work. I have to manually delete the associated Network interface, Network security group, Public IP address. And then, from the associated storage account, I have to drill down into the VHD container in the right Blob to delete the associated .vhd and .status files.
Also, I have to do it in the right order, because there are dependencies between the various objects. If not, it fails, and I get a big fat pink error.
Also, the overview list does not refresh after the 'success' notification is posted, so I sit there guessing which of the resources I already deleted and which I didn't.
It all feels boring, not fun and tedious!
This is still coming. The work is being completed now and we will be able to expose it in a few months.
We should definately have an option to delete associated resources when the respective vm is deleted. Creating new resource group for each vm is not feasible solution. Do we have any update on this?
once i have deleted a resource group containing VMs , is there any way i can get the resource group and VMs back, when backup is even not taken?
ok, this is ridiculous. I'm guessing I can do it PowerShell, but why?? 2nd request would be a tree node/filter that shows all orphaned resources and way to remove all of them.
Unfortunately, the resource group deletion does not work because 90% of customers have many other VMs under the same resource group.
Tzur Turkenitz commented
Microsoft, could you please provide an update?
My mouse is wearing down from all the clicks I have to make when I delete VMs.
Thomas Conté commented
You could also use tags to identify all resources associated to a specific VM, and then use this tag to delete the VM and related resources. But it would be great to have an API to e.g. enumerate all resources related to a VM so they can be deleted.
any more news on this, I can delete the public ips and nics but not the associated vhd files. Which SDK do I use?
Sergey Pak commented
I need to start/stop VMs hundreds times a day. Is it okay to create a separate resource group for every new VM? Looks like deleting a resource group is time-consuming procedure
If a VM has a Static IP address assigned, and the VM is deleted without first removing it, how long before that IP address will be released for re-use?
Tom Callahan commented
Azure Portal team, a resource group for every VM is not a solution. Please provide an option to delete all associated objects related to the Virtual Machine as the default, which can be disabled if need be. More often than not I would guess people want to delete all objects associated, instead of having to go item by item
Joost Molenaar commented
Cool, thanks for considering it!