查看预留容量

本文档介绍了如何查看您为 AI Hypercomputer 提交的预留容量请求以及您预留的容量。通过查看预留容量和请求的可用性、属性和拓扑,您可以为工作负载规划预留容量。

本文档的适用范围仅限于使用提及未来预留的容量选项的工作负载。如需详细了解 AI Hypercomputer 的容量选项,请参阅容量概览

在 Google Cloud 批准未来预留请求后,Compute Engine 会自动创建一个空预留,用于预留您请求的资源。然后,您可以查看该预留来规划工作负载。 之后,在请求的开始时间,系统会执行以下操作:

  • Compute Engine 会将预留的 Compute Engine 实例添加到预留中。然后,您可以通过创建与预留匹配的计算实例来开始使用预留。
  • 您可以修改预留,以允许 Vertex AI 训练或预测作业使用该预留。如需相关说明,请参阅 修改预留的共享政策

限制

您只能在 Google 创建共享预留或共享未来预留请求的项目中查看相应预留或请求。

准备工作

  1. 预留容量:如果您的项目尚未预留容量,请使用以下任一选项为 AI Hypercomputer 预留容量:
  2. 选择标签页以了解您打算如何使用本页面上的示例:

    控制台

    当您使用 Google Cloud 控制台访问 Google Cloud 服务和 API 时,无需设置身份验证。

    gcloud

    安装 Google Cloud CLI,然后 使用联合身份登录 gcloud CLI。 登录后,运行以下命令来初始化 Google Cloud CLI:

    gcloud init

    REST

    如需在本地开发环境中使用本页面上的 REST API 示例,请使用您提供给 gcloud CLI 的凭证。

      安装 Google Cloud CLI,然后 使用联合身份登录 gcloud CLI

    如需了解详情,请参阅 Google Cloud 身份验证文档中的使用 REST 时进行身份验证

所需的角色

如需获得查看预留所需的权限,请让您的管理员为您授予项目的 Compute Future Reservation User (roles/compute.futureReservationUser) IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

此预定义角色包含查看预留所需的权限。如需查看所需的确切权限,请展开所需权限部分:

所需权限

如需查看预留,您需要具备以下权限:

  • 项目的 compute.futureReservations.get 权限(查看未来预留请求的详细信息)
  • 项目的 compute.reservations.get 权限(查看预留的详细信息)

您也可以使用自定义角色或其他预定义角色来获取这些权限。

查看您的预留容量请求

如需查看未来预留请求,请使用以下一种或多种方法:

查看未来预留请求列表

您可以查看未来预留请求列表,了解请求的预留期、状态和可用区。

如需查看未来预留请求列表,请选择以下选项之一:

控制台

  1. 在 Google Cloud 控制台中,前往预留页面。

    前往“预留”

  2. 点击未来预留标签页。 表会列出每个未来预留请求,表中的每一列会描述一个属性。
  3. 可选:如需优化请求列表,请在 过滤条件字段中选择要用于过滤请求的属性。

gcloud

如需查看未来预留请求列表,请使用 gcloud compute future-reservations list 命令

gcloud compute future-reservations list

输出类似于以下示例:

NAME: fr-01
TOTAL_COUNT: 100
START_TIME: 2026-07-20T07:00:00Z
END_TIME: 2026-08-05T07:00:00Z
PROCUREMENT_STATUS: FULFILLED
ZONE: us-west4-b

NAME: fr-02
TOTAL_COUNT: 10
START_TIME: 2026-07-20T07:00:00Z
END_TIME: 2026-12-01T00:00:00Z
PROCUREMENT_STATUS: PENDING_APPROVAL
ZONE: us-west4-b

如果您想优化未来预留请求列表,请使用同一命令并添加 --filter 标志

REST

如需查看未来预留请求列表,请向以下方法之一发出 GET 请求:

例如,如需查看所有可用区中的请求列表,请发出如下 GET 请求:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/aggregated/futureReservations

PROJECT_ID 替换为请求所在的项目的 ID。

单个可用区中未来预留请求的列表输出类似于以下内容:

