compute-future-reservations

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Compute Engine Future Reservations & Calendar-Mode Feasibility

Compute Engine Future Reservations 与 Calendar Mode 可行性

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.
[!NOTE] 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). 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).
compute-future-reservations
skill 评估针对高需求 AI/ML 硬件(NVIDIA GPU、H4D VM 和 Google Cloud TPU)的未来容量可用性与可行性。它使基础架构工程师能够评估未来预留窗口、匹配集群拓扑,并管理 Calendar Mode 预订。
[!NOTE] 范围边界(Calendar Mode 与 Standard Future Reservations):此 skill 涵盖 Calendar-Mode Future Reservations(
--reservation-mode=CALENDAR
,由 Dynamic Workload Scheduler 提供支持,最长可达 90 天;适用于
a3*
、
a4*
、
h4d*
等受支持的机型系列和 Cloud TPU;对于新发布的机器系列,请通过
gcloud compute advice calendar-mode
或官方 Calendar Mode 文档 动态验证 Calendar Mode 支持情况)。不要将 Calendar-Mode 标志(
--reservation-mode=CALENDAR
、
--deployment-type=DENSE
)应用于 Standard Future Reservations(
--reservation-mode=DEFAULT
,用于通用 CPU 系列、
a2*
/
g2*
GPU、
DRAFT
规划工作流,或多月/CUD 承诺用量)。

Usage Attribution

使用归属

MUST READ: Before executing any
gcloud
, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.

必须阅读:执行任何
gcloud
、REST API 或 MCP 命令前,您必须阅读并遵循 使用归属 中的说明。

Prerequisites, IAM & Billing

前置条件、IAM 与计费

Before querying calendar-mode advice or submitting future reservation requests, ensure the environment meets these requirements:
  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
    ):
    bash
    gcloud config set project {project_id}
    gcloud config set compute/region {region}
  2. 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}
  3. Cloud SDK & Authentication: Ensure the Google Cloud CLI 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).
  4. IAM Permissions:
    • 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
      ).
    • Cancelling Requests (
      cancel
      )
      : Grant
      roles/compute.futureReservationAdmin
      (or
      roles/compute.admin
      ), which is required for
      compute.futureReservations.cancel
      .
  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
    .
  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, Available Regions and Zones, and Google Cloud Locations (strip
    .md.txt
    suffixes when presenting documentation URLs to human users) before submitting requests.

在查询 Calendar Mode 建议或提交 Future Reservation 请求之前,请确保环境满足以下要求:
  1. 项目与区域配置:优先在每条命令中直接传入
    --project={project_id}
    和
    --region={region}
    (或
    --zone={zone}
    ),以避免覆盖全局工作站状态;或者在设置默认值(例如
    us-central1
    )之前获得用户的明确确认:
    bash
    gcloud config set project {project_id}
    gcloud config set compute/region {region}
  2. 计费与 API 启用:确保项目已关联有效结算账号,并已启用 Compute Engine API:
    bash
    gcloud services enable compute.googleapis.com --project={project_id}
  3. Cloud SDK 与身份认证:确保已安装 Google Cloud CLI。未经明确批准,绝不可执行
    apt-get
    或
    curl | bash
    等主机安装命令;应引导用户查阅安装指南。随后通过
    gcloud auth login
    进行身份认证(适用于交互式 CLI),通过
    gcloud auth application-default login
    进行身份认证(适用于 SDK),或使用
    GOOGLE_APPLICATION_CREDENTIALS
    (适用于服务账号)。
  4. 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
      所必需的。
  5. 配额与组织策略:提交 Calendar-Mode 请求时,GPU 和 TPU 无需预留配额,但 H4D VM 在提交时需要充足的区域 CPU 配额;所有工作负载在
    start-time
    使用自动创建的预留时,都必须具有充足的 VM/TPU、启动磁盘和 IP 配额。若需跨项目共享,必须在组织策略
    constraints/compute.sharedReservationsOwnerProjects
    的允许列表中加入宿主项目。
  6. 计费与定价警告:获批的 Calendar-Mode Future Reservations 会在
    start-time
    自动预配容量,并且无论 VM 或 TPU 是否实际运行,都会针对整个承诺窗口计费。提交请求前,请查阅 Compute Engine 定价、可用区域和可用区 和 Google Cloud locations(向用户展示文档 URL 时,应去掉
    .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
undefined

For 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}]
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}]

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}]
undefined
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}]
undefined

