# ZONE_RESOURCE_POOL_EXHAUSTED on Google Cloud: the zone is out of capacity, it is not your quota, and what to do

`ZONE_RESOURCE_POOL_EXHAUSTED` means the Compute Engine zone has no free physical hardware (vCPUs, memory, disks or accelerators) for what you asked for right now. It is not your quota: Google states that a quota increase does not fix it and that available quota does not guarantee capacity. What works is asking for the same thing in another zone or region, changing the machine type, or retrying later; if the capacity must be there no matter what, a reservation. It is Google Cloud's counterpart to [OCI's Out of host capacity](https://controlcloud.dev/en/blog/oci-out-of-host-capacity-a1-flex-retry-loop) and [Azure's AllocationFailed](https://controlcloud.dev/en/blog/azure-allocationfailed-skunotavailable-cuota-vcpu). Everything below comes from the Google Cloud documentation; the sources are at the end.

## The error, verbatim

According to the documentation, Compute Engine returns one of these in the console, the CLI or the API response:

```
ZONE_RESOURCE_POOL_EXHAUSTED
ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
REGION_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
POOL_CAPACITY_INSUFFICIENT

The zone 'projects/PROJECT_ID/zones/ZONE' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
```

The variant with details is the most useful one, because it says what is missing and where there is room. With gcloud it looks like this (example from the documentation):

```
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - A n1-standard-1 VM instance with 2 local SSD(s) is currently unavailable in the us-central1-a zone, because of cpu_availability,local_ssd_availability root cause(s). Consider trying your request in the us-central1-b, us-central1-c zone(s), which currently has capacity to accommodate your request.
```

- `ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS`: carries the root causes (in the API, in `errorInfo.reason`) and, if other zones in the same region have capacity, lists them (`zonesAvailable`). If it lists none, no other zone in the region has room for that request.
- `REGION_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS`: none of the evaluated zones in the region has capacity. What is left is another region, another machine type or another provisioning model.
- `POOL_CAPACITY_INSUFFICIENT`: the zone cannot fit the number of instances requested. Ask for fewer, or change the machine type or zone.

The possible root causes are `cpu_availability`, `memory_availability`, `gpu_availability`, `local_ssd_availability`, `resource_availability` and `configuration_availability`. The last one is different from the rest: the zone does not support that combination of machine type, CPU platform or disk interface, and Google warns that retrying later will still fail.

## Where it shows up

- When creating a standalone VM, from the console, with `gcloud compute instances create` or through the API.
- When starting a stopped VM or changing its machine type: the documentation talks about creating, restarting or updating instances, and also about reserving zonal resources. If starting with the new type fails for capacity, the VM stays stopped until you start it again; Google suggests reverting to the previous type, which already ran in that zone.
- In a managed instance group (MIG): you do not see it as a command error but in the group's instance error list, and the MIG keeps retrying in the background.
- In GKE Standard, when creating a node pool: the error lands in the cluster's audit logs as `ZONE_RESOURCE_POOL_EXHAUSTED`, `ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS` or "resource pool exhausted".
- In Terraform, with `google_compute_instance`: it shows up on `terraform apply`, because `plan` does not ask about capacity. It is on the list of [what terraform plan does not verify](https://controlcloud.dev/en/blog/terraform-plan-verde-apply-rojo-lo-que-plan-no-verifica).

A warning from the same page: if you have no reservation, do not stop and restart (or delete and recreate) VMs to clear the error. When you stop them, their vCPUs, memory, accelerators and disks go back to the zone, and if the zone has no capacity you will not be able to start them again.

## What it is not: quota

Quota is an administrative limit on your project; capacity is real hardware in the zone. They are different errors, and the quota one looks like this:

```
RESOURCE_NAME creation failed:
Quota QUOTA_NAME exceeded. Limit: QUOTA_LIMIT in region REGION

Resource exhausted (HTTP 429): QUOTA_EXCEEDED
```

That one is fixed by requesting more quota; `ZONE_RESOURCE_POOL_EXHAUSTED` is not. To rule out quota before retrying, look at usage and limit per region. The table format comes from the gcloud formats reference:

```
# region quotas: metric, limit and usage
gcloud compute regions describe us-central1 \
  --format="table(quotas:format='table(metric,limit,usage)')"

# project-wide quotas
gcloud compute project-info describe --project my-project
```

CPU quota is the total vCPUs across all your VMs in the region, and each family has its own pool: E2 and N1 share `CPUS`, N2 uses `N2_CPUS` and N2D uses `N2D_CPUS`. Some new projects also have a global `CPUs (All Regions)` quota, which shows up in `project-info describe`. If usage plus what you are requesting exceeds the limit, it is quota; if there is room, it is capacity.

## What Google recommends

- Another zone or region. If the message lists zones with capacity (`zonesAvailable`), start there.
- Another machine series: different series use different CPU platforms and physical servers (Google names N2, N2D or N4 as alternatives). If you requested a minimum CPU platform, setting it to `AUTOMATIC` widens where the VM can land.
- Fewer resources: a type with fewer vCPUs or less memory, or a smaller custom type. Custom types do not have a separate capacity pool, but a smaller request fits on servers with little room left.
- Another provisioning model: flex-start, reservation-bound or spot draw from separate capacity pools.
- For several VMs: create them in bulk targeting the region instead of a zone, or use a regional MIG with a `BALANCED` or `ANY` distribution shape, so Compute Engine picks the zones that have hardware available.
- Retry later: capacity in a zone changes as other workloads finish and release hardware.

If the capacity must be there no matter what, there are reservations. When you create one, Compute Engine checks that the capacity exists in the zone (so creating the reservation can also fail for lack of capacity), consumes the quota right away and bills it for as long as it exists, used or not. `gcloud compute instances create` consumes any matching reservation by default (`--reservation-affinity=any`). If you have a reservation with room and the VM still fails, Google says to check that the reservation's and the VM's properties match: if they do not, the VM is requested as on-demand capacity and can hit the same error.

## A loop that rotates zones and stops when the error is not capacity

Before leaving it running, rule out quota with the command above. This loop tries to create the same VM in the four us-central1 zones and stops on any error that is not capacity (quota, permissions, duplicate name), because those do not change by rotating zones. The patterns it looks for are the messages Google documents:

```
NAME=my-vm; TYPE=e2-standard-2
for ZONE in us-central1-a us-central1-b us-central1-c us-central1-f; do
  if OUT=$(gcloud compute instances create "$NAME" --zone="$ZONE" \
      --machine-type="$TYPE" --image-family=debian-12 \
      --image-project=debian-cloud 2>&1); then
    echo "created in $ZONE"; break
  fi
  if echo "$OUT" | grep -Eq "RESOURCE_POOL_EXHAUSTED|does not have enough resources|is currently unavailable in the"; then
    echo "$ZONE out of capacity, next"
  else
    echo "$OUT"; break   # quota, permissions or another error: rotating zones will not fix it
  fi
done
```

If the whole region is out of capacity, add zones from another region to the list. You can also rotate the machine type in the same loop, but watch the quota: an N2 consumes `N2_CPUS`, not `CPUS`, so check that limit too. A MIG or a GKE node pool does not need the loop: the group retries on its own, and what changes the outcome is the configuration (regional distribution, alternative types).

## Frequently asked questions about ZONE_RESOURCE_POOL_EXHAUSTED

Does requesting more quota fix ZONE_RESOURCE_POOL_EXHAUSTED? No. Google says so explicitly: it is a hardware shortage in the zone, not a project limit. You request quota when the error is `QUOTA_EXCEEDED` or "Quota … exceeded. Limit: …".

How long until capacity comes back? Google gives no timeframe: capacity changes as other workloads release hardware. That is why it recommends trying another zone, type or provisioning model rather than waiting without changing anything.

Why won't my stopped VM start when it ran yesterday? Because stopping it released its resources in the zone, and starting it asks for them again. If the zone is still out of capacity, Google proposes moving the workload to another zone: a snapshot of the boot disk and the attached disks, and a new VM in the target zone. To keep it from happening to a critical VM, the documented option is a reservation.

Does retrying in the same zone help? Sometimes: it is the "try again later" in the message itself. It does not help if the root cause is `configuration_availability`, because the zone does not support that configuration and the request will keep failing.

Does it happen in GKE too? Yes, when creating node pools in Standard clusters. Google suggests another zone or region, smaller machine types with more nodes, capacity reservations, a custom ComputeClass with alternative series, or best-effort provisioning (`--best-effort-provision` with `--min-provision-nodes`), which creates the node pool if it gets at least that minimum number of nodes.

## Sources

- Google Cloud, "Troubleshoot resource availability errors" (codes, root causes, zonesAvailable, the warning about stopping VMs, recommendations, MIGs, bulk creation, machine type changes).
- Google Cloud, "Troubleshoot creating, updating and deleting VMs" (quota error text).
- Google Cloud, "Compute Engine quota and limits overview" (`gcloud compute regions describe` and `project-info describe`) and "Allocation quotas" (regional CPU quota and per-family pools).
- Google Cloud, the `gcloud topic formats` reference (region quota table) and the `gcloud compute instances create` reference.
- Google Cloud, "About reservations" (capacity check, quota and billing of reservations).
- Google Cloud, "Troubleshoot GKE Standard node pools" (node pools without resources and best-effort provisioning).
- Google Cloud, "Regions and zones", "Operating system details" and "General-purpose machine family" (us-central1 zones, the debian-12 family, the e2-standard-2 type).

