John McKeown
John McKeown

Reputation: 49

Azure is tidyup after deleting VM needed?

I deleted my one Azure VM and then created a new one (so should only be 1 in total, and its the only Azure thing I made). Now I have two lots of "availability set", "public IP" and "load balancer", one set with same number suffix as new VM and a second set with a different number. My guess is that second lot are leftovers after deleting old VM. I wonder if I am being charged for them? Please, can I delete them safely without disrupting the new VM? Screenshots from Azure hereenter image description here enter image description here

Upvotes: 0

Views: 112

Answers (1)

Ked Mardemootoo
Ked Mardemootoo

Reputation: 1605

Cost of unused resources

Not all resources are charged even when they are not in use.

  1. Availability sets are completely free.
  2. Public IPs are charged an hourly fee.
  3. Basic Loadbalancers are free but Standard Loadbalancers are paid.

You can use the Azure Calculator to check the cost of each resource.

Removing unused resources

When you delete an Azure VM, Azure shows you a disclaimer:

The action will permanently delete the virtual machine 'vmname'. Associated resources (disks, virtual networks, etc) will not be deleted and can be removed manually. Do you want to continue?

Azure doesn't automatically delete those associated resources because it assumes you might want to keep the disk to attach with another VM, or you might want to keep the Network Interface Cards etc.

If you are unsure whether they are in use, you can verify if the disks (verify unattached disks) and NICs (verify unattached NIC) are unattached from any VM.

As for the Load Balancer, make sure you modify the rules/backend pools and validate that everything still works on your application. Once you're confident it's not in use, you can delete the resources.

For Public IPs, same logic. You can click on the Public IP and look at the associated to field. If it's empty - it's not in use.

Upvotes: 1

Related Questions