2. Inspect Existing Future Reservations

2. 检查现有 Future Reservations

bash
undefined
bash
undefined

List planned future reservations

List planned future reservations

gcloud compute future-reservations list
--project={project_id}
[--zones={zone}]
gcloud compute future-reservations list
--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}
undefined
gcloud compute future-reservations describe {future_reservation_name}
--zone={zone}
--project={project_id}
undefined

3. Create a Calendar-Mode Future Reservation Request

3. 创建 Calendar-Mode Future Reservation 请求

[!IMPORTANT] 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
.
Once a feasible reservation window and zone are confirmed via
calendar-mode
, create and submit the request:
bash
undefined
[!IMPORTANT] 提交 Future Reservation 请求(
--planning-status=SUBMITTED
)后,一旦获批即会承诺产生容量费用。执行
gcloud compute future-reservations create
前,必须获得明确的人工批准。
通过
calendar-mode
确认可行的预留窗口和可用区后,即可创建并提交请求:
bash
undefined

For 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}]
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}]

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}]
undefined
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}]
undefined

4. 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;
cancel
requires
roles/compute.futureReservationAdmin
):
  • 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
    .
  • Deletion Preconditions (
    delete
    )
    :
    delete
    only succeeds once the request is
    CANCELLED
    or past
    end-time
    , and prompts interactively unless
    --quiet
    is passed.
bash
undefined
如需取消待处理或已提交的请求,或清理已取消或已完成的 Future Reservation,必须获得明确的人工批准;执行
cancel
需要
roles/compute.futureReservationAdmin
:
  • 取消截止时间(
    cancel
    )
    :已为
    APPROVED
    状态的 Calendar-Mode 请求,只有在
    start-time
    距离当前时间至少 30 天(
    720
    小时),或者在提交后 24 小时内且
    start-time
    距离当前时间至少 4 天(
    96
    小时)时,才能通过自助方式取消。
  • 删除前置条件(
    delete
    )
    :只有在请求已处于
    CANCELLED
    状态或已超过
    end-time
    后,
    delete
    才能成功;除非传入
    --quiet
    ,否则会触发交互式提示。
bash
undefined

Cancel 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}
gcloud compute future-reservations cancel {future_reservation_name}
--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}
undefined
gcloud compute future-reservations delete {future_reservation_name}
--zone={zone}
--project={project_id}
undefined

5. Consume the Auto-Created Reservation at
start-time

5. 在
start-time
使用自动创建的 Reservation

When
start-time
arrives, Compute Engine automatically provisions the targeted reservation
{reservation_name}
:
  • 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
    :
    bash
    gcloud 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
    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).

到达
start-time
时,Compute Engine 会自动预配目标预留
{reservation_name}
:
  • 对于 GPU/H4D VM:使用
    --provisioning-model=RESERVATION_BOUND
    、
    --maintenance-policy=TERMINATE
    、
    --instance-termination-action={STOP|DELETE}
    启动实例,配置私有网络(
    --no-address
    配合 IAP TCP forwarding),并使用自定义的最小权限
    --service-account
    :
    bash
    gcloud 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 使用
    gcloud compute instances create
    或 Compute Engine Managed Instance Group(
    gcloud compute instance-templates create
    +
    gcloud compute instance-groups managed create
    )使用自动创建的预留,并设置 TPU machine type(例如
    ct6e-standard-8t
    )、
    --reservation-affinity=specific
    、
    --reservation=projects/{project_id}/reservations/{reservation_name}
    、
    --provisioning-model=RESERVATION_BOUND
    和
    --maintenance-policy=TERMINATE
    (请参阅使用 TPU 预留)。

Key Parameters & Planning Dimensions

