Compute Engine Spot/preemptible VM was preempted (instance terminated by Compute Engine)
Compute Engine reclaimed a Spot or preemptible VM, so your workload stopped abruptly.
Instance was preemptedSpot VM terminated by Compute EngineThe instance was preemptedpreemptible instance stopped Meaning
Spot VMs can be stopped at any time with a 30 s warning (ACPI G2 soft off). Handle the shutdown signal, checkpoint work, use a managed instance group to recreate them, mix with on-demand capacity, and keep stateful data on persistent disks.
Common causes
- Spot/preemptible capacity reclaimed
- Maximum 24 h runtime (preemptible)
- Zone resource shortage
- No shutdown handler/checkpointing
- Using Spot for non-fault-tolerant services
⚡ Quick fix
- Add a shutdown script/checkpoints
- Use a MIG with auto-recreate
- Fall back to standard VMs for critical services
Detailed fix by platform
Shell
- bash
curl -s -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/preempted gcloud compute operations list --filter="operationType=compute.instances.preempted"
How to diagnose
- Preempted — True?
- Checkpointing — Present?
- Fallback — Standard VMs?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- autohealing Managed instance group keeps recreating VMs: autohealing health check failing
- Compute Engine: Quota exceeded (regional limit) Compute Engine: Quota 'N2_CPUS' exceeded. Limit: 24.0 in region europe-west1 / QUOTA_EXCEEDED
- disk full Compute Engine VM disk full: No space left on device — resize the persistent disk and filesystem
Most viewed in Google Cloud / Firebase
- Missing or insufficient permissions Firestore: FirebaseError: [code=permission-denied]: Missing or insufficient permissions
- Container failed to start Cloud Run: The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable
- 409: The resource already exists Compute Engine: ERROR: (gcloud.compute.instances.create) Could not fetch resource: The resource 'projects/p/zones/z/instances/vm-1' already exists
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026