本文档介绍了如何查看您为 HPC 集群(使用 H4D 虚拟机并具有增强的管理功能)提交的预留容量请求以及您为这些集群预留的容量。通过查看预留容量和请求的可用性、属性和拓扑,您可以为工作负载规划预留容量。
本文档的适用范围仅限于使用提及未来预留的容量选项的工作负载。如需详细了解具有 H4D 虚拟机和增强管理功能的高性能计算集群的容量选项,请参阅选择消费选项并获取容量。
在 Google Cloud 批准未来预留请求后,Compute Engine 会自动创建一个空预留,用于预留您请求的资源。然后,您可以查看预留,以便规划工作负载。 稍后,在请求的开始时间,Compute Engine 会将预留的虚拟机 (VM) 实例添加到预留中。然后,您可以通过创建与预留匹配的虚拟机来开始使用预留。
准备工作
预留容量:如果您的项目尚未预留容量,请使用以下选项之一为 H4D 实例预留容量:
-
如果您尚未设置身份验证,请进行设置。身份验证用于验证您的身份,以便访问 Google Cloud 服务和 API。如需从本地开发环境运行代码或示例,您可以通过选择以下选项之一向 Compute Engine 进行身份验证:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
安装 Google Cloud CLI。 安装完成后,运行以下命令来初始化 Google Cloud CLI:
gcloud init如果您使用的是外部身份提供方 (IdP),则必须先使用联合身份登录 gcloud CLI。
- Set a default region and zone.
REST
如需在本地开发环境中使用本页面上的 REST API 示例,请使用您提供给 gcloud CLI 的凭证。
安装 Google Cloud CLI。 安装完成后,运行以下命令来初始化 Google Cloud CLI:
gcloud init如果您使用的是外部身份提供方 (IdP),则必须先使用联合身份登录 gcloud CLI。
如需了解详情,请参阅 Google Cloud 身份验证文档中的使用 REST 时进行身份验证。
所需的角色
如需获得查看预留所需的权限,请让您的管理员为您授予项目的 Compute Future Reservation User (
roles/compute.futureReservationUser) IAM 角色。如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限。此预定义角色包含查看预留所需的权限。如需查看所需的确切权限,请展开所需权限部分:
所需权限
如需查看预留,您需要具备以下权限:
-
项目的
compute.futureReservations.get权限(查看未来预留请求的详细信息) -
项目的
compute.reservations.get权限(查看预留的详细信息)
限制
您只能在 Google 创建共享预留或共享未来预留请求的项目中查看相应预留或请求。
查看您的预留容量请求
如需查看未来预留请求,请使用以下一种或多种方法:
- 如需大致了解项目中的所有未来预留请求,请查看未来预留请求列表。
- 如需查看单个未来预留请求的完整详细信息,请查看未来预留请求的详细信息。
查看未来预留请求列表
您可以查看未来预留请求列表,了解请求的预留期、状态和可用区。
如需查看未来预留请求列表,请选择以下选项之一:
控制台
- 在 Google Cloud 控制台中,前往预留页面。
- 点击未来预留标签页。 表会列出每个未来预留请求,表中的每一列会描述一个属性。
- 可选:如需优化请求列表,请在 过滤条件字段中选择要用于过滤请求的属性。
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请求:- 如需查看所有可用区中的请求列表,请使用
futureReservations.aggregatedList方法 - 如需查看特定可用区中的请求列表,请使用
futureReservations.list方法
例如,如需查看所有可用区中的请求列表,请发出如下
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": "h4d-standard-192-lssd", "localSsds": [ { "diskSizeGb": "375", "interface": "NVME" }, ... ] }, "totalCount": "8" }, "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/us-central1-a/futureReservations/example-draft-request", "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/futureReservations/7979651787097007552", "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a", "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" }如果您想优化未来预留请求列表,请发出相同的请求,并在请求网址中添加
filterquery 参数。查看未来预留请求的详细信息
您可以查看未来预留请求的详细信息,以查看预留资源的属性和预留期。
如需查看未来预留请求的详细信息,请选择以下选项之一:
控制台
在 Google Cloud 控制台中,前往预留页面。
- 点击未来预留标签页。 表会列出每个未来预留请求,表中的每一列会描述一个属性。
- 如需查看某个请求的详细信息,请在名称列中点击相应请求的名称。系统会打开一个显示相应未来预留请求详细信息的页面。
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-bREST
如需查看未来预留请求的详细信息,请向
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": "h4d-standard-192" }, "totalCount": "8" }, "kind": "compute#futureReservation", "id": "7201773389437194422", "creationTimestamp": "2025-11-27T11:14:58.305-08:00", "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/futureReservations/example-draft-request", "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/futureReservations/7201773389437194422", "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a", "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": "GROUPED", "autoCreatedReservationsDeleteTime": "2026-02-10T19:20:00Z" }查看预留容量
如果您想执行以下一项或多项操作,请查看预留容量:
- 确定要用于部署工作负载的预留、块和子块。
- 了解预留容量的属性、使用情况和拓扑。
如需查看预留的容量,请使用以下一种或多种方法:
- 如需大致了解项目中的所有预留容量并检查是否有未使用的预留容量,请查看预留列表。
- 如需查看预留中所有预留虚拟机的属性和可用性,请查看预留的详细信息。
- 如需了解预留的容量块和子块是如何组织的,例如为了与调度器或规划工具集成,请查看预留的拓扑。
查看预留列表
您可以查看项目中的预留列表,了解项目中的所有预留容量,并搜索可用于部署工作负载的预留。
如需查看预留列表,请选择以下选项之一:
控制台
- 在 Google Cloud 控制台中,前往预留页面。
在按需预留标签页(默认)上,表会列出每个预留,表中的每一列会描述一个属性。
- 可选:如需优化预留列表,请在 过滤条件字段中选择要用于过滤预留的属性。
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请求:- 如需查看所有可用区中的预留列表,请使用
reservations.aggregatedList方法: - 如需查看单个可用区中的预留列表,请使用
reservations.list方法
例如,如需查看所有可用区中的预留列表,请发出如下
GET请求:GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/aggregated/reservations
将
PROJECT_ID替换为预留所在的项目的 ID。单个可用区中预留的列表的输出类似于以下内容:
{ "id": "projects/example-project/zones/europe-west4-b/futureReservations", "items": [ { "specificSkuProperties": { "instanceProperties": { "machineType": "h4d-highmem-192-lssd", "localSsds": [ { "diskSizeGb": "375", "interface": "NVME" } ] }, "totalCount": "8" }, "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-west4-b/futureReservations/example-draft-request", "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west4-b/futureReservations/7979651787097007552", "zone": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west4-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": "GROUPED", "autoCreatedReservationsDeleteTime": "2026-02-10T19:20:00Z" } ... ], "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/zones/europe-west4-b/futureReservations", "etag": "AnzKY34l-cvvV-JnniESJ0dtQvQ=/hvc4jaHpxFAZmOt1FVtKNgzZu-M=", "kind": "compute#futureReservationsListResponse" }如果您想优化预留列表,请发出相同的请求,并在请求网址中添加
filter查询参数。查看预留的详细信息
您可以查看项目中的预留详细信息,了解以下详细信息:
- 预留中包含的虚拟机类型。
- 预留中预留的虚拟机数量和可用的虚拟机数量。
如果您想了解预留的块和子块,请改为参阅查看预留的拓扑。
如需查看预留的详细信息,请选择以下选项之一:
控制台
在 Google Cloud 控制台中,前往预留页面。
- 在按需预留表格的名称列中,点击要查看其详细信息的预留的名称。系统会显示一个提供相应预留详细信息的页面。
gcloud
如需查看预留的详细信息,请使用
gcloud compute reservations describe命令。gcloud compute reservations describe RESERVATION_NAME \ --zone=ZONE替换以下内容:
RESERVATION_NAME:预留的名称。ZONE:预留所在的可用区。
输出类似于以下示例:
advancedDeploymentControl: reservationOperationalMode: HIGHLY_AVAILABLE_CAPACITY creationTimestamp: '2025-11-20T15:49:02.541-07:00' deleteAtTime: '2026-01-31T07:00:00Z' deploymentType: DENSE id: '5555834036379788721' kind: compute#reservation name: example-res1 reservationSharingPolicy: serviceShareType: DISALLOW_ALL resourceStatus: reservationBlockCount: 1 reservationMaintenance: schedulingType: GROUPED schedulingType: GROUPED selfLink: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/reservations/example-res1 shareSettings: shareType: LOCAL specificReservation: assuredCount: '8' count: '8' inUseCount: '0' instanceProperties: machineType: h4d-highmem-192 minCpuPlatform: Any CPU Platform specificReservationRequired: true status: READY zone: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a输出包含预留的以下字段:
name:预留的名称。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": "h4d-highmem-192-lssd", "minCpuPlatform": "Any CPU Platform", "localSsds": [ { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" }, { "diskSizeGb": "375", "interface": "NVME" } ] }, "count": "8", "inUseCount": "0", "assuredCount": "8" }, "kind": "compute#reservation", "id": "5555834036379788721", "creationTimestamp": "2025-11-20T15:49:02.541-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": "LOCAL" }, "resourceStatus": { "reservationMaintenance": { "schedulingType": "INDEPENDENT" }, "reservationBlockCount": 1 }, "reservationSharingPolicy": { "serviceShareType": "DISALLOW_ALL" }, "deploymentType": "DENSE", "advancedDeploymentControl": { "reservationOperationalMode": "HIGHLY_AVAILABLE_CAPACITY" }, "schedulingType": "INDEPENDENT", "deleteAtTime": "2026-01-31T07:00:00Z" }输出包含预留的以下字段:
instanceProperties:可部署预留的虚拟机的属性。inUseCount:已在预留中部署的虚拟机的数量。assuredCount:可使用相应预留部署的虚拟机总数。如果此值小于count,请参阅如何排查 可供使用的虚拟机数量减少的问题。name:预留的名称。
查看预留的拓扑
您可以查看预留的详细拓扑信息,以便决定在预留的块和子块中创建虚拟机的位置。如需了解已部署的预留虚拟机的放置情况,请参阅查看 H4D 集群拓扑。
如果您想查看有关预留的其他详细信息,请改为参阅查看预留详细信息。
查看预留的块
如需列出和描述预留中的可用块,请使用以下任一方法。 此任务可帮助您确定以下内容:
- 预留中包含哪些容量块。
- 每个块的可用容量。
- 部署在块中的所有虚拟机的名称、块和子块。(仅在使用 gcloud CLI 或 REST 查看特定块时可用。)
控制台
在 Google Cloud 控制台中,前往预留页面。
- 在按需预留表格的名称列中,点击要查看其详细信息的预留的名称。 系统会打开该预留的详情页面。
- 在资源拓扑部分,您可以查看有关预留块的信息。这些信息包括每个块的以下内容:
- 块 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' 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:可在相应块中部署的虚拟机总数。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 } }输出内容包含每个块的以下字段:
name:块的名称。count:可在相应块中部署的虚拟机总数。inUseCount:已部署在块中的虚拟机的数量。physicalTopology:块的物理位置,也会显示在查看 H4D 集群拓扑中,如下所示:cluster:集群的全局名称。block:块的组织专用 ID。instances:块中所有虚拟机的名称和物理位置的列表,如下所示。(仅当您包含?view=FULL查询参数时,此字段才会显示。)instanceId:实例的 ID。subBlock:相应实例所在子块的组织专用 ID。block:相应实例所在块的组织专用 ID。
reservationSubBlockCount:块中的子块数。reservationSubBlockInUseCount:已至少部署一个虚拟机的块中的子块数量。
查看预留的子块
如需列出并描述预留块中的可用子块,请使用 Google Cloud CLI 或 REST API。此任务可帮助您确定以下内容:
- 预留块中包含哪些容量子块。
- 每个子块中的可用容量。
gcloud
您可以使用以下命令查看预留中的子块:
- 如需查看预留块中的所有可用子块,请使用
gcloud compute reservations sub-blocks list命令:gcloud compute reservations sub-blocks list RESERVATION_NAME \ --zone=ZONE \ --block-name=BLOCK_NAME - 如需查看预留块中的特定子块,请使用
gcloud compute reservations sub-blocks describe命令:gcloud compute reservations sub-blocks describe RESERVATION_NAME \ --zone=ZONE \ --block-name=BLOCK_NAME \ --sub-block-name=SUB-BLOCK_NAME
替换以下内容:
RESERVATION_NAME:预留的名称。ZONE:预留所在的可用区。BLOCK_NAME:块的名称。SUB-BLOCK_NAME:子块的名称。
每个子块的输出类似于以下内容:
count: 18 creationTimestamp: '2025-07-18T14:50:01.652-07:00' 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:可在子块中部署的虚拟机总数。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" } } }输出内容包含每个子块的以下字段:
name:子块的名称。count:可在子块中部署的虚拟机总数。inUseCount:已在子块中部署的虚拟机的数量。physicalTopology:子块的物理位置,也会显示在 虚拟机拓扑中,如下所示:cluster:集群的全局名称。block:块的组织专用 ID。subblock:子块的组织专用 ID。
后续步骤
- 如需查看所有可用的使用选项,请参阅 HPC 集群创建概览。
- 批量创建使用 Cloud RDMA 的 HPC 优化实例
- 创建具有 H4D 实例的支持 RDMA 的 HPC Slurm 集群
- 为具有受预留约束的使用的 HPC 工作负载创建 MIG
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-12-10。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-12-10。"],[],[]] -