关键参数与规划维度

  • Calendar-Mode Query Flags:
    • --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
      ).
    • --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.
    • --location-policy={zone}={policy}
      : Optional per-zone inclusion/exclusion policy (
      ALLOW
      or
      DENY
      , e.g.,
      us-central1-a=ALLOW,us-central1-b=DENY
      ).
    • --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
      ).
    • --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.
  • Calendar-Mode Reservation Creation Flags:
    • --reservation-mode=CALENDAR
      : Required to create a Calendar-Mode future reservation.
    • --planning-status=SUBMITTED
      : Required to submit the Calendar-Mode request for GCP review immediately (self-service Calendar-Mode requests reject
      DRAFT
      status).
    • --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
      ).
    • --deployment-type=DENSE
      : Required when reserving GPU or H4D VMs to ensure tightly coupled placement.
    • --share-setting={share_type}
      : Optional for single-project (
      local
      ) reservations; required only when sharing across consumer projects (
      projects
      , specified via
      --share-with
      ).
    • --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
      ).
  • Lead Times & Hardware Limits (baseline self-service limits; verify current limits dynamically via
    gcloud compute advice calendar-mode
    or the official VM Calendar Mode and TPU Calendar Mode documentation as new hardware or limits roll out):
    • 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
      )
      :
      • 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.
      • 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.
    • Cloud TPUs:
      • Valid Chip Counts (
        --chip-count
        ) by TPU Version
        (check the official TPU Calendar Mode documentation or CLI validation feedback if newly released TPU versions or slice sizes are requested):
        • V6E
          :
          1, 4, 8, 16, 32, 64, 128, 256
          chips.
        • 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).
        • V5E
          (
          --workload-type
          required):
          SERVING
          supports
          1, 4, 8
          chips;
          BATCH
          supports
          16, 32, 64, 128, 256
          chips.
        • 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).
      • 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.

  • Calendar-Mode 查询标志:
    • --start-time-range=from={start_date},to={end_date}
      :必填,表示可接受的开始时间窗口,采用日期或 RFC 3339 格式(例如
      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}
      :
      advice calendar-mode
      支持的 TPU 版本(
      TPU7X
      仅在
      future-reservations create
      中受支持,不支持
      advice calendar-mode
      )。
    • --workload-type={BATCH|SERVING}
      :使用
      --tpu-version=V5E
      时必填,使用
      V6E
      和
      V5P
      时可选。
      BATCH
      针对高吞吐量批量 ML 训练进行优化;
      SERVING
      针对低延迟并发 ML 推理请求进行优化。对于 GPU 或 H4D VM,不要指定此参数。
  • Calendar-Mode 预留创建标志:
    • --reservation-mode=CALENDAR
      :创建 Calendar-Mode Future Reservation 时必填。
    • --planning-status=SUBMITTED
      :必填,用于立即提交 Calendar-Mode 请求以供 GCP 审核(自助 Calendar-Mode 请求会拒绝
      DRAFT
      状态)。
    • --require-specific-reservation
      和
      --reservation-name={reservation_name}
      :必填,用于命名并指定 Compute Engine 在
      start-time
      自动创建的预留(
      {reservation_name}
      的长度最多为 38 个字符,例如
      {future_reservation_name}-res
      )。
    • --deployment-type=DENSE
      :预留 GPU 或 H4D VM 时必填,用于确保紧密耦合放置。
    • --share-setting={share_type}
      :单项目(
      local
      )预留时可选;仅在跨消费项目共享时为必填(
      projects
      ,通过
      --share-with
      指定)。
    • --auto-delete-auto-created-reservations
      :Calendar Mode 中必填,用于在
      end-time
      自动删除自动创建的预留(在
      CALENDAR
      模式下使用
      --no-auto-delete-auto-created-reservations
      会返回
      CALENDAR_MODE_MISSING_AUTO_DELETE
      )。
  • 提前期与硬件限制(自助限制基线;随着新硬件或限制上线,请通过
    gcloud compute advice calendar-mode
    或官方 VM Calendar Mode 和 TPU Calendar Mode 文档动态验证当前限制):
    • GPU(
      a4-highgpu-8g
      、
      a3-ultragpu-8g
      、
      a3-megagpu-8g
      、
      a3-highgpu-8g
      、
      a3-edgegpu-8g
      )和 H4D VM(
      h4d-standard-192
      、
      h4d-highmem-192
      、
      h4d-highmem-192-lssd
      )
      :
      • 实例数量(
        --vm-count
        /
        --total-count
        )
        :GPU 支持
        1
        到
        80
        个 VM,H4D 支持
        1
        到
        256
        个 VM。注意:Calendar Mode 不支持
        a2-*
        、
        g2-*
        和
        a4x-*
        系列。
      • 最短提前期:最早开始时间必须比当前时间至少提前 87 小时(3 天 15 小时)。
      • 预订范围:最多可提前 60 天预订。
      • 持续时间:最短 24 小时,最长 90 天。
    • Cloud TPU:
      • 按 TPU 版本划分的有效芯片数量(
        --chip-count
        )
        (如果请求新发布的 TPU 版本或 slice 大小,请查阅官方 TPU Calendar Mode 文档 或参考 CLI 校验反馈):
        • V6E
          :
          1, 4, 8, 16, 32, 64, 128, 256
          个芯片。
        • V5P
          :
          4, 8, 16, 32, 64, 128, 256, 512, 1024
          个芯片(
          1
          个芯片无效;Calendar Mode 的自助请求每次最多允许
          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 天。

Output Interpretation & Decision Matrix

输出解读与决策矩阵

gcloud compute advice calendar-mode
returns a
recommendations
list containing
recommendationsPerSpec.spec
:
yaml
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-mode
会返回一个
recommendations
列表,其中包含
recommendationsPerSpec.spec
:
yaml
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

可行性状态

  1. FEASIBLE (Direct Match Available):
    • 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
      ).
    • 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
      ).
    • Action: Present the recommended window and copy-pasteable
      gcloud compute future-reservations create
      command, and ask for explicit human approval before creating the reservation.
  2. INFEASIBLE / CONSTRAINED (No
    startTime
    /
    location
    Returned)
    :
    • 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).
    • Mitigations:
      • 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
        ).
      • Flex Time Window: Widen
        --start-time-range=from=...,to=...
        to grant the scheduler a broader search window.
      • Shorten Duration: Reduce
        --duration-range
        by breaking massive training runs into smaller checkpointed phases.
      • Alternative Hardware Generations: Evaluate equivalent compute alternatives (e.g., comparing
        a3-highgpu-8g
        with
        a3-megagpu-8g
        or newer generation TPU slices).

  1. 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
      命令,并在创建预留前请求明确的人工批准。
  2. 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
        与
        a3-megagpu-8g
        ,或使用新一代 TPU slice。

