Skip to main content
discount · gcp

Non-production Compute Engine VMs that could run on the Spot provisioning model

resource types
1
rule IDs covered
1
severity
low

What does ZopNight detect here?

Dev, test, QA, staging, sandbox and demo Compute Engine VMs on standard pricing are flagged when Google's live Spot rate for the machine type is lower. Spot VMs created with `--provisioning-model=SPOT` cost up to 91% less, but Compute Engine can preempt them at any time, so ZopNight skips production, standby, stateful and Windows VMs.

Signal and threshold

How ZopNight evaluates Non-production Compute Engine VMs that could run on the Spot provisioning model.
Field Value
Rule IDsRC-111
Categorydiscount
Severitylow
Metricnone — pure configuration read
Thresholdnon-production VM with a live Spot discount of 5% to 92%
SourceZopNight
Permissions usedcompute.instances.list · compute.instances.get

The trade Spot pricing asks you to make

Spot VMs are spare Compute Engine capacity sold at a steep discount: Google quotes up to 91% off the on-demand price for many machine types. The catch is preemption. Compute Engine can stop or delete a Spot VM at any time to reclaim capacity, Spot VMs cannot live migrate or auto-restart on host events, and they are excluded from the Compute Engine SLA. There is no minimum or maximum runtime unless you set one.

For development and test machines, that trade is usually good. A preempted dev box is an annoyance; paying full price for it every hour of the month is a recurring cost.

Spotting standard-priced non-production VMs

Terminal window
gcloud compute instances list \
--format="table(name,zone,machineType,scheduling.provisioningModel,labels)"

An empty or STANDARD provisioning model on a VM labelled or named for dev or test is a candidate.

How a VM qualifies

  1. It is not terminated.
  2. It is non-production: an env, environment, stage or tier label says dev, test, qa, staging, sandbox or demo, or the name contains one of those words.
  3. It is not already Spot or preemptible.
  4. Google’s live rates for the VM show a Spot price below on-demand, giving a discount between 5% and 92%; anything outside that band is treated as a bad rate and ignored.

VMs that are protected from this advice

A production label always wins, even if the name says test. Names with a dr or standby segment are skipped, because a preemption during failover is an outage. So are stateful data services recognised by name, engine or labels (databases, Kafka, Elasticsearch, SAP and similar) or a tier=data label. Windows and SQL Server VMs are excluded too. With no live Spot rate for the machine type, there is no finding; ZopNight does not fall back to a typical discount.

Pricing the switch

Terminal window
spot discount = 1 - (live Spot rate / live on-demand rate)
saving = current monthly cost x spot discount

Recreating the VM as Spot

  1. Confirm the workload tolerates being stopped without warning, and add a shutdown script if it needs to save state.
  2. Snapshot the boot disk or create a machine image.
  3. Create the replacement from it:
    Terminal window
    gcloud compute instances create VM_NAME-spot --zone=ZONE \
    --provisioning-model=SPOT --instance-termination-action=STOP \
    --source-machine-image=IMAGE_NAME
  4. Move DNS or users over, then delete the standard VM.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·