Stopped Compute Engine VMs whose disks and static IPs keep billing
What does ZopNight detect here?
Compute Engine stops charging for vCPU and memory once a VM reaches `TERMINATED`, but attached disks and external IP addresses bill for as long as they exist. ZopNight flags stopped standalone VMs, outside any managed instance group or GKE node pool, and reports the priced cost of their attached disks and reserved static IPs as the saving.
Signal and threshold
| Field | Value |
|---|---|
| Rule IDs | RC-109 |
| Category | orphan |
| Severity | low |
| Metric | none — pure configuration read |
| Threshold | status TERMINATED, not group-managed |
| Source | ZopNight |
| Permissions used | compute.instances.list · compute.instances.get · compute.disks.list · compute.addresses.list |
Where it applies
Stopping a VM ends compute billing, not storage billing
Google’s instance lifecycle page
lists when each charge applies. CPU is billed only in RUNNING and PENDING_STOP; memory adds
SUSPENDING and SUSPENDED. Stopping moves a VM to TERMINATED, where neither applies. But
“for attached resources like disks or external IP addresses, you incur charges while the
resources exist, regardless of the compute instance state.”
A static external IP stays billable too. VPC network pricing treats an address associated with a VM as in use “whether the instance is running or stopped”, so it keeps the in-use hourly rate. A VM stopped months ago is a disk and address bill with no workload behind it.
Finding stopped VMs and what they still hold
gcloud compute instances list \ --filter="status=TERMINATED" \ --format="table(name,zone,machineType,lastStopTimestamp)"For each candidate, gcloud compute instances describe VM_NAME --zone=ZONE shows its disks and
their autoDelete setting. gcloud compute addresses list shows reserved addresses and whether
each is in use.
Which stopped VMs qualify
- The VM’s status is
TERMINATED. - It is standalone. VMs that belong to a managed instance group or a GKE node pool are skipped, because their parent controls when they stop and start.
- At least one attached persistent disk or reserved static IP has a real price.
There is no minimum stop duration, so check the stop time before acting on a VM stopped recently.
When a stopped VM produces no finding
If none of the VM’s attached disks or addresses can be priced, ZopNight raises nothing rather than a $0 card, and it never substitutes the compute rate of a machine that is not running. A VM that is running but barely used belongs to Idle GCP VM Instance instead.
Adding up disks and addresses
saving = sum of priced attached persistent disks + sum of priced reserved static IPscost after fix = 0The breakdown shows persistent disk and static IP amounts separately, and they add up to the total.
Retiring a stopped VM cleanly
- Check that it is not a batch worker stopped on purpose, and that nothing starts it on a schedule.
- Snapshot any disk whose data may be needed again.
- Delete the VM with
gcloud compute instances delete VM_NAME --zone=ZONE. Disks withautoDeleteset to false survive; delete them withgcloud compute disks delete. - Release reserved addresses with
gcloud compute addresses delete ADDRESS_NAME --region=REGION. - If the VM should be running after all, start it with
gcloud compute instances start VM_NAME --zone=ZONE.