Operational Guardrails

操作护栏

  • 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).
  • 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.
  • 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 (
    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.
  • 人工批准护栏与请求不可变性:未经用户明确批准,绝不可执行变更型命令(
    gcloud compute future-reservations create
    、
    cancel
    、
    delete
    或
    gcloud compute reservations update
    )。已提交的 Calendar-Mode Future Reservation 请求无法通过
    gcloud compute future-reservations update
    修改;只有在
    start-time
    之后,才能通过
    gcloud compute reservations update
    更新自动创建的预留,例如修改共享消费项目或 Vertex AI 访问权限。
  • Compute Engine MCP Server 护栏:Compute Engine MCP server 未暴露任何用于
    AdviceService
    (
    advice calendar-mode
    )或
    FutureReservationsService
    的工具,并且 MCP
    create_instance
    在使用自动创建的 Calendar-Mode 预留时无法设置
    provisioning_model: RESERVATION_BOUND
    。始终使用
    gcloud
    CLI。
  • 过去日期校验:如果用户请求的预留窗口或开始日期早于当前日期,不得生成推测性的 Future Reservation 查询或命令。应提出澄清问题,要求用户提供有效的未来开始日期和结束日期。
  • 反向护栏(无 Spot 容量遥测):规划未来 GPU/TPU 预留时,不得使用实时 Spot 容量建议(
    gcloud beta compute advice capacity --provisioning-model=SPOT
    ),也不得输出可获得性分数。未来容量规划需要基于 Calendar Mode 的可行性分析,而不是实时 Spot 抢占指标。