Why it matters
An idle VM bills for every hour it runs. Test machines and leftovers from old projects are common examples.How nOps finds it
This recommendation comes from Azure Advisor, which looks at the VM’s peak (P95) CPU, memory and network use over its lookback period and recommends shutting it down. nOps imports Advisor’s recommendations daily and checks each one against your own Azure bill for the last 7 complete days: the resource must still be billed in the last 3 days of that window, and Advisor’s estimate is capped at what the resource actually cost (Advisor prices at pay-as-you-go rates, so you may pay less through discounts, reservations or savings plans). Recommendations worth less than $1 a month are left out.Before you start
Confirm with the owner that nothing depends on the VM, including scheduled or occasional jobs.How to implement
- Confirm with the owner what the VM runs and whether it is still needed.
- To keep it, stop it from the Azure portal (Stop) or with
az vm deallocate --resource-group RESOURCE_GROUP --name VM_NAME, so it shows Stopped (deallocated). Shutting down from inside the operating system does not stop compute billing. - If it is no longer needed, take a snapshot of any disk you might need, then delete the VM and its disks, and remove it from Terraform, Bicep or ARM templates.
Risks and considerations
- Managed disks and reserved public IPs keep billing while the VM is deallocated.
- A deallocated VM can get a new dynamic public IP when it starts again.
- Deleting cannot be undone; take snapshots first if the data may be needed.
FAQs
Is stopping the VM enough?
Is stopping the VM enough?
Only if it is deallocated. A VM shut down from inside the operating system stays allocated and keeps billing for compute.