CostLensIdle Virtual Machine (Azure)

Idle Virtual Machine (Azure)

CostLens flags Azure VMs averaging under 5% CPU over 14 days so you can deallocate, downsize, or remove idle compute.

Updated July 20261 min read

CostLens flags idle Azure Virtual Machines — instances averaging under 5% CPU over the last 14 days, a strong idle signal. Idle VMs are the single largest source of Azure compute waste; deallocating or right-sizing one captures the full or partial compute cost.

Reversible fix

Deallocating a VM is reversible — CostLens can start it again within the 24-hour rollback window. A deallocated VM stops compute charges (you still pay for attached disks).

How it works

Monitor CPU is sampled

CostLens reads average CPU from Azure Monitor over a 14-day window for each running VM.

Idle VMs are flagged

VMs below the 5% average-CPU threshold are surfaced, with the estimated saving priced from the VM size.

Seasonal patterns are considered

Highly periodic workloads (e.g. weekend-only spikes) are de-prioritised so predictable usage isn't flagged as urgent.

What to do

  1. Confirm the VM is genuinely unused (not a warm standby or batch host that runs briefly).
  2. Deallocate to stop compute charges, or resize to a smaller SKU if it's lightly used.
  3. Apply via CostLens (Apply Fix deallocates; reversible for 24 h) once write access is granted, or in the Azure portal.

Severity levels

SeverityEstimated monthly savings
critical>$500
high$100–$500
medium$20–$100
low<$20

Required permissions

  • Detect: Reader (Monitor metrics + VM metadata) — see Azure Accounts.
  • Apply Fix (deallocate/start): a write role such as Contributor, or a custom role with Microsoft.Compute/virtualMachines/deallocate/action and .../start/action.

Limitations

  • CPU alone can miss memory- or IO-bound idleness; review before deallocating.
  • Deallocation stops compute billing but not attached disk or reserved IP charges.
CostLens
Previous
Azure Advisor (Cost)
CostLens
Next
VM Right-sizing