1
votes

I mistakenly created a VM without linking it to an extant storage account. When I realized my mistake I deleted the VM and then sought to delete the storage account. I found the auto created storage account and attempted to remove the container. However even 24 hours later I get told that the container contains resources in use by the (now deleted) VM and so cannot be deleted.

Clearly there is some kind of dependency which is not apparent from the management portal which needs to be removed. I am looking for some advice on a powershell approach to investigating and resolving this issue.

1
Have you tried removing the associated disk? - Gaurav Mantri
Thanks Gaurav, that did the trick - andyks

1 Answers

1
votes

You have to disassociate the disk with the VM image (VHD) before you can delete the blob or container.

You can do so from the Windows Azure management portal. Go to the VMs tab. Choose 'DISKS' from the top menu and remove it. If I remember well, it will also ask you whether you'd also like to delete the blob (VHD) from the storage account.