{
  "id": "projects/example-project/aggregated/futureReservations",
  "items": [
    {
      "specificSkuProperties": {
        "instanceProperties": {
          "machineType": "a3-ultragpu-8g",
          "guestAccelerators": [
            {
              "acceleratorType": "nvidia-h200-141gb",
              "acceleratorCount": 8
            }
          ],
          "localSsds": [
            {
              "diskSizeGb": "375",
              "interface": "NVME"
            },
            ...
          ]
        },
        "totalCount": "2"
      },
      "kind": "compute#futureReservation",
      "id": "7979651787097007552",
      "creationTimestamp": "2025-11-27T11:14:58.305-08:00",
      "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/example-draft-request",
      "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/7979651787097007552",
      "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b",
      "name": "example-draft-request",
      "timeWindow": {
        "startTime": "2026-01-27T19:20:00Z",
        "endTime": "2026-02-10T19:20:00Z"
      },
      "status": {
        "procurementStatus": "DRAFTING",
        "lockTime": "2026-01-27T19:15:00Z"
      },
      "planningStatus": "DRAFT",
      "specificReservationRequired": true,
      "reservationName": "example-reservation",
      "deploymentType": "DENSE",
      "schedulingType": "INDEPENDENT",
      "autoCreatedReservationsDeleteTime": "2026-02-10T19:20:00Z"
    },
    ...
  ],
  "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/aggregated/futureReservations",
  "etag": "AnzKY34l-cvvV-JnniESJ0dtQvQ=/hvc4jaHpxFAZmOt1FVtKNgzZu-M=",
  "kind": "compute#futureReservationsListResponse"
}

如果您想优化未来预留请求列表,请发出相同的请求,并在请求网址中添加 filter 查询参数

查看未来预留请求的详细信息

您可以查看未来预留请求的详细信息,以查看预留资源的属性和预留期。

如需查看未来预留请求的详细信息,请选择以下选项之一:

控制台

  1. 在 Google Cloud 控制台中,前往预留页面。

    前往“预留”

  2. 点击未来预留标签页。 表会列出每个未来预留请求,表中的每一列会描述一个属性。
  3. 如需查看某个请求的详细信息,请在名称列中点击相应请求的名称。系统会打开一个显示相应未来预留请求详细信息的页面。

gcloud

如需查看未来预留请求的详细信息,请使用 gcloud compute future-reservations describe 命令

gcloud compute future-reservations describe FUTURE_RESERVATION_NAME \
    --zone=ZONE

替换以下内容:

  • FUTURE_RESERVATION_NAME:未来预留请求的名称。
  • ZONE:未来预留请求所在的可用区。

输出类似于以下示例:

autoCreatedReservationsDeleteTime: '2026-02-10T19:20:00Z'
creationTimestamp: '2025-11-27T11:14:58.305-08:00'
deploymentType: DENSE
id: '7979651787097007552'
kind: compute#futureReservation
name: example-draft-request
planningStatus: DRAFT
reservationName: example-reservation
schedulingType: INDEPENDENT
selfLink: https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/example-draft-request
selfLinkWithId: https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/7979651787097007552
specificReservationRequired: true
specificSkuProperties:
  instanceProperties:
    guestAccelerators:
    -   acceleratorCount: 8
      acceleratorType: nvidia-h200-141gb
    localSsds:
    -   diskSizeGb: '375'
      interface: NVME
    ...
  machineType: a3-ultragpu-8g
totalCount: '2'
status:
  autoCreatedReservations:
  -   https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/reservations/example-reservation
  fulfilledCount: '2'
  lockTime: '2026-01-27T19:15:00Z'
  procurementStatus: DRAFTING
timeWindow:
  endTime: '2026-02-10T19:20:00Z'
  startTime: '2026-01-27T19:20:00Z'
zone: https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b

REST

如需查看未来预留请求的详细信息,请向 futureReservations.get 方法发出 GET 请求:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/futureReservations/FUTURE_RESERVATION_NAME

替换以下内容:

  • PROJECT_ID:未来预留请求所在项目的 ID。
  • ZONE:未来预留请求所在的可用区。
  • FUTURE_RESERVATION_NAME:未来预留请求的名称。

输出类似于以下内容:

