Compute Future Reservations

Compute Future Reservations

Assesses whether future GPU and TPU capacity can be reserved in Compute Engine and which calendar-mode booking options fit upcoming AI training runs.

Skill files2 files

references/

SKILL.md250 lines
1
---
2
name: compute-future-reservations
3
metadata:
4
version: "1.0.0"
5
category: Compute
6
description: >-
7
Evaluates future GPU and TPU reservation feasibility and calendar-mode booking
8
options in Google Compute Engine (GCE). Use when planning future AI/ML training
9
runs, checking reservation availability windows, verifying accelerator cluster
10
topologies, or assessing future capacity lead times. Don't use for active
11
on-demand reservations (use compute-on-demand-reservations), immediate Spot
12
capacity queries (use compute-spot-capacity-advice), or Standard Future
13
Reservations (--reservation-mode=DEFAULT).
14
---
15
16
# Compute Engine Future Reservations & Calendar-Mode Feasibility
17
18
The `compute-future-reservations` skill assesses future capacity availability and feasibility for high-demand AI/ML hardware (NVIDIA GPUs, H4D VMs, and Google Cloud TPUs). It enables infrastructure engineers to evaluate future reservation windows, match cluster topologies, and manage calendar-mode bookings.
19
20
> [!NOTE]
21
> **Scope Boundary (Calendar Mode vs. Standard Future Reservations)**: This skill covers **Calendar-Mode Future Reservations** (`--reservation-mode=CALENDAR`, backed by Dynamic Workload Scheduler for up to 90 days on supported families such as `a3*`, `a4*`, `h4d*`, and Cloud TPUs; for newly released machine series, verify Calendar Mode support dynamically via `gcloud compute advice calendar-mode` or the official [Calendar Mode documentation](https://docs.cloud.google.com/compute/docs/instances/provisioning-models.md.txt#instance-availability)). Do not apply Calendar-Mode flags (`--reservation-mode=CALENDAR`, `--deployment-type=DENSE`) to **Standard Future Reservations** (`--reservation-mode=DEFAULT` for general-purpose CPU families, `a2*`/`g2*` GPUs, `DRAFT` planning workflows, or multi-month/CUD commitments).
22
23
## Usage Attribution
24
25
**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you MUST read and follow the instructions in [Usage Attribution](references/attribution.md).
26
27
---
28
29
## Prerequisites, IAM & Billing
30
31
Before querying calendar-mode advice or submitting future reservation requests, ensure the environment meets these requirements:
32
33
1. **Project & Region Configuration**: Prefer passing `--project={project_id}` and `--region={region}` (or `--zone={zone}`) directly on each command to avoid overwriting global workstation state, or obtain explicit user confirmation before setting defaults (e.g., `us-central1`):
34
```bash
35
gcloud config set project {project_id}
36
gcloud config set compute/region {region}
37
```
38
2. **Billing & API Enablement**: Ensure the project has an active billing account attached and the Compute Engine API is enabled:
39
```bash
40
gcloud services enable compute.googleapis.com --project={project_id}
41
```
42
3. **Cloud SDK & Authentication**: Ensure the [Google Cloud CLI](https://docs.cloud.google.com/sdk/docs/install-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).
43
4. **IAM Permissions**:
44
* **Feasibility, Creation & Inspection (`advice calendar-mode`, `create`, `list`, `describe`, `delete`)**: Grant `roles/compute.futureReservationUser` (includes `compute.advice.calendarMode`, `compute.futureReservations.create`, `compute.futureReservations.delete`, `compute.futureReservations.get`, `compute.futureReservations.list`, and `compute.reservations.create`, **excluding `compute.futureReservations.cancel`**).
45
* **Cancelling Requests (`cancel`)**: Grant `roles/compute.futureReservationAdmin` (or `roles/compute.admin`), which is required for `compute.futureReservations.cancel`.
46
5. **Quota & Organization Policy**: Submitting a Calendar-Mode request requires **0 reservation quota** for GPUs and TPUs, but **H4D VMs require sufficient regional CPU quota** at submission, and **all** workloads require sufficient VM/TPU, boot disk, and IP quota at `start-time` to consume the auto-created reservation. Sharing across projects requires allowlisting the host project in organization policy `constraints/compute.sharedReservationsOwnerProjects`.
47
6. **Billing & Pricing Warning**: Approved Calendar-Mode Future Reservations automatically provision capacity at `start-time` and bill for the entire committed window whether or not VMs or TPUs are actively running. Review [Compute Engine Pricing](https://cloud.google.com/compute/pricing), [Available Regions and Zones](https://docs.cloud.google.com/compute/docs/regions-zones.md.txt), and [Google Cloud Locations](https://cloud.google.com/about/locations) (strip `.md.txt` suffixes when presenting documentation URLs to human users) before submitting requests.
48
49
---
50
51
## Command Syntax & Reference
52
53
### 1. Evaluate Calendar-Mode Feasibility Advice
54
55
Query the optimal time window and zone for a planned block of GPU or TPU capacity:
56
57
```bash
58
# For GPU / H4D VMs:
59
gcloud compute advice calendar-mode \
60
--project={project_id} \
61
--region={region} \
62
--machine-type={machine_type} \
63
--vm-count={total_instances} \
64
--start-time-range=from={start_date},to={end_date} \
65
--duration-range=min={min_duration},max={max_duration} \
66
[--location-policy={zone}={policy}]
67
68
# For Cloud TPUs (supported --tpu-version values: V6E, V5P, V5E; --workload-type is required for V5E):
69
gcloud compute advice calendar-mode \
70
--project={project_id} \
71
--region={region} \
72
--tpu-version={V6E|V5P|V5E} \
73
--chip-count={chip_count} \
74
--start-time-range=from={start_date},to={end_date} \
75
--duration-range=min={min_duration},max={max_duration} \
76
[--workload-type={BATCH|SERVING}] \
77
[--location-policy={zone}={policy}]
78
```
79
80
### 2. Inspect Existing Future Reservations
81
82
```bash
83
# List planned future reservations
84
gcloud compute future-reservations list \
85
--project={project_id} \
86
[--zones={zone}]
87
88
# Inspect a specific future reservation plan
89
gcloud compute future-reservations describe {future_reservation_name} \
90
--zone={zone} \
91
--project={project_id}
92
```
93
94
### 3. Create a Calendar-Mode Future Reservation Request
95
96
> [!IMPORTANT]
97
> Submitting a future reservation request (`--planning-status=SUBMITTED`) commits to capacity billing once approved. Always obtain explicit human approval before executing `gcloud compute future-reservations create`.
98
99
Once a feasible reservation window and zone are confirmed via `calendar-mode`, create and submit the request:
100
101
```bash
102
# For GPU / H4D VMs (requires --deployment-type=DENSE):
103
gcloud compute future-reservations create {future_reservation_name} \
104
--project={project_id} \
105
--zone={zone} \
106
--total-count={total_instances} \
107
--machine-type={machine_type} \
108
--deployment-type=DENSE \
109
--reservation-mode=CALENDAR \
110
--planning-status=SUBMITTED \
111
--require-specific-reservation \
112
--reservation-name={reservation_name} \
113
--start-time={start_rfc3339} \
114
--end-time={end_rfc3339} \
115
--auto-delete-auto-created-reservations \
116
[--share-setting=projects --share-with={consumer_project_ids}]
117
118
# For Cloud TPUs:
119
gcloud compute future-reservations create {future_reservation_name} \
120
--project={project_id} \
121
--zone={zone} \
122
--tpu-version={tpu_version} \
123
--chip-count={chip_count} \
124
--reservation-mode=CALENDAR \
125
--planning-status=SUBMITTED \
126
--require-specific-reservation \
127
--reservation-name={reservation_name} \
128
--start-time={start_rfc3339} \
129
--end-time={end_rfc3339} \
130
--auto-delete-auto-created-reservations \
131
[--workload-type={BATCH|SERVING}] \
132
[--share-setting=projects --share-with={consumer_project_ids}]
133
```
134
135
### 4. Cancel or Delete a Future Reservation (Resource Teardown)
136
137
To cancel a pending/submitted request or clean up a cancelled/completed future reservation (requires explicit human approval; `cancel` requires `roles/compute.futureReservationAdmin`):
138
139
* **Cancellation Cutoff (`cancel`)**: An `APPROVED` Calendar-Mode request can only be self-service cancelled when **`start-time` is at least 30 days (`720` hours) away**, or **within 24 hours of submission provided `start-time` is at least 4 days (`96` hours) away**.
140
* **Deletion Preconditions (`delete`)**: `delete` only succeeds once the request is `CANCELLED` or past `end-time`, and prompts interactively unless `--quiet` is passed.
141
142
```bash
143
# Cancel a pending or approved future reservation request (within the allowed window)
144
gcloud compute future-reservations cancel {future_reservation_name} \
145
--zone={zone} \
146
--project={project_id}
147
148
# Delete a cancelled or completed future reservation record
149
gcloud compute future-reservations delete {future_reservation_name} \
150
--zone={zone} \
151
--project={project_id}
152
```
153
154
### 5. Consume the Auto-Created Reservation at `start-time`
155
156
When `start-time` arrives, Compute Engine automatically provisions the targeted reservation `{reservation_name}`:
157
158
* **For GPU / H4D VMs**: Launch instances with `--provisioning-model=RESERVATION_BOUND`, `--maintenance-policy=TERMINATE`, `--instance-termination-action={STOP|DELETE}`, private networking (`--no-address` with IAP TCP forwarding), and a custom least-privilege `--service-account`:
159
```bash
160
gcloud compute instances create {vm_name} \
161
--project={project_id} \
162
--zone={zone} \
163
--machine-type={machine_type} \
164
--reservation-affinity=specific \
165
--reservation={reservation_name} \
166
--provisioning-model=RESERVATION_BOUND \
167
--maintenance-policy=TERMINATE \
168
--instance-termination-action=DELETE \
169
[--no-address] \
170
[--service-account={service_account_email}]
171
```
172
* **For Cloud TPUs**: Consume the auto-created reservation via the Compute Engine API using `gcloud compute instances create` or a Compute Engine Managed Instance Group (`gcloud compute instance-templates create` + `gcloud compute instance-groups managed create`) with the TPU machine type (e.g., `ct6e-standard-8t`), `--reservation-affinity=specific`, `--reservation=projects/{project_id}/reservations/{reservation_name}`, `--provisioning-model=RESERVATION_BOUND`, and `--maintenance-policy=TERMINATE` (see [Consume a TPU reservation](https://docs.cloud.google.com/tpu/docs/consume-reservation-compute.md.txt)).
173
174
---
175
176
## Key Parameters & Planning Dimensions
177
178
* **Calendar-Mode Query Flags**:
179
* `--start-time-range=from={start_date},to={end_date}`: Required acceptable start window in date or RFC 3339 format (e.g., `from=2026-11-01T00:00:00Z,to=2026-11-30T00:00:00Z`).
180
* `--duration-range=min={min_duration},max={max_duration}`: Required minimum and maximum operational duration needed (e.g., `min=7d,max=14d` or `min=14d,max=14d`). Both `min` and `max` must be provided.
181
* `--location-policy={zone}={policy}`: Optional per-zone inclusion/exclusion policy (`ALLOW` or `DENY`, e.g., `us-central1-a=ALLOW,us-central1-b=DENY`).
182
* `--tpu-version={V6E|V5P|V5E}`: Supported TPU versions in `advice calendar-mode` (`TPU7X` is supported only in `future-reservations create`, not in `advice calendar-mode`).
183
* `--workload-type={BATCH|SERVING}`: **Required** when `--tpu-version=V5E` and optional for `V6E` and `V5P`. `BATCH` optimizes for high-throughput batch ML training; `SERVING` optimizes for low-latency concurrent ML inference requests. Do not specify for GPU or H4D VMs.
184
* **Calendar-Mode Reservation Creation Flags**:
185
* `--reservation-mode=CALENDAR`: Required to create a Calendar-Mode future reservation.
186
* `--planning-status=SUBMITTED`: Required to submit the Calendar-Mode request for GCP review immediately (self-service Calendar-Mode requests reject `DRAFT` status).
187
* `--require-specific-reservation` & `--reservation-name={reservation_name}`: Required to name and target the reservation that Compute Engine automatically creates at `start-time` (`{reservation_name}` must be at most **38 characters**, e.g., `{future_reservation_name}-res`).
188
* `--deployment-type=DENSE`: Required when reserving GPU or H4D VMs to ensure tightly coupled placement.
189
* `--share-setting={share_type}`: Optional for single-project (`local`) reservations; required only when sharing across consumer projects (`projects`, specified via `--share-with`).
190
* `--auto-delete-auto-created-reservations`: Required flag in Calendar Mode so auto-created reservations are automatically deleted at `end-time` (`--no-auto-delete-auto-created-reservations` is rejected with `CALENDAR_MODE_MISSING_AUTO_DELETE`).
191
* **Lead Times & Hardware Limits** (baseline self-service limits; verify current limits dynamically via `gcloud compute advice calendar-mode` or the official [VM Calendar Mode](https://docs.cloud.google.com/compute/docs/instances/future-reservations-calendar-mode-overview.md.txt#limitations) and [TPU Calendar Mode](https://docs.cloud.google.com/tpu/docs/calendar-mode-reservation.md.txt) documentation as new hardware or limits roll out):
192
* **GPU (`a4-highgpu-8g`, `a3-ultragpu-8g`, `a3-megagpu-8g`, `a3-highgpu-8g`, `a3-edgegpu-8g`) and H4D VMs (`h4d-standard-192`, `h4d-highmem-192`, `h4d-highmem-192-lssd`)**:
193
* **Instance Count (`--vm-count` / `--total-count`)**: `1` to `80` VMs for GPUs (`1` to `256` VMs for H4D). Note: `a2-*`, `g2-*`, and `a4x-*` families are not supported in Calendar Mode.
194
* **Minimum Lead Time**: Earliest start time must be at least **87 hours** (3 days, 15 hours) in advance of current time.
195
* **Booking Horizon**: Can reserve up to **60 days** in advance.
196
* **Duration**: Minimum **24 hours**, maximum **90 days**.
197
* **Cloud TPUs**:
198
* **Valid Chip Counts (`--chip-count`) by TPU Version** (check the official [TPU Calendar Mode documentation](https://docs.cloud.google.com/tpu/docs/calendar-mode-reservation.md.txt) or CLI validation feedback if newly released TPU versions or slice sizes are requested):
199
* **`V6E`**: `1, 4, 8, 16, 32, 64, 128, 256` chips.
200
* **`V5P`**: `4, 8, 16, 32, 64, 128, 256, 512, 1024` chips (`1` chip is invalid; self-service requests in Calendar Mode allow up to `1024` chips per request).
201
* **`V5E`** (`--workload-type` required): `SERVING` supports `1, 4, 8` chips; `BATCH` supports `16, 32, 64, 128, 256` chips.
202
* **`TPU7X`** (allowlist-only; `future-reservations create` only; not supported in `advice calendar-mode`): `4, 8, 16, 32, 64, 128, 256, 512, 1024` chips (`1` chip is invalid).
203
* **Minimum Lead Time**: Earliest start time must be at least **6 hours** in advance of current time.
204
* **Booking Horizon**: Can reserve up to **120 days** in advance.
205
* **Duration**: Minimum **24 hours**, maximum **90 days**.
206
207
---
208
209
## Output Interpretation & Decision Matrix
210
211
`gcloud compute advice calendar-mode` returns a `recommendations` list containing `recommendationsPerSpec.spec`:
212
213
```yaml
214
recommendations:
215
- recommendationsPerSpec:
216
spec:
217
endTime: '2026-11-29T00:00:00Z'
218
location: zones/us-central1-a
219
otherLocations:
220
zones/us-central1-b:
221
details: this machine family is not supported in this zone
222
status: NOT_SUPPORTED
223
recommendationId: 87cc2159-5205-4804-b764-a0ca8d10397c
224
recommendationType: FUTURE_RESERVATION
225
startTime: '2026-11-15T00:00:00Z'
226
```
227
228
### Feasibility States
229
230
1. **FEASIBLE (Direct Match Available)**:
231
* `spec` includes `startTime`, `endTime`, and `location` (e.g., `zones/us-central1-a`; strip the `zones/` prefix when passing the bare zone name such as `us-central1-a` to `--zone` in `gcloud compute future-reservations create`).
232
* `otherLocations` keys are always intra-region zones (`zones/<zone>`) within the single queried `--region`, and may report runner-up zones within that same region with `status: RECOMMENDED` (or `NO_CAPACITY`, `CONDITIONS_NOT_MET`, `NOT_SUPPORTED`).
233
* **Action**: Present the recommended window and copy-pasteable `gcloud compute future-reservations create` command, and ask for explicit human approval before creating the reservation.
234
2. **INFEASIBLE / CONSTRAINED (No `startTime` / `location` Returned)**:
235
* Hardware or window constraints prevent fulfillment in the requested region or timeframe, and all intra-region `otherLocations` entries (`zones/<zone>`) report `status: NO_CAPACITY`, `CONDITIONS_NOT_MET`, or `NOT_SUPPORTED` (`RECOMMENDED` is never returned when `startTime`/`location` is absent, and `otherLocations` never lists other regions).
236
* **Mitigations**:
237
* **Query Alternative Regions**: Re-run `gcloud compute advice calendar-mode --region={other_region}` against other regions that host the target accelerator (e.g., `us-east4` or `us-west1`).
238
* **Flex Time Window**: Widen `--start-time-range=from=...,to=...` to grant the scheduler a broader search window.
239
* **Shorten Duration**: Reduce `--duration-range` by breaking massive training runs into smaller checkpointed phases.
240
* **Alternative Hardware Generations**: Evaluate equivalent compute alternatives (e.g., comparing `a3-highgpu-8g` with `a3-megagpu-8g` or newer generation TPU slices).
241
242
---
243
244
## Operational Guardrails
245
246
* **Human-Approval Guardrail & Request Immutability**: Never execute mutating commands (`gcloud compute future-reservations create`, `cancel`, `delete`, or `gcloud compute reservations update`) without explicit human approval from the user. Submitted Calendar-Mode future reservation requests cannot be modified via `gcloud compute future-reservations update`; only the auto-created reservation can be updated after `start-time` via `gcloud compute reservations update` (for example, to modify shared consumer projects or Vertex AI access).
247
* **Compute Engine MCP Server Guardrail**: The Compute Engine MCP server exposes zero tools for `AdviceService` (`advice calendar-mode`) or `FutureReservationsService`, and MCP `create_instance` cannot set `provisioning_model: RESERVATION_BOUND` when consuming auto-created Calendar-Mode reservations. Always use the `gcloud` CLI.
248
* **Past Date Validation**: If the user's requested reservation window or start date is in the past relative to the current date, do not generate speculative future reservation queries or commands. Ask clarifying questions requesting valid future start and end dates.
249
* **Negative Guardrail (No Spot Capacity Telemetry)**: Do not use real-time Spot capacity advice (`gcloud beta compute advice capacity --provisioning-model=SPOT`) or emit obtainability scores when planning future GPU/TPU reservations. Future capacity planning requires calendar-mode feasibility analysis, not real-time Spot preemption metrics.
250

© Google LLC · Apache 2.0 · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,625 prompts

More by @OpenSourceBuffGuy

See all
Woman teleported into open world game city prompt image

Woman teleported into open world game city

Generates a 15-second UGC-style video of a young woman teleported into an open-world game city, with a car chase, spoken lines and a live-action look.

video-prompt, ugc-video, video-games, action, timed-beats, multi-shot, lip-sync, character-consistency, scene-transitions, visual-effects, cityscape, cars, woman, cinematic, pov, short-form-video, guardrails, for-content-creators, for-gamers, long-form, structured-output, humorous, transformation, tracking-shot

Cubist Kawaii Vector Portrait prompt image

Cubist Kawaii Vector Portrait

Makes a cubist, kawaii-style minimal vector portrait with simplified features, flat colour blocks and oil-pastel grain on a matte black background, as a gallery poster.

image-prompt, gpt-image, vector-art, portrait, kawaii, minimalist, flat-design, caricature, poster, editorial, fashion, luxury, vibrant-colors, limited-palette, printmaking, illustration, for-artists, for-designers, art-history, whimsical

Grafana Dashboards prompt image

Grafana Dashboards

Guides the AI in building production Grafana dashboards for Prometheus metrics, using RED and USE methods, layout hierarchy and JSON dashboard definitions.

agent-skill, grafana, prometheus, observability, dashboard, data-visualization, devops, site-reliability, kpis, json-output, best-practices, for-devops-engineers, for-developers, code, step-by-step-guide, performance-optimization, template

Reviews

Loading reviews…

Discussion

Loading comments…