compute-resource-availability-troubleshooting
Diagnoses, mitigates, and prevents Google Compute Engine resource availability and capacity stockout errors (ZONE_RESOURCE_POOL_EXHAUSTED, ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS, and machine type or accelerator unavailable in zone).
Install / Use
npx skills add google/skills --skill compute-resource-availability-troubleshootingInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of compute-resource-availability-troubleshooting
compute-resource-availability-troubleshooting scores 90/100 on our quality scale, 1190th of 4,700 Development & Engineering skills we index (top 26%).
Its SKILL.md is 26 KB long, well organised into 26 sections with 8 code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so compute-resource-availability-troubleshooting is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
compute-resource-availability-troubleshooting compared with similar skills
All 4 of these similar skills score higher than compute-resource-availability-troubleshooting; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| compute-resource-availability-troubleshooting (this skill)by google | 90 | 20.3k | 2mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 121.1k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 89.6k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 73.3k | 1d ago | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.6k | 4d ago | CLAUDE.md |
Frequently asked questions
- How do I install compute-resource-availability-troubleshooting?
- Run
npx skills add google/skills --skill compute-resource-availability-troubleshooting. The install tabs above show the steps for each supported agent. - Which AI agents does compute-resource-availability-troubleshooting work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is compute-resource-availability-troubleshooting safe to use?
- It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is compute-resource-availability-troubleshooting still maintained?
- The repository was last updated about 2 months ago, so compute-resource-availability-troubleshooting is actively maintained.
Skill content
View source on GitHubname: compute-resource-availability-troubleshooting description: >- Diagnoses, mitigates, and prevents Google Compute Engine resource availability and capacity stockout errors (ZONE_RESOURCE_POOL_EXHAUSTED, ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS, and machine type or accelerator unavailable in zone). Use ONLY when VM creation, Managed Instance Group (MIG) scale-out, or stopped instance startup fails due to regional or zonal hardware capacity exhaustion for GPUs, TPUs, or specific CPU shapes. DO NOT read or use for IAM permission errors, project quota limit increases without stockouts, general greenfield VM creation, or unexpected host reboots on already-running VMs. metadata: version: "1.0.0" category: Compute
Compute Engine Resource Availability and Stockout Troubleshooting
MCP Tools:
list_machine_types,list_accelerator_types,get_zone_operation,list_instance_group_managers,list_managed_instances,list_reservations,get_reservation_details
This skill diagnoses and resolves Google Compute Engine resource availability errors (capacity stockouts). It provides immediate tactical workarounds to get blocked workloads running and long-term architectural mitigations using Regional Managed Instance Group (MIG) distribution shapes, Instance Flexibility, Dynamic Workload Scheduler (DWS) Flex-Start, and On-Demand Capacity Reservations.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Prerequisites & Environment Setup
Any host, project, IAM, or Compute Engine resource modifications (installing
gcloud, configuring MCP, enabling APIs or Log Analytics, creating instances
or reservations, updating MIGs, or deleting resources) must be explicitly
approved by the user before execution.
- Google Cloud SDK: Verify
gcloudis installed (gcloud --version). If missing or outdated, ask the user for approval before installing via Install the Google Cloud SDK. - Compute Engine MCP Server & Capability Boundary: When the Compute Engine
MCP server is configured (see
Use the Compute Engine MCP server;
requires
roles/mcp.toolUser), prefer its read-only discovery tools before falling back togcloud:list_machine_typesandlist_accelerator_typesto check whether a machine shape or GPU accelerator is offered in a target zone.get_zone_operationto inspect a failed zonal operation'serror.errorsarray (ZONE_RESOURCE_POOL_EXHAUSTED,ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS, orQUOTA_EXCEEDED).list_instance_group_managersandlist_managed_instancesto inspect zonal MIGs and per-instancecurrentAction/lastAttempt.errors(note: all Compute Engine MCP MIG tools—list_instance_group_managers,list_managed_instances, andget_instance_group_manager_basic_info—only accept azoneparameter and cannot inspect regional MIGs; usegcloudwith--region={region}or REST for regional MIGs).list_reservationsandget_reservation_detailsto inspect existing zonal reservation capacity (specificReservation.countvs.specificReservation.inUseCount).- MCP Limitations (Use
gcloudor REST Instead): MCPcreate_instancedoes not exposeprovisioning_model(FLEX_START/SPOT),max_run_duration,instance_termination_action, orreservation_affinity. MCP also lacks tools for Cloud Logging queries (gcloud logging read), Spot Capacity Advisor (gcloud beta compute advice capacity), Bulk Insert (gcloud compute instances bulk create), MIG distribution updates (gcloud compute instance-groups managed update), and reservation creation or deletion (gcloud compute reservations create/delete). Always usegcloudor the Compute Engine REST API for those operations.
- Authentication: Local CLI (
gcloud auth login), Application Default Credentials (gcloud auth application-default login), or headless/CI-CD viaGOOGLE_APPLICATION_CREDENTIALSor Workload Identity Federation. - Project, Region, Billing & API Enablement:
Note: An active billing account attachment is required (even for Free Tier eligible resources such asgcloud config set project {project_id} gcloud config set compute/region {region} gcloud config set compute/zone {zone} gcloud services enable compute.googleapis.com logging.googleapis.come2-micro). Never hardcode regions or zones; confirm{project_id},{region}, and{zone}(defaulting to a well-supported region such asus-central1/us-central1-aif unspecified), and consult Google Cloud Locations to verify regional and zonal availability (preview features and specialized GPUs/TPUs are restricted to specific locations). - Required IAM Roles:
- Read-Only Diagnostics & Capacity Advice:
roles/compute.viewerandroles/logging.viewer. - Log Analytics SQL (
_Default._AllLogs):roles/logging.viewAccessor(plusroles/bigquery.jobUserandroles/bigquery.dataViewerwhen querying via a linked BigQuery dataset). - Instance & MIG Remediation:
roles/compute.instanceAdmin.v1(plusroles/iam.serviceAccountUserwhen attaching a service account to VMs). - Reservation Creation & Teardown:
roles/compute.admin(or a custom role grantingcompute.reservations.create,compute.reservations.update, andcompute.reservations.delete, which are not included inroles/compute.instanceAdmin.v1). - MCP Tool Invocation:
roles/mcp.toolUser.
- Read-Only Diagnostics & Capacity Advice:
Step 1: Verify Stockout Scope & Distinguish from Quota Errors
A. Core Domain Rules (Explain to User)
Before taking action, clarify these three foundational Compute Engine behaviors (see Troubleshooting resource availability errors):
- Stockout != Quota:
ZONE_RESOURCE_POOL_EXHAUSTED(andZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS) means physical hardware capacity for that specific resource pool in that specific zone is temporarily full. Increasing project quota (IAM & Admin > Quotas & System Limits) will not resolve a physical stockout. Conversely,QUOTA_EXCEEDEDmeans the project's administrative quota ceiling has been reached regardless of physical hardware availability. When returned,ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILSalso includeserrorInfo.reason(such asconfiguration_availabilityfor unsupported hardware combinations that will not succeed on retry) anderrorInfo.metadata.zonesAvailablelisting sibling zones with capacity. - Scoped to Specific Shape & Zone: A stockout applies only to the exact
machine shape or accelerator (for example,
g2-standard-4orc4-standard-32) in that zone (for example,us-central1-a). Sibling zones (us-central1-b,us-central1-c,us-central1-f) or smaller shapes (c4-standard-16) frequently have ample capacity. - Existing Running VMs Are Safe: Resource availability errors affect only
new capacity allocations (creating new VMs, starting stopped
TERMINATEDVMs, changing machine types, or MIG scale-out). Currently runningRUNNINGVMs in the zone are unaffected.
B. Query Cloud Audit Logs for Resource Availability vs. Quota Failures
Run gcloud logging read with an explicit --freshness window (gcloud logging read defaults to 1d, so multi-day investigations require
--freshness=7d or --freshness=14d). Inspect
protoPayload.response.error.errors[0].code (not .reason) to distinguish
ZONE_RESOURCE_POOL_EXHAUSTED / ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
from QUOTA_EXCEEDED:
gcloud logging read \
'resource.type="gce_instance" AND log_id("cloudaudit.googleapis.com/activity") AND (protoPayload.status.message:("ZONE_RESOURCE_POOL_EXHAUSTED" OR "does not have enough resources available" OR "resource pool exhausted" OR "does not exist in zone" OR "QUOTA_EXCEEDED" OR "Quota") OR protoPayload.response.error.errors.code:("ZONE_RESOURCE_POOL_EXHAUSTED" OR "ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS" OR "QUOTA_EXCEEDED"))' \
--project={project_id} --freshness=7d --limit=20 \
--format="table(timestamp, resource.labels.zone, protoPayload.resourceName, protoPayload.response.error.errors[0].code, protoPayload.status.message)"
- If
codeisQUOTA_EXCEEDED(Always Include Regional Quota Inspection): Do not treat this as a physical stockout. Always providegcloud compute regions describeto inspect regional quota limits and usage, and direct the user to IAM & Admin > Quotas & System Limits (or switch to a machine family with quota headroom):gcloud compute regions describe {region} --project={project_id} \ --format="table(quotas:format='table(metric,limit,usage)')" - If a MIG is failing to scale out: Also inspect MIG provisioning errors
directly (via Compute Engine MCP
list_managed_instancesfor zonal MIGs, orgcloud):# Zonal MIG (--zone={zone}) vs. Regional MIG (--region={region}): gcloud compute instance-groups managed list-errors {mig_name} \ --project={project_id} --zone={zone} gcloud compute instance-groups managed list-errors {mig_name} \ --project={project_id} --region={region}
C. Analyze Historical Stockout Frequency with Log Analytics SQL
Because failed cloudaudit.googleapis.com/activity entries have severity
ERROR (severity_number >= 500), Cloud Logging routes them to the
_Default log bucket ({project_id}.global._Default._AllLogs), whereas
_Required._AllLogs only stores Admin Activity logs below ERROR and System
Event logs.
- Prerequisite: Upgrade
_Defaultto Log Analytics (see Query and view logs in Log Analytics):gcloud logging buckets update _Default \ --project={project_id} --location=global --enable-analytics - JSON Column Extraction Rule: In
_AllLogs,resource.labelsandproto_payload.audit_log.requesthave BigQuery typeJSON. Never referenceresource.labels.zonedirectly inGROUP BY—always extract scalarSTRINGvalues withJSON_VALUE(...):SELECT JSON_VALUE(resource.labels.zone) AS zone, REGEXP_EXTRACT(JSON_VALUE(proto_payload.audit_log.request.machineType), r'([^/]+)$') AS machine_type, proto_payload.audit_log.status.message AS status_message, COUNT(*) AS stockout_count, MIN(timestamp) AS first_seen, MAX(timestamp) AS last_seen FROM `{project_id}.global._Default._AllLogs` WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 14 DAY) AND log_id = 'cloudaudit.googleapis.com/activity' AND resource.type = 'gce_instance' AND ( proto_payload.audit_log.status.message LIKE '%ZONE_RESOURCE_POOL_EXHAUSTED%' OR proto_payload.audit_log.status.message LIKE '%does not have enough resources available%' OR TO_JSON_STRING(proto_payload.audit_log.response.error.errors) LIKE '%ZONE_RESOURCE_POOL_EXHAUSTED%' ) GROUP BY zone, machine_type, status_message ORDER BY stockout_count DESC;
Step 2: Immediate Tactical Mitigations (Unblock Workload Now)
Execute these five steps in priority order to provision the blocked workload immediately:
1. Discover Sibling Zones Supporting the Machine Shape or GPU
If a zone returns ZONE_RESOURCE_POOL_EXHAUSTED or `Machine type with name
'...' does
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
121.1kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
89.6kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ai-job-search
73.3kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