{
  "specificSkuProperties": {
    "instanceProperties": {
      "machineType": "a3-ultragpu-8g",
      "guestAccelerators": [
        {
          "acceleratorType": "nvidia-h200-141gb",
          "acceleratorCount": 8
        }
      ],
      "localSsds": [
        {
          "diskSizeGb": "375",
          "interface": "NVME"
        },
        ...
      ]
    },
    "totalCount": "2"
  },
  "kind": "compute#futureReservation",
  "id": "7979651787097007552",
  "creationTimestamp": "2025-11-27T11:14:58.305-08:00",
  "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/example-draft-request",
  "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/7979651787097007552",
  "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b",
  "name": "example-draft-request",
  "timeWindow": {
    "startTime": "2026-01-27T19:20:00Z",
    "endTime": "2026-02-10T19:20:00Z"
  },
  "status": {
    "procurementStatus": "DRAFTING",
    "lockTime": "2026-01-27T19:15:00Z"
  },
  "planningStatus": "DRAFT",
  "specificReservationRequired": true,
  "reservationName": "example-reservation",
  "deploymentType": "DENSE",
  "schedulingType": "INDEPENDENT",
  "autoCreatedReservationsDeleteTime": "2026-02-10T19:20:00Z"
}

查看预留容量

如果您想执行以下一项或多项操作,请查看预留的容量:

  • 确定要用于部署工作负载的预留、块和子块。
  • 了解预留容量的属性、使用情况和拓扑。

如需查看预留容量,请使用以下一种或多种方法:

  • 如需大致了解项目中的所有预留容量并检查是否存在未使用的预留容量,请查看预留列表
  • 如需查看预留中所有预留虚拟机的属性和可用性,请查看预留的详细信息
  • 如需了解预留的容量块和子块是如何组织的,例如为了与调度器或规划工具集成,请查看预留的拓扑

查看预留列表

您可以查看项目中的预留列表,了解项目中的所有预留容量,并搜索可用于部署工作负载的预留。

如需查看预留列表,请选择以下选项之一:

控制台

  1. 在 Google Cloud 控制台中,前往预留页面。

    前往“预留”

    按需预留标签页(默认)上,表会列出每个预留,表中的每一列会描述一个属性。

  2. 可选:如需优化预留列表,请在 过滤条件字段中选择要用于过滤预留的属性。

gcloud

如需查看预留列表,请使用 gcloud compute reservations list 命令

gcloud compute reservations list

输出类似于以下内容:

NAME: r-01
IN_USE_COUNT: 0
COUNT: 5
ZONE: europe-west4-b
SHARE_TYPE: LOCAL

NAME: r-02
IN_USE_COUNT: 3
COUNT: 10
ZONE: europe-west4-b
SHARE_TYPE: LOCAL

如果您想优化预留列表,请使用同一命令并附加 --filter 标志

REST

如需查看预留列表,请向以下方法之一发出 GET 请求:

例如,如需查看所有可用区中的预留列表,请发出如下 GET 请求:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/aggregated/reservations

PROJECT_ID 替换为预留所在的项目的 ID。

单个可用区中预留的列表的输出类似于以下内容:

{
  "id": "projects/example-project/zones/europe-west1-b/futureReservations",
  "items": [
    {
      "specificSkuProperties": {
        "instanceProperties": {
          "machineType": "a3-ultragpu-8g",
          "guestAccelerators": [
            {
              "acceleratorType": "nvidia-h200-141gb",
              "acceleratorCount": 8
            }
          ],
          "localSsds": [
            {
              "diskSizeGb": "375",
              "interface": "NVME"
            },
            ...
          ]
        },
        "totalCount": "2"
      },
      "kind": "compute#futureReservation",
      "id": "7979651787097007552",
      "creationTimestamp": "2025-11-27T11:14:58.305-08:00",
      "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/example-draft-request",
      "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations/7979651787097007552",
      "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b",
      "name": "example-draft-request",
      "timeWindow": {
        "startTime": "2026-01-27T19:20:00Z",
        "endTime": "2026-02-10T19:20:00Z"
      },
      "status": {
        "procurementStatus": "DRAFTING",
        "lockTime": "2026-01-27T19:15:00Z"
      },
      "planningStatus": "DRAFT",
      "specificReservationRequired": true,
      "reservationName": "example-reservation",
      "deploymentType": "DENSE",
      "schedulingType": "INDEPENDENT",
      "autoCreatedReservationsDeleteTime": "2026-02-10T19:20:00Z"
    }
    ...
  ],
  "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west1-b/futureReservations",
  "etag": "AnzKY34l-cvvV-JnniESJ0dtQvQ=/hvc4jaHpxFAZmOt1FVtKNgzZu-M=",
  "kind": "compute#futureReservationsListResponse"
}

