compute-future-reservations
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCompute Engine Future Reservations & Calendar-Mode Feasibility
Compute Engine Future Reservations 与 Calendar Mode 可行性
The 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.
compute-future-reservations[!NOTE] Scope Boundary (Calendar Mode vs. Standard Future Reservations): This skill covers Calendar-Mode Future Reservations (, backed by Dynamic Workload Scheduler for up to 90 days on supported families such as--reservation-mode=CALENDAR,a3*,a4*, and Cloud TPUs; for newly released machine series, verify Calendar Mode support dynamically viah4d*or the official Calendar Mode documentation). Do not apply Calendar-Mode flags (gcloud compute advice calendar-mode,--reservation-mode=CALENDAR) to Standard Future Reservations (--deployment-type=DENSEfor general-purpose CPU families,--reservation-mode=DEFAULT/a2*GPUs,g2*planning workflows, or multi-month/CUD commitments).DRAFT
compute-future-reservations[!NOTE] 范围边界(Calendar Mode 与 Standard Future Reservations):此 skill 涵盖 Calendar-Mode Future Reservations(,由 Dynamic Workload Scheduler 提供支持,最长可达 90 天;适用于--reservation-mode=CALENDAR、a3*、a4*等受支持的机型系列和 Cloud TPU;对于新发布的机器系列,请通过h4d*或官方 Calendar Mode 文档 动态验证 Calendar Mode 支持情况)。不要将 Calendar-Mode 标志(gcloud compute advice calendar-mode、--reservation-mode=CALENDAR)应用于 Standard Future Reservations(--deployment-type=DENSE,用于通用 CPU 系列、--reservation-mode=DEFAULT/a2*GPU、g2*规划工作流,或多月/CUD 承诺用量)。DRAFT
Usage Attribution
使用归属
MUST READ: Before executing any , REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.
gcloud必须阅读:执行任何 、REST API 或 MCP 命令前,您必须阅读并遵循 使用归属 中的说明。
gcloudPrerequisites, IAM & Billing
前置条件、IAM 与计费
Before querying calendar-mode advice or submitting future reservation requests, ensure the environment meets these requirements:
- Project & Region Configuration: Prefer passing and
--project={project_id}(or--region={region}) directly on each command to avoid overwriting global workstation state, or obtain explicit user confirmation before setting defaults (e.g.,--zone={zone}):us-central1bashgcloud config set project {project_id} gcloud config set compute/region {region} - Billing & API Enablement: Ensure the project has an active billing account attached and the Compute Engine API is enabled:
bash
gcloud services enable compute.googleapis.com --project={project_id} - Cloud SDK & Authentication: Ensure the Google Cloud CLI is installed (never execute unprompted host installation commands such as or
apt-getwithout explicit user approval; direct the user to the installation guide instead), then authenticate viacurl | bash(for interactive CLI),gcloud auth login(for SDKs), orgcloud auth application-default login(for service accounts).GOOGLE_APPLICATION_CREDENTIALS - IAM Permissions:
- Feasibility, Creation & Inspection (,
advice calendar-mode,create,list,describe): Grantdelete(includesroles/compute.futureReservationUser,compute.advice.calendarMode,compute.futureReservations.create,compute.futureReservations.delete,compute.futureReservations.get, andcompute.futureReservations.list, excludingcompute.reservations.create).compute.futureReservations.cancel - Cancelling Requests (): Grant
cancel(orroles/compute.futureReservationAdmin), which is required forroles/compute.admin.compute.futureReservations.cancel
- Feasibility, Creation & Inspection (
- 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 to consume the auto-created reservation. Sharing across projects requires allowlisting the host project in organization policy
start-time.constraints/compute.sharedReservationsOwnerProjects - Billing & Pricing Warning: Approved Calendar-Mode Future Reservations automatically provision capacity at and bill for the entire committed window whether or not VMs or TPUs are actively running. Review Compute Engine Pricing, Available Regions and Zones, and Google Cloud Locations (strip
start-timesuffixes when presenting documentation URLs to human users) before submitting requests..md.txt
在查询 Calendar Mode 建议或提交 Future Reservation 请求之前,请确保环境满足以下要求:
- 项目与区域配置:优先在每条命令中直接传入 和
--project={project_id}(或--region={region}),以避免覆盖全局工作站状态;或者在设置默认值(例如--zone={zone})之前获得用户的明确确认:us-central1bashgcloud config set project {project_id} gcloud config set compute/region {region} - 计费与 API 启用:确保项目已关联有效结算账号,并已启用 Compute Engine API:
bash
gcloud services enable compute.googleapis.com --project={project_id} - Cloud SDK 与身份认证:确保已安装 Google Cloud CLI。未经明确批准,绝不可执行 或
apt-get等主机安装命令;应引导用户查阅安装指南。随后通过curl | bash进行身份认证(适用于交互式 CLI),通过gcloud auth login进行身份认证(适用于 SDK),或使用gcloud auth application-default login(适用于服务账号)。GOOGLE_APPLICATION_CREDENTIALS - IAM 权限:
- 可行性、创建与检查(、
advice calendar-mode、create、list、describe):授予delete(包括roles/compute.futureReservationUser、compute.advice.calendarMode、compute.futureReservations.create、compute.futureReservations.delete、compute.futureReservations.get和compute.futureReservations.list,但不包括compute.reservations.create)。compute.futureReservations.cancel - 取消请求():授予
cancel(或roles/compute.futureReservationAdmin),该权限是执行roles/compute.admin所必需的。compute.futureReservations.cancel
- 可行性、创建与检查(
- 配额与组织策略:提交 Calendar-Mode 请求时,GPU 和 TPU 无需预留配额,但 H4D VM 在提交时需要充足的区域 CPU 配额;所有工作负载在 使用自动创建的预留时,都必须具有充足的 VM/TPU、启动磁盘和 IP 配额。若需跨项目共享,必须在组织策略
start-time的允许列表中加入宿主项目。constraints/compute.sharedReservationsOwnerProjects - 计费与定价警告:获批的 Calendar-Mode Future Reservations 会在 自动预配容量,并且无论 VM 或 TPU 是否实际运行,都会针对整个承诺窗口计费。提交请求前,请查阅 Compute Engine 定价、可用区域和可用区 和 Google Cloud locations(向用户展示文档 URL 时,应去掉
start-time后缀)。.md.txt
Command Syntax & Reference
命令语法与参考
1. Evaluate Calendar-Mode Feasibility Advice
1. 评估 Calendar Mode 可行性建议
Query the optimal time window and zone for a planned block of GPU or TPU capacity:
bash
undefined为计划中的 GPU 或 TPU 容量块查询最佳时间窗口和可用区:
bash
undefinedFor GPU / H4D VMs:
For GPU / H4D VMs:
gcloud compute advice calendar-mode
--project={project_id}
--region={region}
--machine-type={machine_type}
--vm-count={total_instances}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--location-policy={zone}={policy}]
--project={project_id}
--region={region}
--machine-type={machine_type}
--vm-count={total_instances}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--location-policy={zone}={policy}]
gcloud compute advice calendar-mode
--project={project_id}
--region={region}
--machine-type={machine_type}
--vm-count={total_instances}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--location-policy={zone}={policy}]
--project={project_id}
--region={region}
--machine-type={machine_type}
--vm-count={total_instances}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--location-policy={zone}={policy}]
For Cloud TPUs (supported --tpu-version values: V6E, V5P, V5E; --workload-type is required for V5E):
For Cloud TPUs (supported --tpu-version values: V6E, V5P, V5E; --workload-type is required for V5E):
gcloud compute advice calendar-mode
--project={project_id}
--region={region}
--tpu-version={V6E|V5P|V5E}
--chip-count={chip_count}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--workload-type={BATCH|SERVING}]
[--location-policy={zone}={policy}]
--project={project_id}
--region={region}
--tpu-version={V6E|V5P|V5E}
--chip-count={chip_count}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--workload-type={BATCH|SERVING}]
[--location-policy={zone}={policy}]
undefinedgcloud compute advice calendar-mode
--project={project_id}
--region={region}
--tpu-version={V6E|V5P|V5E}
--chip-count={chip_count}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--workload-type={BATCH|SERVING}]
[--location-policy={zone}={policy}]
--project={project_id}
--region={region}
--tpu-version={V6E|V5P|V5E}
--chip-count={chip_count}
--start-time-range=from={start_date},to={end_date}
--duration-range=min={min_duration},max={max_duration}
[--workload-type={BATCH|SERVING}]
[--location-policy={zone}={policy}]
undefined2. Inspect Existing Future Reservations
2. 检查现有 Future Reservations
bash
undefinedbash
undefinedList planned future reservations
List planned future reservations
gcloud compute future-reservations list
--project={project_id}
[--zones={zone}]
--project={project_id}
[--zones={zone}]
gcloud compute future-reservations list
--project={project_id}
[--zones={zone}]
--project={project_id}
[--zones={zone}]
Inspect a specific future reservation plan
Inspect a specific future reservation plan
gcloud compute future-reservations describe {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
undefinedgcloud compute future-reservations describe {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
undefined3. Create a Calendar-Mode Future Reservation Request
3. 创建 Calendar-Mode Future Reservation 请求
[!IMPORTANT] Submitting a future reservation request () commits to capacity billing once approved. Always obtain explicit human approval before executing--planning-status=SUBMITTED.gcloud compute future-reservations create
Once a feasible reservation window and zone are confirmed via , create and submit the request:
calendar-modebash
undefined[!IMPORTANT] 提交 Future Reservation 请求()后,一旦获批即会承诺产生容量费用。执行--planning-status=SUBMITTED前,必须获得明确的人工批准。gcloud compute future-reservations create
通过 确认可行的预留窗口和可用区后,即可创建并提交请求:
calendar-modebash
undefinedFor GPU / H4D VMs (requires --deployment-type=DENSE):
For GPU / H4D VMs (requires --deployment-type=DENSE):
gcloud compute future-reservations create {future_reservation_name}
--project={project_id}
--zone={zone}
--total-count={total_instances}
--machine-type={machine_type}
--deployment-type=DENSE
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--share-setting=projects --share-with={consumer_project_ids}]
--project={project_id}
--zone={zone}
--total-count={total_instances}
--machine-type={machine_type}
--deployment-type=DENSE
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--share-setting=projects --share-with={consumer_project_ids}]
gcloud compute future-reservations create {future_reservation_name}
--project={project_id}
--zone={zone}
--total-count={total_instances}
--machine-type={machine_type}
--deployment-type=DENSE
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--share-setting=projects --share-with={consumer_project_ids}]
--project={project_id}
--zone={zone}
--total-count={total_instances}
--machine-type={machine_type}
--deployment-type=DENSE
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--share-setting=projects --share-with={consumer_project_ids}]
For Cloud TPUs:
For Cloud TPUs:
gcloud compute future-reservations create {future_reservation_name}
--project={project_id}
--zone={zone}
--tpu-version={tpu_version}
--chip-count={chip_count}
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--workload-type={BATCH|SERVING}]
[--share-setting=projects --share-with={consumer_project_ids}]
--project={project_id}
--zone={zone}
--tpu-version={tpu_version}
--chip-count={chip_count}
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--workload-type={BATCH|SERVING}]
[--share-setting=projects --share-with={consumer_project_ids}]
undefinedgcloud compute future-reservations create {future_reservation_name}
--project={project_id}
--zone={zone}
--tpu-version={tpu_version}
--chip-count={chip_count}
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--workload-type={BATCH|SERVING}]
[--share-setting=projects --share-with={consumer_project_ids}]
--project={project_id}
--zone={zone}
--tpu-version={tpu_version}
--chip-count={chip_count}
--reservation-mode=CALENDAR
--planning-status=SUBMITTED
--require-specific-reservation
--reservation-name={reservation_name}
--start-time={start_rfc3339}
--end-time={end_rfc3339}
--auto-delete-auto-created-reservations
[--workload-type={BATCH|SERVING}]
[--share-setting=projects --share-with={consumer_project_ids}]
undefined4. Cancel or Delete a Future Reservation (Resource Teardown)
4. 取消或删除 Future Reservation(资源拆除)
To cancel a pending/submitted request or clean up a cancelled/completed future reservation (requires explicit human approval; requires ):
cancelroles/compute.futureReservationAdmin- Cancellation Cutoff (): An
cancelCalendar-Mode request can only be self-service cancelled whenAPPROVEDis at least 30 days (start-timehours) away, or within 24 hours of submission provided720is at least 4 days (start-timehours) away.96 - Deletion Preconditions ():
deleteonly succeeds once the request isdeleteor pastCANCELLED, and prompts interactively unlessend-timeis passed.--quiet
bash
undefined如需取消待处理或已提交的请求,或清理已取消或已完成的 Future Reservation,必须获得明确的人工批准;执行 需要 :
cancelroles/compute.futureReservationAdmin- 取消截止时间():已为
cancel状态的 Calendar-Mode 请求,只有在APPROVED距离当前时间至少 30 天(start-time小时),或者在提交后 24 小时内且720距离当前时间至少 4 天(start-time小时)时,才能通过自助方式取消。96 - 删除前置条件():只有在请求已处于
delete状态或已超过CANCELLED后,end-time才能成功;除非传入delete,否则会触发交互式提示。--quiet
bash
undefinedCancel a pending or approved future reservation request (within the allowed window)
Cancel a pending or approved future reservation request (within the allowed window)
gcloud compute future-reservations cancel {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
gcloud compute future-reservations cancel {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
Delete a cancelled or completed future reservation record
Delete a cancelled or completed future reservation record
gcloud compute future-reservations delete {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
undefinedgcloud compute future-reservations delete {future_reservation_name}
--zone={zone}
--project={project_id}
--zone={zone}
--project={project_id}
undefined5. Consume the Auto-Created Reservation at start-time
start-time5. 在 start-time
使用自动创建的 Reservation
start-timeWhen arrives, Compute Engine automatically provisions the targeted reservation :
start-time{reservation_name}- For GPU / H4D VMs: Launch instances with ,
--provisioning-model=RESERVATION_BOUND,--maintenance-policy=TERMINATE, private networking (--instance-termination-action={STOP|DELETE}with IAP TCP forwarding), and a custom least-privilege--no-address:--service-accountbashgcloud compute instances create {vm_name} \ --project={project_id} \ --zone={zone} \ --machine-type={machine_type} \ --reservation-affinity=specific \ --reservation={reservation_name} \ --provisioning-model=RESERVATION_BOUND \ --maintenance-policy=TERMINATE \ --instance-termination-action=DELETE \ [--no-address] \ [--service-account={service_account_email}] - For Cloud TPUs: Consume the auto-created reservation via the Compute Engine API using or a Compute Engine Managed Instance Group (
gcloud compute instances create+gcloud compute instance-templates create) with the TPU machine type (e.g.,gcloud compute instance-groups managed create),ct6e-standard-8t,--reservation-affinity=specific,--reservation=projects/{project_id}/reservations/{reservation_name}, and--provisioning-model=RESERVATION_BOUND(see Consume a TPU reservation).--maintenance-policy=TERMINATE
到达 时,Compute Engine 会自动预配目标预留 :
start-time{reservation_name}- 对于 GPU/H4D VM:使用 、
--provisioning-model=RESERVATION_BOUND、--maintenance-policy=TERMINATE启动实例,配置私有网络(--instance-termination-action={STOP|DELETE}配合 IAP TCP forwarding),并使用自定义的最小权限--no-address:--service-accountbashgcloud compute instances create {vm_name} \ --project={project_id} \ --zone={zone} \ --machine-type={machine_type} \ --reservation-affinity=specific \ --reservation={reservation_name} \ --provisioning-model=RESERVATION_BOUND \ --maintenance-policy=TERMINATE \ --instance-termination-action=DELETE \ [--no-address] \ [--service-account={service_account_email}] - 对于 Cloud TPU:通过 Compute Engine API 使用 或 Compute Engine Managed Instance Group(
gcloud compute instances create+gcloud compute instance-templates create)使用自动创建的预留,并设置 TPU machine type(例如gcloud compute instance-groups managed create)、ct6e-standard-8t、--reservation-affinity=specific、--reservation=projects/{project_id}/reservations/{reservation_name}和--provisioning-model=RESERVATION_BOUND(请参阅使用 TPU 预留)。--maintenance-policy=TERMINATE
Key Parameters & Planning Dimensions
关键参数与规划维度
- Calendar-Mode Query Flags:
- : Required acceptable start window in date or RFC 3339 format (e.g.,
--start-time-range=from={start_date},to={end_date}).from=2026-11-01T00:00:00Z,to=2026-11-30T00:00:00Z - : Required minimum and maximum operational duration needed (e.g.,
--duration-range=min={min_duration},max={max_duration}ormin=7d,max=14d). Bothmin=14d,max=14dandminmust be provided.max - : Optional per-zone inclusion/exclusion policy (
--location-policy={zone}={policy}orALLOW, e.g.,DENY).us-central1-a=ALLOW,us-central1-b=DENY - : Supported TPU versions in
--tpu-version={V6E|V5P|V5E}(advice calendar-modeis supported only inTPU7X, not infuture-reservations create).advice calendar-mode - : Required when
--workload-type={BATCH|SERVING}and optional for--tpu-version=V5EandV6E.V5Poptimizes for high-throughput batch ML training;BATCHoptimizes for low-latency concurrent ML inference requests. Do not specify for GPU or H4D VMs.SERVING
- Calendar-Mode Reservation Creation Flags:
- : Required to create a Calendar-Mode future reservation.
--reservation-mode=CALENDAR - : Required to submit the Calendar-Mode request for GCP review immediately (self-service Calendar-Mode requests reject
--planning-status=SUBMITTEDstatus).DRAFT - &
--require-specific-reservation: Required to name and target the reservation that Compute Engine automatically creates at--reservation-name={reservation_name}(start-timemust be at most 38 characters, e.g.,{reservation_name}).{future_reservation_name}-res - : Required when reserving GPU or H4D VMs to ensure tightly coupled placement.
--deployment-type=DENSE - : Optional for single-project (
--share-setting={share_type}) reservations; required only when sharing across consumer projects (local, specified viaprojects).--share-with - : Required flag in Calendar Mode so auto-created reservations are automatically deleted at
--auto-delete-auto-created-reservations(end-timeis rejected with--no-auto-delete-auto-created-reservations).CALENDAR_MODE_MISSING_AUTO_DELETE
- Lead Times & Hardware Limits (baseline self-service limits; verify current limits dynamically via or the official VM Calendar Mode and TPU Calendar Mode documentation as new hardware or limits roll out):
gcloud compute advice calendar-mode- GPU (,
a4-highgpu-8g,a3-ultragpu-8g,a3-megagpu-8g,a3-highgpu-8g) and H4D VMs (a3-edgegpu-8g,h4d-standard-192,h4d-highmem-192):h4d-highmem-192-lssd- Instance Count (/
--vm-count):--total-countto1VMs for GPUs (80to1VMs for H4D). Note:256,a2-*, andg2-*families are not supported in Calendar Mode.a4x-* - Minimum Lead Time: Earliest start time must be at least 87 hours (3 days, 15 hours) in advance of current time.
- Booking Horizon: Can reserve up to 60 days in advance.
- Duration: Minimum 24 hours, maximum 90 days.
- Instance Count (
- Cloud TPUs:
- Valid Chip Counts () by TPU Version (check the official TPU Calendar Mode documentation or CLI validation feedback if newly released TPU versions or slice sizes are requested):
--chip-count- :
V6Echips.1, 4, 8, 16, 32, 64, 128, 256 - :
V5Pchips (4, 8, 16, 32, 64, 128, 256, 512, 1024chip is invalid; self-service requests in Calendar Mode allow up to1chips per request).1024 - (
V5Erequired):--workload-typesupportsSERVINGchips;1, 4, 8supportsBATCHchips.16, 32, 64, 128, 256 - (allowlist-only;
TPU7Xonly; not supported infuture-reservations create):advice calendar-modechips (4, 8, 16, 32, 64, 128, 256, 512, 1024chip is invalid).1
- Minimum Lead Time: Earliest start time must be at least 6 hours in advance of current time.
- Booking Horizon: Can reserve up to 120 days in advance.
- Duration: Minimum 24 hours, maximum 90 days.
- Valid Chip Counts (
- GPU (
- Calendar-Mode 查询标志:
- :必填,表示可接受的开始时间窗口,采用日期或 RFC 3339 格式(例如
--start-time-range=from={start_date},to={end_date})。from=2026-11-01T00:00:00Z,to=2026-11-30T00:00:00Z - :必填,表示所需的最小和最大运行时长(例如
--duration-range=min={min_duration},max={max_duration}或min=7d,max=14d)。必须同时提供min=14d,max=14d和min。max - :可选,用于按可用区设置包含或排除策略(
--location-policy={zone}={policy}或ALLOW,例如DENY)。us-central1-a=ALLOW,us-central1-b=DENY - :
--tpu-version={V6E|V5P|V5E}支持的 TPU 版本(advice calendar-mode仅在TPU7X中受支持,不支持future-reservations create)。advice calendar-mode - :使用
--workload-type={BATCH|SERVING}时必填,使用--tpu-version=V5E和V6E时可选。V5P针对高吞吐量批量 ML 训练进行优化;BATCH针对低延迟并发 ML 推理请求进行优化。对于 GPU 或 H4D VM,不要指定此参数。SERVING
- Calendar-Mode 预留创建标志:
- :创建 Calendar-Mode Future Reservation 时必填。
--reservation-mode=CALENDAR - :必填,用于立即提交 Calendar-Mode 请求以供 GCP 审核(自助 Calendar-Mode 请求会拒绝
--planning-status=SUBMITTED状态)。DRAFT - 和
--require-specific-reservation:必填,用于命名并指定 Compute Engine 在--reservation-name={reservation_name}自动创建的预留(start-time的长度最多为 38 个字符,例如{reservation_name})。{future_reservation_name}-res - :预留 GPU 或 H4D VM 时必填,用于确保紧密耦合放置。
--deployment-type=DENSE - :单项目(
--share-setting={share_type})预留时可选;仅在跨消费项目共享时为必填(local,通过projects指定)。--share-with - :Calendar Mode 中必填,用于在
--auto-delete-auto-created-reservations自动删除自动创建的预留(在end-time模式下使用CALENDAR会返回--no-auto-delete-auto-created-reservations)。CALENDAR_MODE_MISSING_AUTO_DELETE
- 提前期与硬件限制(自助限制基线;随着新硬件或限制上线,请通过 或官方 VM Calendar Mode 和 TPU Calendar Mode 文档动态验证当前限制):
gcloud compute advice calendar-mode- GPU(、
a4-highgpu-8g、a3-ultragpu-8g、a3-megagpu-8g、a3-highgpu-8g)和 H4D VM(a3-edgegpu-8g、h4d-standard-192、h4d-highmem-192):h4d-highmem-192-lssd- 实例数量(/
--vm-count):GPU 支持--total-count到1个 VM,H4D 支持80到1个 VM。注意:Calendar Mode 不支持256、a2-*和g2-*系列。a4x-* - 最短提前期:最早开始时间必须比当前时间至少提前 87 小时(3 天 15 小时)。
- 预订范围:最多可提前 60 天预订。
- 持续时间:最短 24 小时,最长 90 天。
- 实例数量(
- Cloud TPU:
- 按 TPU 版本划分的有效芯片数量()(如果请求新发布的 TPU 版本或 slice 大小,请查阅官方 TPU Calendar Mode 文档 或参考 CLI 校验反馈):
--chip-count- :
V6E个芯片。1, 4, 8, 16, 32, 64, 128, 256 - :
V5P个芯片(4, 8, 16, 32, 64, 128, 256, 512, 1024个芯片无效;Calendar Mode 的自助请求每次最多允许1个芯片)。1024 - (必须指定
V5E):--workload-type支持SERVING个芯片;1, 4, 8支持BATCH个芯片。16, 32, 64, 128, 256 - (仅限允许列表;仅支持
TPU7X,不支持future-reservations create):advice calendar-mode个芯片(4, 8, 16, 32, 64, 128, 256, 512, 1024个芯片无效)。1
- 最短提前期:最早开始时间必须比当前时间至少提前 6 小时。
- 预订范围:最多可提前 120 天预订。
- 持续时间:最短 24 小时,最长 90 天。
- 按 TPU 版本划分的有效芯片数量(
- GPU(
Output Interpretation & Decision Matrix
输出解读与决策矩阵
gcloud compute advice calendar-moderecommendationsrecommendationsPerSpec.specyaml
recommendations:
- recommendationsPerSpec:
spec:
endTime: '2026-11-29T00:00:00Z'
location: zones/us-central1-a
otherLocations:
zones/us-central1-b:
details: this machine family is not supported in this zone
status: NOT_SUPPORTED
recommendationId: 87cc2159-5205-4804-b764-a0ca8d10397c
recommendationType: FUTURE_RESERVATION
startTime: '2026-11-15T00:00:00Z'gcloud compute advice calendar-moderecommendationsrecommendationsPerSpec.specyaml
recommendations:
- recommendationsPerSpec:
spec:
endTime: '2026-11-29T00:00:00Z'
location: zones/us-central1-a
otherLocations:
zones/us-central1-b:
details: this machine family is not supported in this zone
status: NOT_SUPPORTED
recommendationId: 87cc2159-5205-4804-b764-a0ca8d10397c
recommendationType: FUTURE_RESERVATION
startTime: '2026-11-15T00:00:00Z'Feasibility States
可行性状态
- FEASIBLE (Direct Match Available):
- includes
spec,startTime, andendTime(e.g.,location; strip thezones/us-central1-aprefix when passing the bare zone name such aszones/tous-central1-ain--zone).gcloud compute future-reservations create - keys are always intra-region zones (
otherLocations) within the single queriedzones/<zone>, and may report runner-up zones within that same region with--region(orstatus: RECOMMENDED,NO_CAPACITY,CONDITIONS_NOT_MET).NOT_SUPPORTED - Action: Present the recommended window and copy-pasteable command, and ask for explicit human approval before creating the reservation.
gcloud compute future-reservations create
- INFEASIBLE / CONSTRAINED (No /
startTimeReturned):location- Hardware or window constraints prevent fulfillment in the requested region or timeframe, and all intra-region entries (
otherLocations) reportzones/<zone>,status: NO_CAPACITY, orCONDITIONS_NOT_MET(NOT_SUPPORTEDis never returned whenRECOMMENDED/startTimeis absent, andlocationnever lists other regions).otherLocations - Mitigations:
- Query Alternative Regions: Re-run against other regions that host the target accelerator (e.g.,
gcloud compute advice calendar-mode --region={other_region}orus-east4).us-west1 - Flex Time Window: Widen to grant the scheduler a broader search window.
--start-time-range=from=...,to=... - Shorten Duration: Reduce by breaking massive training runs into smaller checkpointed phases.
--duration-range - Alternative Hardware Generations: Evaluate equivalent compute alternatives (e.g., comparing with
a3-highgpu-8gor newer generation TPU slices).a3-megagpu-8g
- Query Alternative Regions: Re-run
- Hardware or window constraints prevent fulfillment in the requested region or timeframe, and all intra-region
- FEASIBLE(存在直接匹配):
- 包含
spec、startTime和endTime(例如location;向zones/us-central1-a的gcloud compute future-reservations create传入不含--zone前缀的可用区名称,例如zones/时,应去掉此前缀)。us-central1-a - 的键始终是单一查询
otherLocations内的区域内可用区(--region),其中可能包含同一区域内排名靠后的可用区及其zones/<zone>(或其他状态status: RECOMMENDED、NO_CAPACITY、CONDITIONS_NOT_MET)。NOT_SUPPORTED - 操作:展示推荐的窗口和可直接复制粘贴的 命令,并在创建预留前请求明确的人工批准。
gcloud compute future-reservations create
- INFEASIBLE / CONSTRAINED(未返回 或
startTime):location- 硬件或时间窗口约束导致无法在请求的区域或时限内完成,并且所有区域内 条目(
otherLocations)均报告zones/<zone>、status: NO_CAPACITY或CONDITIONS_NOT_MET(缺少NOT_SUPPORTED或startTime时绝不会返回location,且RECOMMENDED不会列出其他区域)。otherLocations - 缓解措施:
- 查询替代区域:使用 重新查询其他可承载目标加速器的区域(例如
gcloud compute advice calendar-mode --region={other_region}或us-east4)。us-west1 - 灵活调整时间窗口:扩大 ,为调度器提供更广泛的搜索窗口。
--start-time-range=from=...,to=... - 缩短持续时间:通过将大型训练任务拆分为更短的检查点阶段,缩短 。
--duration-range - 替代硬件代际:评估等效的计算替代方案,例如比较 与
a3-highgpu-8g,或使用新一代 TPU slice。a3-megagpu-8g
- 查询替代区域:使用
- 硬件或时间窗口约束导致无法在请求的区域或时限内完成,并且所有区域内
Operational Guardrails
操作护栏
- Human-Approval Guardrail & Request Immutability: Never execute mutating commands (,
gcloud compute future-reservations create,cancel, ordelete) without explicit human approval from the user. Submitted Calendar-Mode future reservation requests cannot be modified viagcloud compute reservations update; only the auto-created reservation can be updated aftergcloud compute future-reservations updateviastart-time(for example, to modify shared consumer projects or Vertex AI access).gcloud compute reservations update - Compute Engine MCP Server Guardrail: The Compute Engine MCP server exposes zero tools for (
AdviceService) oradvice calendar-mode, and MCPFutureReservationsServicecannot setcreate_instancewhen consuming auto-created Calendar-Mode reservations. Always use theprovisioning_model: RESERVATION_BOUNDCLI.gcloud - 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.
- Negative Guardrail (No Spot Capacity Telemetry): Do not use real-time Spot capacity advice () or emit obtainability scores when planning future GPU/TPU reservations. Future capacity planning requires calendar-mode feasibility analysis, not real-time Spot preemption metrics.
gcloud beta compute advice capacity --provisioning-model=SPOT
- 人工批准护栏与请求不可变性:未经用户明确批准,绝不可执行变更型命令(、
gcloud compute future-reservations create、cancel或delete)。已提交的 Calendar-Mode Future Reservation 请求无法通过gcloud compute reservations update修改;只有在gcloud compute future-reservations update之后,才能通过start-time更新自动创建的预留,例如修改共享消费项目或 Vertex AI 访问权限。gcloud compute reservations update - Compute Engine MCP Server 护栏:Compute Engine MCP server 未暴露任何用于 (
AdviceService)或advice calendar-mode的工具,并且 MCPFutureReservationsService在使用自动创建的 Calendar-Mode 预留时无法设置create_instance。始终使用provisioning_model: RESERVATION_BOUNDCLI。gcloud - 过去日期校验:如果用户请求的预留窗口或开始日期早于当前日期,不得生成推测性的 Future Reservation 查询或命令。应提出澄清问题,要求用户提供有效的未来开始日期和结束日期。
- 反向护栏(无 Spot 容量遥测):规划未来 GPU/TPU 预留时,不得使用实时 Spot 容量建议(),也不得输出可获得性分数。未来容量规划需要基于 Calendar Mode 的可行性分析,而不是实时 Spot 抢占指标。
gcloud beta compute advice capacity --provisioning-model=SPOT