[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KZKY5083H4M9WH0FA2P3WC":3,"skill-same:01M6KZKY5083H4M9WH0FA2P3WC":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6KZKY5083H4M9WH0FA2P3WC","compute-on-demand-reservations",null,"Inspects, verifies, and manages Google Compute Engine (GCE) On-Demand reservations and analyzes consumed versus available reserved capacity. Use when checking active reservation capacity, determining whether reserved VMs are available or exhausted, verifying reservation targeting (automatic versus specific reservation), or sharing reservations across projects. Don't use for Spot capacity advice (use compute-spot-capacity-advice) or future calendar bookings (use compute-future-reservations).","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24044,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-on-demand-reservations\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,9,30,31,32,33,34,35,36,37],"compute on demand reservations","reservations","compute","active","when","automatic","vms","for","targeting","spot","across","calendar","advice","use","bookings","engine","projects","sharing","capacity","2026-11-10 10:12:30",false,"---\nname: compute-on-demand-reservations\nmetadata:\n  version: \"1.0.0\"\n  category: Compute\ndescription: >-\n  Inspects, verifies, and manages Google Compute Engine (GCE) On-Demand reservations\n  and analyzes consumed versus available reserved capacity. Use when checking active\n  reservation capacity, determining whether reserved VMs are available or exhausted,\n  verifying reservation targeting (automatic versus specific reservation), or sharing\n  reservations across projects. Don't use for Spot capacity advice (use\n  compute-spot-capacity-advice) or future calendar bookings (use compute-future-reservations).\n---\n\n# Compute Engine On-Demand Reservations\n\nThe `compute-on-demand-reservations` skill inspects and manages active Google Compute Engine (GCE) On-Demand reservations. It determines whether guaranteed capacity is available, calculates consumption, verifies instance targeting policies, and audits cross-project sharing.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST read and follow the instructions in [Usage Attribution](references\u002Fattribution.md).\n\n---\n\n## Prerequisites, IAM & Billing\n\nBefore querying or managing On-Demand reservations, ensure the environment meets these requirements:\n\n1. **Project & Region Configuration**: Prefer passing `--project={project_id}` and `--zone={zone}` directly on each command to avoid overwriting global workstation state, or obtain explicit user confirmation before setting defaults (e.g., `us-central1` \u002F `us-central1-a`):\n   ```bash\n   gcloud config set project {project_id}\n   gcloud config set compute\u002Fregion {region}\n   gcloud config set compute\u002Fzone {zone}\n   ```\n2. **Billing & API Enablement**: Ensure the project has an active billing account attached and the Compute Engine API is enabled:\n   ```bash\n   gcloud services enable compute.googleapis.com --project={project_id}\n   ```\n3. **Cloud SDK & Authentication**: Ensure the [Google Cloud CLI](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk.md.txt) is installed (never execute unprompted host installation commands such as `apt-get` or `curl | bash` without explicit user approval; direct the user to the installation guide instead), then authenticate via `gcloud auth login` (for interactive CLI), `gcloud auth application-default login` (for SDKs), or `GOOGLE_APPLICATION_CREDENTIALS` (for service accounts).\n4. **IAM Permissions**:\n   * **Read-Only Inspection (`list`, `describe`)**: Grant `roles\u002Fcompute.viewer` (or custom role with `compute.reservations.list` and `compute.reservations.get`).\n   * **Reservation Lifecycle (`create`, `update`, `delete`)**: Grant `roles\u002Fcompute.admin` (or custom role with `compute.reservations.create`, `compute.reservations.resize`, `compute.reservations.update`, and `compute.reservations.delete`).\n   * **Consuming Reservations (`instances create`)**: Grant `roles\u002Fcompute.instanceAdmin.v1` on the project launching VMs (and on **both** the host\u002Fowner project and the consumer project when consuming a shared reservation).\n5. **Quota & Organization Policy**: Creating an On-Demand reservation immediately consumes regional CPU, GPU, or Local SSD quota. For **shared reservations**, Compute Engine deducts regional quota in **both** the host project (at reservation creation) and the consumer project (when VMs launch), and requires the host project to be allowlisted in organization policy `constraints\u002Fcompute.sharedReservationsOwnerProjects`.\n6. **Billing & Pricing Warning**: On-Demand reservations are billed immediately upon creation at the full On-Demand VM rate whether or not VMs are running and consuming the reservation. Review [Compute Engine Pricing](https:\u002F\u002Fcloud.google.com\u002Fcompute\u002Fpricing), [Available Regions and Zones](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Fregions-zones.md.txt), and [Google Cloud Locations](https:\u002F\u002Fcloud.google.com\u002Fabout\u002Flocations) (strip `.md.txt` suffixes when presenting documentation URLs to human users) before provisioning.\n\n---\n\n## Command Syntax & Reference\n\n### 1. List Reservations in a Project \u002F Zone\n\n```bash\ngcloud compute reservations list \\\n  --project={project_id} \\\n  [--zones={zone}] \\\n  [--format=\"table(name,zone.basename(),specificReservation.instanceProperties.machineType.basename(),specificReservation.assuredCount,specificReservation.inUseCount,specificReservation.count,specificReservationRequired,shareSettings.shareType,status)\"]\n```\n\n### 2. Inspect Reservation Details & Capacity Metrics\n\n```bash\ngcloud compute reservations describe {reservation_name} \\\n  --zone={zone} \\\n  --project={project_id}\n```\n\n*(Note: Dense accelerator reservations backed by `aggregateReservation` leave `specificReservation.*` columns blank in `list` and expose `aggregateReservation.totalResources` and `aggregateReservation.inUseResources` via `describe`.)*\n\n### 3. Create a New On-Demand Reservation\n\n> [!IMPORTANT]\n> Creating a reservation immediately incurs billing charges. Always obtain explicit human approval before executing `gcloud compute reservations create`.\n\n```bash\ngcloud compute reservations create {reservation_name} \\\n  --project={project_id} \\\n  --zone={zone} \\\n  --vm-count={vm_count} \\\n  (--machine-type={machine_type} | --source-instance-template={template_name}) \\\n  [--min-cpu-platform={min_cpu_platform}] \\\n  [--accelerator=count={gpu_count},type={gpu_type}] \\\n  [--local-ssd=interface={nvme|scsi}] \\\n  [--require-specific-reservation] \\\n  [--share-setting=projects --share-with={consumer_project_ids}]  # up to 100 consumer projects in the same org (excluding the host project)\n```\n\n### 4. Update or Resize an Existing Reservation\n\nResizing capacity (`--vm-count`) and modifying shared consumer projects are mutable in place after obtaining explicit human approval (`--share-with` and `--add-share-with` accept up to 100 consumer project IDs or project numbers in the same organization excluding the host project itself, while `--remove-share-with` strictly requires numeric **project numbers**). Hardware attributes (`machineType`, `minCpuPlatform`, `accelerator`, `localSsd`, `zone`, and `specificReservationRequired`) are immutable after creation and require recreating the reservation.\n\n```bash\ngcloud compute reservations update {reservation_name} \\\n  --project={project_id} \\\n  --zone={zone} \\\n  [--vm-count={new_vm_count}] \\\n  [--add-share-with={project_ids_or_numbers} | --remove-share-with={project_numbers}]\n```\n\n### 5. Delete an Unused On-Demand Reservation (Resource Teardown)\n\nTo stop ongoing billing for an unused On-Demand reservation, delete it after obtaining explicit human approval (note: deletion fails if the reservation is attached to a resource-based Committed Use Discount where `commitment` is set—which must be swapped via `gcloud beta compute commitments update-reservations`—or if a targeted reservation with `specificReservationRequired: true` still has `inUseCount > 0`; the command also prompts interactively unless `--quiet` is passed):\n\n```bash\ngcloud compute reservations delete {reservation_name} \\\n  --zone={zone} \\\n  --project={project_id}\n```\n\n---\n\n## Capacity Utilization Analysis\n\nWhen inspecting reservation output, verify that the reservation `status` is `READY` or `UPDATING` (exclude reservations in `CREATING` or `DELETING` states) and calculate available capacity using the following fields:\n\n* **`status`**: Must be `READY` or `UPDATING` before instances can consume reserved capacity. While a reservation is `UPDATING` (for example, during a capacity resize or share-setting modification), its already provisioned capacity remains consumable up to `specificReservation.assuredCount`. Only `CREATING` and `DELETING` states block consumption.\n* **`specificReservation.assuredCount`**: The number of reserved VM instances currently provisioned and physically backed by Compute Engine hardware. Note that `assuredCount` can be less than `specificReservation.count` while a reservation is actively upsizing or if a physical host failure degrades the reservation (`healthInfo.healthStatus: DEGRADED`).\n* **`specificReservation.count`**: The total requested target number of VM instances in this reservation block.\n* **`specificReservation.inUseCount`**: The number of reserved instances currently consumed by running VMs.\n* **Available Reserved Capacity**:\n  ```text\n  Available Capacity = specificReservation.assuredCount - specificReservation.inUseCount\n  ```\n\n### Health & Consumption Thresholds\n\n* **Available (`> 0`)**: Provisioned reserved capacity is immediately available. Workloads can launch with 100% provisioning assurance.\n* **Exhausted (`inUseCount >= assuredCount`)**: Provisioned reserved capacity is fully consumed. New instances matching this specification fall back to unreserved on-demand capacity (if allowed) or fail to launch.\n\n---\n\n## Reservation Targeting Policies\n\nReservations operate under two distinct consumption modes defined by `specificReservationRequired`:\n\n| Setting | Consumption Mode | Matching Behavior |\n| :--- | :--- | :--- |\n| `specificReservationRequired: false` | **Automatic (`ANY_RESERVATION`)** | Any newly created `STANDARD` VM whose properties **identically match all reserved `instanceProperties`** automatically consumes this reservation. |\n| `specificReservationRequired: true` | **Targeted (`SPECIFIC_RESERVATION`)** | VMs do not consume this capacity unless they match all reserved `instanceProperties` and explicitly specify `--reservation-affinity=specific --reservation={reservation_name}`. |\n\n### Exact Hardware & Property Matching Requirement\n\nFor a VM to consume a reservation (under either `ANY_RESERVATION` or `SPECIFIC_RESERVATION`), **every** property below must match the reservation's `specificReservation.instanceProperties` 100% identically:\n\n* **Project and `zone`**: Same project for `LOCAL` reservations, or an authorized consumer project listed in `shareSettings.projectMap`, in the exact same `zone`.\n* **`machineType`**: Exact machine type shape.\n* **`minCpuPlatform`**: Must match verbatim. If the reservation was created without an explicit CPU platform (`\"Automatic\"`), passing `--min-cpu-platform` on the VM does **not** match (and vice versa).\n* **`guestAccelerators`**: Exact GPU `acceleratorType` and `acceleratorCount` (if any).\n* **`localSsds`**: Exact Local SSD partition count **and** exact storage interface (`NVME` versus `SCSI`, if any).\n* **Placement policies**: Exact compact placement `resourcePolicies` and `locationHint` (if present on the reservation).\n* **`provisioningModel`**: Must be `STANDARD` (`SPOT` VMs never consume On-Demand reservations).\n\n> [!WARNING]\n> **Silent Double-Billing Trap**: Under `ANY_RESERVATION` (`--reservation-affinity=any`, the default), if a newly created VM matches `zone` and `machineType` but differs on even a single property (such as `NVME` vs. `SCSI` Local SSD interface or `minCpuPlatform`), Compute Engine silently skips the reservation, launches an unreserved On-Demand VM, and bills for both the idle reservation and the new VM. Creating both the reservation and VMs from the same `--source-instance-template` prevents property drift.\n\n### VM Provisioning Best Practices\n\nWhen provisioning VMs, recommend private networking (`--no-address` paired with IAP TCP forwarding) and a custom least-privilege service account (`--service-account`):\n\n* To consume a targeted reservation (`specificReservationRequired: true`) during instance creation (note: passing `--reservation-affinity=specific` against a reservation with `specificReservationRequired: false` is rejected by Compute Engine):\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=specific \\\n    --reservation={reservation_name} \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n* To prevent an instance from consuming any reservation:\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=none \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n\n---\n\n## Cross-Project Shared Reservations\n\nShared reservations allow multiple projects within the same Google Cloud organization to draw from a shared pool of reserved capacity.\n\n* Inspect `shareSettings`:\n  * `shareType: LOCAL`: Reservation is private to the host project.\n  * `shareType: SPECIFIC_PROJECTS`: Shared with specific consumer projects keyed under `projectMap` (mapping each project ID or number to `{\"projectId\": \"...\"}`).\n* **Visibility & CUD Caveats**:\n  * Running `gcloud compute reservations list --project={consumer_project_id}` in a consumer project **never** displays shared reservations owned by a host project; always query `--project={host_project_id}` (or Cloud Asset Inventory) to inspect `assuredCount` and `inUseCount`.\n  * Committed Use Discount (CUD) pricing only covers shared reservation consumers when the host and consumer projects belong to the **same Cloud Billing account**.\n* Consumer projects consume shared capacity by specifying `--project={consumer_project_id}` and referencing the host project in `--reservation`:\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={consumer_project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=specific \\\n    --reservation=projects\u002F{host_project_id}\u002Freservations\u002F{reservation_name} \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n\n---\n\n## Operational Guardrails & Recommendations\n\n* **Human-Approval Guardrail**: Never execute mutating commands (`gcloud compute reservations create`, `gcloud compute reservations update`, `gcloud compute reservations delete`, or `gcloud compute instances create`) without explicit human approval from the user. Provide copy-pasteable commands and highlight billing implications first.\n* **Compute Engine MCP Server Guardrail**: When the Compute Engine MCP server is enabled, inspect the in-session MCP tool schemas before invoking them (in case newer MCP server versions add support); unless verified in the current schema:\n  * MCP `list_reservations` is single-zone only and **strips `specific_reservation` counts\u002Fshape and `share_settings`** (call `get_reservation_details` per reservation or use `gcloud compute reservations list`).\n  * No MCP tools exist to create, update, or delete reservations.\n  * MCP `create_instance` omits `reservation_affinity`, `min_cpu_platform`, and `local_ssd` (cannot target `SPECIFIC_RESERVATION` or shared reservations and risks silent unreserved double-billing); fall back to `gcloud` CLI when these parameters are absent from the tool schema.\n* **Missing Reservation Advisory**: When no matching or available reservation exists in the target zone:\n  * Inform the user that instances launch against unreserved on-demand capacity (subject to stock availability).\n  * If guaranteed capacity is required, advise creating a new reservation using `gcloud compute reservations create`.\n  * If the workload is interruptible or fault-tolerant, suggest evaluating Spot VMs using `compute-spot-capacity-advice`.\n* **Negative Guardrail (No Spot Telemetry for On-Demand)**: Do not use Spot capacity advice (`gcloud beta compute advice capacity --provisioning-model=SPOT`) or emit obtainability scores when inspecting or verifying standard On-Demand reservations. On-Demand reservation checks must inspect concrete reservation status and counts via `gcloud compute reservations list` and `describe`.\n","# Compute Engine On-Demand Reservations\n\nThe `compute-on-demand-reservations` skill inspects and manages active Google Compute Engine (GCE) On-Demand reservations. It determines whether guaranteed capacity is available, calculates consumption, verifies instance targeting policies, and audits cross-project sharing.\n\n## Usage Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST read and follow the instructions in [Usage Attribution](references\u002Fattribution.md).\n\n---\n\n## Prerequisites, IAM & Billing\n\nBefore querying or managing On-Demand reservations, ensure the environment meets these requirements:\n\n1. **Project & Region Configuration**: Prefer passing `--project={project_id}` and `--zone={zone}` directly on each command to avoid overwriting global workstation state, or obtain explicit user confirmation before setting defaults (e.g., `us-central1` \u002F `us-central1-a`):\n   ```bash\n   gcloud config set project {project_id}\n   gcloud config set compute\u002Fregion {region}\n   gcloud config set compute\u002Fzone {zone}\n   ```\n2. **Billing & API Enablement**: Ensure the project has an active billing account attached and the Compute Engine API is enabled:\n   ```bash\n   gcloud services enable compute.googleapis.com --project={project_id}\n   ```\n3. **Cloud SDK & Authentication**: Ensure the [Google Cloud CLI](https:\u002F\u002Fdocs.cloud.google.com\u002Fsdk\u002Fdocs\u002Finstall-sdk.md.txt) is installed (never execute unprompted host installation commands such as `apt-get` or `curl | bash` without explicit user approval; direct the user to the installation guide instead), then authenticate via `gcloud auth login` (for interactive CLI), `gcloud auth application-default login` (for SDKs), or `GOOGLE_APPLICATION_CREDENTIALS` (for service accounts).\n4. **IAM Permissions**:\n   * **Read-Only Inspection (`list`, `describe`)**: Grant `roles\u002Fcompute.viewer` (or custom role with `compute.reservations.list` and `compute.reservations.get`).\n   * **Reservation Lifecycle (`create`, `update`, `delete`)**: Grant `roles\u002Fcompute.admin` (or custom role with `compute.reservations.create`, `compute.reservations.resize`, `compute.reservations.update`, and `compute.reservations.delete`).\n   * **Consuming Reservations (`instances create`)**: Grant `roles\u002Fcompute.instanceAdmin.v1` on the project launching VMs (and on **both** the host\u002Fowner project and the consumer project when consuming a shared reservation).\n5. **Quota & Organization Policy**: Creating an On-Demand reservation immediately consumes regional CPU, GPU, or Local SSD quota. For **shared reservations**, Compute Engine deducts regional quota in **both** the host project (at reservation creation) and the consumer project (when VMs launch), and requires the host project to be allowlisted in organization policy `constraints\u002Fcompute.sharedReservationsOwnerProjects`.\n6. **Billing & Pricing Warning**: On-Demand reservations are billed immediately upon creation at the full On-Demand VM rate whether or not VMs are running and consuming the reservation. Review [Compute Engine Pricing](https:\u002F\u002Fcloud.google.com\u002Fcompute\u002Fpricing), [Available Regions and Zones](https:\u002F\u002Fdocs.cloud.google.com\u002Fcompute\u002Fdocs\u002Fregions-zones.md.txt), and [Google Cloud Locations](https:\u002F\u002Fcloud.google.com\u002Fabout\u002Flocations) (strip `.md.txt` suffixes when presenting documentation URLs to human users) before provisioning.\n\n---\n\n## Command Syntax & Reference\n\n### 1. List Reservations in a Project \u002F Zone\n\n```bash\ngcloud compute reservations list \\\n  --project={project_id} \\\n  [--zones={zone}] \\\n  [--format=\"table(name,zone.basename(),specificReservation.instanceProperties.machineType.basename(),specificReservation.assuredCount,specificReservation.inUseCount,specificReservation.count,specificReservationRequired,shareSettings.shareType,status)\"]\n```\n\n### 2. Inspect Reservation Details & Capacity Metrics\n\n```bash\ngcloud compute reservations describe {reservation_name} \\\n  --zone={zone} \\\n  --project={project_id}\n```\n\n*(Note: Dense accelerator reservations backed by `aggregateReservation` leave `specificReservation.*` columns blank in `list` and expose `aggregateReservation.totalResources` and `aggregateReservation.inUseResources` via `describe`.)*\n\n### 3. Create a New On-Demand Reservation\n\n> [!IMPORTANT]\n> Creating a reservation immediately incurs billing charges. Always obtain explicit human approval before executing `gcloud compute reservations create`.\n\n```bash\ngcloud compute reservations create {reservation_name} \\\n  --project={project_id} \\\n  --zone={zone} \\\n  --vm-count={vm_count} \\\n  (--machine-type={machine_type} | --source-instance-template={template_name}) \\\n  [--min-cpu-platform={min_cpu_platform}] \\\n  [--accelerator=count={gpu_count},type={gpu_type}] \\\n  [--local-ssd=interface={nvme|scsi}] \\\n  [--require-specific-reservation] \\\n  [--share-setting=projects --share-with={consumer_project_ids}]  # up to 100 consumer projects in the same org (excluding the host project)\n```\n\n### 4. Update or Resize an Existing Reservation\n\nResizing capacity (`--vm-count`) and modifying shared consumer projects are mutable in place after obtaining explicit human approval (`--share-with` and `--add-share-with` accept up to 100 consumer project IDs or project numbers in the same organization excluding the host project itself, while `--remove-share-with` strictly requires numeric **project numbers**). Hardware attributes (`machineType`, `minCpuPlatform`, `accelerator`, `localSsd`, `zone`, and `specificReservationRequired`) are immutable after creation and require recreating the reservation.\n\n```bash\ngcloud compute reservations update {reservation_name} \\\n  --project={project_id} \\\n  --zone={zone} \\\n  [--vm-count={new_vm_count}] \\\n  [--add-share-with={project_ids_or_numbers} | --remove-share-with={project_numbers}]\n```\n\n### 5. Delete an Unused On-Demand Reservation (Resource Teardown)\n\nTo stop ongoing billing for an unused On-Demand reservation, delete it after obtaining explicit human approval (note: deletion fails if the reservation is attached to a resource-based Committed Use Discount where `commitment` is set—which must be swapped via `gcloud beta compute commitments update-reservations`—or if a targeted reservation with `specificReservationRequired: true` still has `inUseCount > 0`; the command also prompts interactively unless `--quiet` is passed):\n\n```bash\ngcloud compute reservations delete {reservation_name} \\\n  --zone={zone} \\\n  --project={project_id}\n```\n\n---\n\n## Capacity Utilization Analysis\n\nWhen inspecting reservation output, verify that the reservation `status` is `READY` or `UPDATING` (exclude reservations in `CREATING` or `DELETING` states) and calculate available capacity using the following fields:\n\n* **`status`**: Must be `READY` or `UPDATING` before instances can consume reserved capacity. While a reservation is `UPDATING` (for example, during a capacity resize or share-setting modification), its already provisioned capacity remains consumable up to `specificReservation.assuredCount`. Only `CREATING` and `DELETING` states block consumption.\n* **`specificReservation.assuredCount`**: The number of reserved VM instances currently provisioned and physically backed by Compute Engine hardware. Note that `assuredCount` can be less than `specificReservation.count` while a reservation is actively upsizing or if a physical host failure degrades the reservation (`healthInfo.healthStatus: DEGRADED`).\n* **`specificReservation.count`**: The total requested target number of VM instances in this reservation block.\n* **`specificReservation.inUseCount`**: The number of reserved instances currently consumed by running VMs.\n* **Available Reserved Capacity**:\n  ```text\n  Available Capacity = specificReservation.assuredCount - specificReservation.inUseCount\n  ```\n\n### Health & Consumption Thresholds\n\n* **Available (`> 0`)**: Provisioned reserved capacity is immediately available. Workloads can launch with 100% provisioning assurance.\n* **Exhausted (`inUseCount >= assuredCount`)**: Provisioned reserved capacity is fully consumed. New instances matching this specification fall back to unreserved on-demand capacity (if allowed) or fail to launch.\n\n---\n\n## Reservation Targeting Policies\n\nReservations operate under two distinct consumption modes defined by `specificReservationRequired`:\n\n| Setting | Consumption Mode | Matching Behavior |\n| :--- | :--- | :--- |\n| `specificReservationRequired: false` | **Automatic (`ANY_RESERVATION`)** | Any newly created `STANDARD` VM whose properties **identically match all reserved `instanceProperties`** automatically consumes this reservation. |\n| `specificReservationRequired: true` | **Targeted (`SPECIFIC_RESERVATION`)** | VMs do not consume this capacity unless they match all reserved `instanceProperties` and explicitly specify `--reservation-affinity=specific --reservation={reservation_name}`. |\n\n### Exact Hardware & Property Matching Requirement\n\nFor a VM to consume a reservation (under either `ANY_RESERVATION` or `SPECIFIC_RESERVATION`), **every** property below must match the reservation's `specificReservation.instanceProperties` 100% identically:\n\n* **Project and `zone`**: Same project for `LOCAL` reservations, or an authorized consumer project listed in `shareSettings.projectMap`, in the exact same `zone`.\n* **`machineType`**: Exact machine type shape.\n* **`minCpuPlatform`**: Must match verbatim. If the reservation was created without an explicit CPU platform (`\"Automatic\"`), passing `--min-cpu-platform` on the VM does **not** match (and vice versa).\n* **`guestAccelerators`**: Exact GPU `acceleratorType` and `acceleratorCount` (if any).\n* **`localSsds`**: Exact Local SSD partition count **and** exact storage interface (`NVME` versus `SCSI`, if any).\n* **Placement policies**: Exact compact placement `resourcePolicies` and `locationHint` (if present on the reservation).\n* **`provisioningModel`**: Must be `STANDARD` (`SPOT` VMs never consume On-Demand reservations).\n\n> [!WARNING]\n> **Silent Double-Billing Trap**: Under `ANY_RESERVATION` (`--reservation-affinity=any`, the default), if a newly created VM matches `zone` and `machineType` but differs on even a single property (such as `NVME` vs. `SCSI` Local SSD interface or `minCpuPlatform`), Compute Engine silently skips the reservation, launches an unreserved On-Demand VM, and bills for both the idle reservation and the new VM. Creating both the reservation and VMs from the same `--source-instance-template` prevents property drift.\n\n### VM Provisioning Best Practices\n\nWhen provisioning VMs, recommend private networking (`--no-address` paired with IAP TCP forwarding) and a custom least-privilege service account (`--service-account`):\n\n* To consume a targeted reservation (`specificReservationRequired: true`) during instance creation (note: passing `--reservation-affinity=specific` against a reservation with `specificReservationRequired: false` is rejected by Compute Engine):\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=specific \\\n    --reservation={reservation_name} \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n* To prevent an instance from consuming any reservation:\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=none \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n\n---\n\n## Cross-Project Shared Reservations\n\nShared reservations allow multiple projects within the same Google Cloud organization to draw from a shared pool of reserved capacity.\n\n* Inspect `shareSettings`:\n  * `shareType: LOCAL`: Reservation is private to the host project.\n  * `shareType: SPECIFIC_PROJECTS`: Shared with specific consumer projects keyed under `projectMap` (mapping each project ID or number to `{\"projectId\": \"...\"}`).\n* **Visibility & CUD Caveats**:\n  * Running `gcloud compute reservations list --project={consumer_project_id}` in a consumer project **never** displays shared reservations owned by a host project; always query `--project={host_project_id}` (or Cloud Asset Inventory) to inspect `assuredCount` and `inUseCount`.\n  * Committed Use Discount (CUD) pricing only covers shared reservation consumers when the host and consumer projects belong to the **same Cloud Billing account**.\n* Consumer projects consume shared capacity by specifying `--project={consumer_project_id}` and referencing the host project in `--reservation`:\n  ```bash\n  gcloud compute instances create {vm_name} \\\n    --project={consumer_project_id} \\\n    --zone={zone} \\\n    --machine-type={machine_type} \\\n    --reservation-affinity=specific \\\n    --reservation=projects\u002F{host_project_id}\u002Freservations\u002F{reservation_name} \\\n    [--no-address] \\\n    [--service-account={service_account_email}]\n  ```\n\n---\n\n## Operational Guardrails & Recommendations\n\n* **Human-Approval Guardrail**: Never execute mutating commands (`gcloud compute reservations create`, `gcloud compute reservations update`, `gcloud compute reservations delete`, or `gcloud compute instances create`) without explicit human approval from the user. Provide copy-pasteable commands and highlight billing implications first.\n* **Compute Engine MCP Server Guardrail**: When the Compute Engine MCP server is enabled, inspect the in-session MCP tool schemas before invoking them (in case newer MCP server versions add support); unless verified in the current schema:\n  * MCP `list_reservations` is single-zone only and **strips `specific_reservation` counts\u002Fshape and `share_settings`** (call `get_reservation_details` per reservation or use `gcloud compute reservations list`).\n  * No MCP tools exist to create, update, or delete reservations.\n  * MCP `create_instance` omits `reservation_affinity`, `min_cpu_platform`, and `local_ssd` (cannot target `SPECIFIC_RESERVATION` or shared reservations and risks silent unreserved double-billing); fall back to `gcloud` CLI when these parameters are absent from the tool schema.\n* **Missing Reservation Advisory**: When no matching or available reservation exists in the target zone:\n  * Inform the user that instances launch against unreserved on-demand capacity (subject to stock availability).\n  * If guaranteed capacity is required, advise creating a new reservation using `gcloud compute reservations create`.\n  * If the workload is interruptible or fault-tolerant, suggest evaluating Spot VMs using `compute-spot-capacity-advice`.\n* **Negative Guardrail (No Spot Telemetry for On-Demand)**: Do not use Spot capacity advice (`gcloud beta compute advice capacity --provisioning-model=SPOT`) or emit obtainability scores when inspecting or verifying standard On-Demand reservations. On-Demand reservation checks must inspect concrete reservation status and counts via `gcloud compute reservations list` and `describe`.\n",{"name":5,"metadata":43,"description":7},{"version":44,"category":45},"1.0.0","Compute","main","0b14183791fb3d017b06b7c7718078d82a4afc33","skills\u002Fcloud\u002Fcompute-on-demand-reservations",2002,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-13 02:42:47",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add google\u002Fskills --skill compute-on-demand-reservations",{"tool":61,"command":62},"bunx","bunx skills add google\u002Fskills --skill compute-on-demand-reservations",{"tool":64,"command":65},"pnpm","pnpm dlx skills add google\u002Fskills --skill compute-on-demand-reservations","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-on-demand-reservations\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fattribution.md","REFERENCE","参考文档",1825,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fcompute-on-demand-reservations\u002Freferences\u002Fattribution.md",[76,114,145,173,200,224],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":90,"publishedAt":38},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[82,87],{"categoryNo":83,"categoryName":84,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":88,"categoryName":89,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000010","后端与接口",[9,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"sign in with google web","sign","with","web","android","go","security","google workspace","google cloud","implement","policy","python","implementing","react","iam","permissions","buttons","secure","manager","identity","architectures","domain","runtimes",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":129,"publishedAt":38},"01M6998PHPDCAD684VW5WRG83D","dpop-adoption","Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com\u002Ftoken. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM \u002F service account authentication.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fdpop-adoption\u002FSKILL.md",[120,121,124],{"categoryNo":88,"categoryName":89,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":122,"categoryName":123,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":125,"categoryName":126,"taxonomyType":127,"taxonomyTypeDesc":128},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[130,131,9,99,132,133,134,135,136,137,105,138,139,140,141,142,143,110,113,144,23],"dpop adoption","adoption","es6","retry","authentication","flows","challenge","code","browser","loops","at","node","token","pair","platform",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":157,"publishedAt":38},"01M6998M72TC73EEAQH4XC7EXW","retrieving-developer-knowledge","Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI\u002FGemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fretrieving-developer-knowledge\u002FSKILL.md",[151,152,155,156],{"categoryNo":88,"categoryName":89,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":153,"categoryName":154,"taxonomyType":85,"taxonomyTypeDesc":86},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":122,"categoryName":123,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":125,"categoryName":126,"taxonomyType":127,"taxonomyTypeDesc":128},[158,159,160,161,99,162,163,164,165,166,167,168,169,23,170,171,29,105,172,106],"retrieving developer knowledge","knowledge","developer","MCP","mcp server","official","developer documentation","get","search","local","choice","documents","query","api","documentation",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":38},"01M6998J2CZEXS9BES9S3WWFKC","migrate-to-rust","Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",[],[180,181,182,183,184,185,186,187,102,188,189,190,191,192,193,167,194,195,196,23,197,198,29,199],"migrate to rust","rust","migrate","github","memory","performance","directory","safe","ports","llvm","soa","cycle","porting","fix","arrays","infographic","high-performance","URL","architecture","unrelated",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":204,"categories":205,"keywords":209,"publishedAt":38},"01M6998GCC3K29WZ82KXMB9E02","finding-google-skills","Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Ffinding-google-skills\u002FSKILL.md",[206,207,208],{"categoryNo":88,"categoryName":89,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":122,"categoryName":123,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":125,"categoryName":126,"taxonomyType":127,"taxonomyTypeDesc":128},[9,210,211,212,213,144,214,215,216,217,218,134,219,220,221,168,32,222,23,223,171],"finding google skills","storage","as","messaging","model","trade-offs","provider","answer","fit","catalog","up","decision","database","candidate",{"skillNo":225,"name":226,"nameZh":6,"description":227,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":228,"categories":229,"keywords":232,"publishedAt":38},"01M6998DWNHTH0BS6W1CY8ZXMP","workload-manager-basics","Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fworkload-manager-basics\u002FSKILL.md",[230,231],{"categoryNo":88,"categoryName":89,"taxonomyType":85,"taxonomyTypeDesc":86},{"categoryNo":122,"categoryName":123,"taxonomyType":85,"taxonomyTypeDesc":86},[233,234,109,235,9,161,236,99,162,237,238,239,240,23,241,171,105,242,243,244,245],"workload manager basics","workload","basics","cli","review","vpc","resources","inspect","you","create","libraries","server","run"]