如果您想优化预留列表,请发出相同的请求,并在请求网址中添加 filter 查询参数

查看预留的详细信息

您可以查看项目中的预留详细信息,了解以下详细信息:

  • 预留中包含的计算实例类型。
  • 预留中预留和可用的计算实例数量。
  • 预订的健康状况,包括健康块的数量。 (仅在使用 gcloud CLI 或 REST 时可用。)

如果您想了解预留的块和子块,请改为参阅查看预留的拓扑

如需查看预留的详细信息,请选择以下选项之一:

控制台

  1. 在 Google Cloud 控制台中,前往预留页面。

    前往“预留”

  2. 按需预留表格的名称列中,点击要查看其详细信息的预留的名称。系统会显示一个提供相应预留详细信息的页面。

gcloud

如需查看预留的详细信息,请使用 gcloud compute reservations describe 命令

gcloud compute reservations describe RESERVATION_NAME \
    --zone=ZONE

替换以下内容:

  • RESERVATION_NAME:预留的名称。
  • ZONE:预留所在的可用区。

输出类似于以下示例:

advancedDeploymentControl:
  reservationOperationalMode: ALL_CAPACITY
creationTimestamp: '2025-07-18T13:23:22.191-07:00'
deleteAtTime: '2026-06-19T00:00:00Z'
deploymentType: DENSE
enableEmergentMaintenance: false
id: '4298354039694234582'
kind: compute#reservation
name: example-res1
reservationSharingPolicy:
  serviceShareType: DISALLOW_ALL
resourceStatus:
  healthInfo:
    degradedBlockCount: 0
    healthStatus: HEALTHY
    healthyBlockCount: 1
  reservationBlockCount: 1
  reservationMaintenance:
    schedulingType: GROUPED
schedulingType: GROUPED
selfLink: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1
selfLinkWithId: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/4298354039694234582
shareSettings:
  shareType: LOCAL
specificReservation:
  assuredCount: '18'
  count: '18'
  inUseCount: '2'
  instanceProperties:
    guestAccelerators:
    -   acceleratorCount: 4
      acceleratorType: nvidia-gb200
    localSsds:
    -   diskSizeGb: '3000'
      interface: NVME
    -   diskSizeGb: '3000'
      interface: NVME
    -   diskSizeGb: '3000'
      interface: NVME
    -   diskSizeGb: '3000'
      interface: NVME
    machineType: a4x-highgpu-4g
specificReservationRequired: true
status: READY
zone: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a

输出包含预留的以下字段:

  • name:预留的名称。
  • healthInfo:预留的健康信息,如下所示:
    • degradedBlockCount:预留中降级的块数。
    • healthStatus:预留的总体健康状况。
    • healthyBlockCount:预留中的健康块数。
  • reservationBlockCount:预留中的块总数。
  • assuredCount:可使用预留部署的虚拟机总数。如果此值小于 count,请参阅如何排查 可供使用的虚拟机数量较少的问题。
  • inUseCount:已在预留中部署的虚拟机的数量。
  • instanceProperties:可部署预留的虚拟机的属性。

REST

如需查看预留的详细信息,请向 reservations.get 方法发出 GET 请求:

GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME

替换以下内容:

  • PROJECT_ID:预留所在项目的 ID。
  • ZONE:预留所在的可用区。
  • RESERVATION_NAME:预留的名称。

输出类似于以下内容:

