Why it matters
Premium SSD disks of stopped VMs can cost more than the VM did, and they are easy to miss because the VM looks switched off.How nOps finds it
nOps reads your Azure VM billing. Billing does not link disks to VMs, so nOps uses Azure’s default disk names (the VM name followed by _OsDisk or _DataDisk) in the same subscription and resource group. Disks are flagged when they were billed on every one of the last 14 complete days while the VM they are named after had no billed usage at all. Disks with custom names are not checked. The saving is what the disks cost in the last 7 days, net of discounts and scaled to a month, and must be at least $2 a month.Before you start
Confirmation from the VM owner that it will not be started again, and permission to snapshot and delete disks.How to implement
- Ask the VM owner whether the VM will be started again. Some stopped VMs are restarted within a month.
- If the data might be needed later, take a snapshot of each disk (Disk → Create snapshot, or
az snapshot create --resource-group MY_RG --name MY_SNAPSHOT --source DISK_ID --incremental true). - Delete the VM and its disks together, or delete only the disks (
az disk delete --resource-group MY_RG --name MY_DISK). - Remove the VM from Terraform, Bicep or ARM templates if it is defined there.
Risks and considerations
- Deleting a disk is permanent. Take a snapshot first if there is any chance the data is needed.
- A VM whose OS disk is deleted cannot be started again. You would recreate it from a snapshot.
- Snapshots cost much less than disks, but they still cost something. Delete them when they are no longer needed.
FAQs
Why are some disks of stopped VMs not flagged?
Why are some disks of stopped VMs not flagged?
nOps matches disks to VMs by Azure’s default disk names. Disks with custom names cannot be linked to a VM from billing, so they are not checked.