{
  "specificReservation": {
    "instanceProperties": {
      "machineType": "a4x-highgpu-4g",
      "guestAccelerators": [
        {
          "acceleratorType": "nvidia-gb200",
          "acceleratorCount": 4
        }
      ],
      "localSsds": [
        {
          "diskSizeGb": "3000",
          "interface": "NVME"
        },
        {
          "diskSizeGb": "3000",
          "interface": "NVME"
        },
        {
          "diskSizeGb": "3000",
          "interface": "NVME"
        },
        {
          "diskSizeGb": "3000",
          "interface": "NVME"
        }
      ]
    },
    "count": "36",
    "inUseCount": "35",
    "assuredCount": "33"
  },
  "kind": "compute#reservation",
  "id": "6823689647457870910",
  "creationTimestamp": "2025-08-04T13:40:50.496-07:00",
  "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1",
  "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a",
  "name": "example-res1",
  "specificReservationRequired": true,
  "status": "READY",
  "shareSettings": {
    "shareType": "SPECIFIC_PROJECTS"
  },
  "resourceStatus": {
    "reservationMaintenance": {
      "upcomingGroupMaintenance": {
        "type": "SCHEDULED",
        "canReschedule": false,
        "maintenanceStatus": "ONGOING"
      },
      "maintenanceOngoingCount": 2,
      "maintenancePendingCount": 34,
      "schedulingType": "GROUPED",
      "subblockInfraMaintenanceOngoingCount": 0,
      "subblockInfraMaintenancePendingCount": 0,
      "instanceMaintenanceOngoingCount": 3,
      "instanceMaintenancePendingCount": 32
    },
    "reservationBlockCount": 1,
    "healthInfo": {
      "healthStatus": "DEGRADED",
      "healthyBlockCount": 0,
      "degradedBlockCount": 1
    }
  },
  "reservationSharingPolicy": {
    "serviceShareType": "DISALLOW_ALL"
  },
  "deploymentType": "DENSE",
  "advancedDeploymentControl": {
    "reservationOperationalMode": "ALL_CAPACITY"
  },
  "enableEmergentMaintenance": false,
  "schedulingType": "GROUPED",
  "deleteAtTime": "2025-10-01T00:00:00Z"
}

输出包含预留的以下字段:

  • instanceProperties:可在预留中部署的计算实例的属性。
  • inUseCount:已部署在预留中的计算实例数量。
  • assuredCount:可使用预留部署的计算实例总数。如果此值小于 count,请参阅如何排查 可供使用的虚拟机数量较少的问题。
  • name:预留的名称。
  • healthInfo:预留的健康信息,如下所示:
    • healthStatus:预留的总体健康状况。
    • healthyBlockCount:预留中的健康块数。
    • degradedBlockCount:预留中降级的块数。

查看预留的拓扑

您可以查看预留的详细拓扑信息,以便确定在预留的块和子块中创建计算实例的位置。如需了解已部署的预留计算实例的放置位置,请参阅查看计算实例的拓扑

如果您想查看有关预留的其他详细信息,请改为参阅查看预留详细信息

查看预留的块

如需列出和描述预留中的可用块,请使用以下任一方法。 此任务可帮助您确定以下内容:

  • 预留中包含哪些容量块。
  • 每个块中可用的容量。
  • 每个块的健康状况,包括健康子块的数量。(仅在使用 gcloud CLI 或 REST 时可用。)
  • 部署在块中的所有计算实例的名称、块和子块。(仅在使用 gcloud CLI 或 REST 查看特定块时可用。)

控制台

  1. 在 Google Cloud 控制台中,前往预留页面。

    前往“预留”

  2. 按需预留表格的名称列中,点击要查看其详细信息的预留的名称。系统会打开该预留的详情页面。
  3. 资源拓扑部分,您可以查看有关预留块的信息。此信息包括每个块的以下内容:
    • 块 ID:块的名称。
    • 数量:可在块中部署的计算实例总数。
    • 已使用:块中已部署的计算实例数量。

gcloud

您可以使用以下命令查看预留中的块:

  • 如需查看预留中的所有可用块,请使用 gcloud compute reservations blocks list 命令
    gcloud compute reservations blocks list RESERVATION_NAME \
        --zone=ZONE
    
  • 如需查看预留中的特定块,请使用 gcloud compute reservations blocks describe 命令。如需同时查看部署在该块中的所有计算实例的名称和拓扑,请添加 --full-view=BLOCK_VIEW_FULL 标志。
    gcloud compute reservations blocks describe RESERVATION_NAME \
        --zone=ZONE \
        --block-name=BLOCK_NAME \
        --full-view=BLOCK_VIEW_FULL
    

替换以下内容:

  • RESERVATION_NAME:预留的名称。
  • ZONE:预留所在的可用区。
  • BLOCK_NAME:块的名称。

每个块的输出类似于以下示例:

resource:
  count: 36
  creationTimestamp: '2025-08-04T15:15:07.074-07:00'
  healthInfo:
    degradedSubBlockCount: 2
    healthStatus: DEGRADED
    healthySubBlockCount: 0
  id: '4360924059555106309'
  inUseCount: 35
  kind: compute#reservationBlock
  name: example-res1-block-0001
  physicalTopology:
    block: 1acd074d42cd3be9e4486b524db2e9ab
    cluster: us-central1-cluster-dnkc
    instances:
    -   instanceId: '5815586279631866288'
      physicalHostTopology:
        host: c229b308380a83e0ca345d4a0de05aa7
        subBlock: c02af6bdaeccacef571e0adbe79e8c28
      projectId: 'PROJECT_NUMBER'
    ...
    -   instanceId: '8389759878923049076'
      physicalHostTopology:
        host: '3ac534f00c20e6e0c87c3aaff2705be6'
        subBlock: 'c081876ba0aa2857d608eb30a5b2fa40'
      projectId: 'PROJECT_NUMBER'
  reservationMaintenance:
    instanceMaintenanceOngoingCount: 3
    instanceMaintenancePendingCount: 32
    maintenanceOngoingCount: 2
    maintenancePendingCount: 34
    schedulingType: GROUPED
    subblockInfraMaintenanceOngoingCount: 0
    subblockInfraMaintenancePendingCount: 0
    upcomingGroupMaintenance:
      canReschedule: false
      maintenanceReasons:
      -   PLANNED_UPDATE
      maintenanceStatus: ONGOING
      type: SCHEDULED
      windowEndTime: '2025-09-08T17:00:00.000-07:00'
      windowStartTime: '2025-09-08T13:00:00.000-07:00'
  reservationSubBlockCount: 2
  reservationSubBlockInUseCount: 2
  selfLink: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001
  selfLinkWithId: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/4360924059555106309
  status: READY
  zone: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a

输出内容包含每个块的以下字段:

  • count:可在块中部署的计算实例总数。
  • healthInfo:块的健康信息,如下所示:
    • degradedSubBlockCount:相应块中降级的子块数量。
    • healthStatus:块的总体健康状况。
    • healthySubBlockCount:块中健康子块的数量。
  • inUseCount:已部署在块中的计算实例数量。
  • name:块的名称。
  • physicalTopology:块的物理位置,也会显示在 计算实例拓扑中,如下所示:
    • block:块的组织专用 ID。
    • cluster:集群的全局名称。
    • instances:块中所有计算实例的名称和物理位置的列表,如下所示。(只有在您添加 --full-view=BLOCK_VIEW_FULL 标志时,此字段才会显示。)
      • instanceId:实例的 ID。
      • subBlock:相应实例所在子块的组织专用 ID。
      • block:相应实例所在块的组织专用 ID。
  • reservationSubBlockCount:块中的子块数量。
  • reservationSubBlockInUseCount:已至少部署一个计算实例的块中的子块数量。

REST

您可以使用以下方法查看预留中的块:

  • 如需查看预留中的所有可用块,请向 reservationBlocks.list 方法发出 GET 请求:
    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME/reservationBlocks
    
  • 如需查看预留中的特定块,请向 reservationBlocks.get 方法发出 GET 请求。 如需同时查看部署在该块中的所有计算实例的名称和拓扑,请添加 ?view=FULL 查询参数。
    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME/reservationBlocks/BLOCK_NAME?view=FULL
    

替换以下内容:

  • PROJECT_ID:预留所在项目的 ID。
  • ZONE:预留所在的可用区。
  • RESERVATION_NAME:预留的名称。
  • BLOCK_NAME:块的名称。

每个块的输出类似于以下内容:

{
  "resource": {
    "kind": "compute#reservationBlock",
    "id": "4360924059555106309",
    "creationTimestamp": "2025-08-04T15:15:07.074-07:00",
    "name": "example-res1-block-0001",
    "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a",
    "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001",
    "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/4360924059555106309",
    "count": 36,
    "inUseCount": 35,
    "reservationMaintenance": {
      "upcomingGroupMaintenance": {
        "type": "SCHEDULED",
        "canReschedule": false,
        "windowStartTime": "2025-09-08T13:00:00.000-07:00",
        "windowEndTime": "2025-09-08T17:00:00.000-07:00",
        "maintenanceStatus": "ONGOING",
        "maintenanceReasons": [
          "PLANNED_UPDATE"
        ]
      },
      "maintenanceOngoingCount": 2,
      "maintenancePendingCount": 34,
      "schedulingType": "GROUPED",
      "subblockInfraMaintenanceOngoingCount": 0,
      "subblockInfraMaintenancePendingCount": 0,
      "instanceMaintenanceOngoingCount": 3,
      "instanceMaintenancePendingCount": 32
    },
    "status": "READY",
    "physicalTopology": {
      "cluster": "us-central1-cluster-dnkc",
      "block": "1acd074d42cd3be9e4486b524db2e9ab",
      "instances": [
        {
          "instanceId": "5815586279631866288",
          "projectId": "PROJECT_NUMBER",
          "physicalHostTopology": {
            "subBlock": "c02af6bdaeccacef571e0adbe79e8c28",
            "host": "c229b308380a83e0ca345d4a0de05aa7"
          }
        },
        ...
        {
          "instanceId": "8389759878923049076",
          "projectId": "PROJECT_NUMBER",
          "physicalHostTopology": {
            "subBlock": "c081876ba0aa2857d608eb30a5b2fa40",
            "host": "3ac534f00c20e6e0c87c3aaff2705be6"
          }
        }
      ]
    },
    "reservationSubBlockCount": 2,
    "reservationSubBlockInUseCount": 2,
    "healthInfo": {
      "healthStatus": "DEGRADED",
      "healthySubBlockCount": 0,
      "degradedSubBlockCount": 2
    }
  }
}

输出内容包含每个块的以下字段:

  • name:块的名称。
  • count:可在块中部署的计算实例总数。
  • inUseCount:已在块中部署的计算实例的数量。
  • physicalTopology:块的物理位置,也会显示在 计算实例拓扑中,如下所示:
    • cluster:集群的全局名称。
    • block:块的组织专用 ID。
    • instances:块中所有计算实例的名称和物理位置的列表,如下所示。(仅当您添加 ?view=FULL 查询参数时,才会显示此字段。)
      • instanceId:实例的 ID。
      • subBlock:相应计算实例所在的子块的组织专用 ID。
      • block:相应计算实例所在块的组织专用 ID。
  • reservationSubBlockCount:块中的子块数量。
  • reservationSubBlockInUseCount:已至少部署一个计算实例的块中的子块数量。
  • healthInfo:块的健康信息,如下所示:
    • healthStatus:块的总体健康状况。
    • healthySubBlockCount:块中正常子块的数量。
    • degradedSubBlockCount:相应块中降级的子块数量。

查看预留的子块

如需列出并描述预留块中的可用子块,请使用 Google Cloud CLI 或 REST API。此任务可帮助您确定以下内容:

  • 预留块中包含哪些容量子块。
  • 每个子块中的可用容量。
  • 每个子块的健康状况,包括健康的主机数量和健康的加速器互连数量。

gcloud

您可以使用以下命令查看预留中的子块:

替换以下内容:

  • RESERVATION_NAME:预留的名称。
  • ZONE:预留所在的可用区。
  • BLOCK_NAME:块的名称。
  • SUB-BLOCK_NAME:子块的名称。

每个子块的输出类似于以下内容:

count: 18
creationTimestamp: '2025-07-18T14:50:01.652-07:00'
healthInfo:
  degradedHostCount: 0
  degradedInfraCount: 0
  healthStatus: HEALTHY
  healthyHostCount: 18
  healthyInfraCount: 1
id: '6848013619223297894'
inUseCount: 2
kind: compute#reservationSubBlock
name: example-res1-block-0001-subblock-0001
physicalTopology:
  block: 2b6aa63faa2b60b7ecd3b87ec337f270
  cluster: us-central1-cluster-xvhj
  subBlock: 556a310b49a0b247bc109cc7f997cea2
reservationSubBlockMaintenance:
  schedulingType: GROUPED
selfLink: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001/reservationSubBlocks/example-res1-block-0001-subblock-0001
selfLinkWithId: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001/reservationSubBlocks/6848013619223297894
status: READY
zone: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a

输出内容包含每个子块的以下字段:

  • count:可在子块中部署的计算实例总数。
  • healthInfo:子块的健康信息,如下所示:
    • degradedHostCount:子块中降级的主机数量。
    • degradedInfraCount:子块中降级的加速器互连的数量。
    • healthStatus:子块的总体健康状况。
    • healthyHostCount:子块中健康的主机数量。
    • healthyInfraCount:子块中正常运行的加速器互连的数量。
  • inUseCount:已在子块中部署的计算实例数量。
  • name:子块的名称。
  • physicalTopology:子块的物理位置,也会显示在 计算实例拓扑中,如下所示:
    • block:块的组织专用 ID。
    • cluster:集群的全局名称。
    • subblock:子块的组织专用 ID。

REST

您可以使用以下方法查看预留中的子块:

  • 如需查看预留块中的所有可用子块,请向 reservationSubBlocks.list 方法发出 GET 请求:
    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME/reservationBlocks/BLOCK_NAME/reservationSubBlocks
    
  • 如需查看预留块中的特定子块,请向 reservationSubBlocks.get 方法发出 GET 请求:
    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME/reservationBlocks/BLOCK_NAME/reservationSubBlocks/SUB-BLOCK_NAME
    

替换以下内容:

  • PROJECT_ID:预留所在项目的 ID。
  • ZONE:预留所在的可用区。
  • RESERVATION_NAME:预留的名称。
  • BLOCK_NAME:块的名称。
  • SUB-BLOCK_NAME:子块的名称。

每个子块的输出类似于以下内容:

{
  "resource": {
    "kind": "compute#reservationSubBlock",
    "id": "5679680646666817028",
    "creationTimestamp": "2025-08-04T15:15:07.625-07:00",
    "name": "example-res1-block-0001-subblock-0001",
    "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a",
    "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001/reservationSubBlocks/example-res1-block-0001-subblock-0001",
    "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1/reservationBlocks/example-res1-block-0001/reservationSubBlocks/5679680646666817028",
    "count": 18,
    "inUseCount": 18,
    "reservationSubBlockMaintenance": {
      "upcomingGroupMaintenance": {
        "type": "SCHEDULED",
        "canReschedule": false,
        "windowStartTime": "2025-09-08T13:00:00.000-07:00",
        "windowEndTime": "2025-09-08T17:00:00.000-07:00",
        "maintenanceStatus": "ONGOING",
        "maintenanceReasons": [
          "PLANNED_UPDATE"
        ]
      },
      "maintenanceOngoingCount": 2,
      "maintenancePendingCount": 16,
      "schedulingType": "GROUPED",
      "subblockInfraMaintenanceOngoingCount": 0,
      "subblockInfraMaintenancePendingCount": 0,
      "instanceMaintenanceOngoingCount": 3,
      "instanceMaintenancePendingCount": 15
    },
    "status": "READY",
    "physicalTopology": {
      "cluster": "us-central1-cluster-dnkc",
      "block": "1acd074d42cd3be9e4486b524db2e9ab",
      "subBlock": "c081876ba0aa2857d608eb30a5b2fa40"
    },
    "healthInfo": {
      "healthStatus": "DEGRADED",
      "healthyHostCount": 16,
      "degradedHostCount": 2,
      "healthyInfraCount": 1,
      "degradedInfraCount": 0
    }
  }
}

输出内容包含每个子块的以下字段:

  • name:子块的名称。
  • count:可在子块中部署的计算实例总数。
  • inUseCount:已在子块中部署的计算实例数量。
  • physicalTopology:子块的物理位置,也会显示在 计算实例拓扑中,如下所示:
    • cluster:集群的全局名称。
    • block:块的组织专用 ID。
    • subblock:子块的组织专用 ID。
  • healthInfo:子块的健康信息,如下所示:
    • healthStatus:子块的总体健康状况。
    • healthyHostCount:子块中运行正常的宿主机器数量。
    • degradedHostCount:子块中降级的主机数量。
    • healthyInfraCount:子块中正常运行的加速器互连数量。
    • degradedInfraCount:子块中降级的加速器互连的数量。

后续步骤