查看預留容量

本文說明如何查看預留容量要求,以及 H4D VM 的 HPC 叢集預留容量,並瞭解如何使用進階管理功能。查看預留容量和要求的可用性、屬性和拓撲,即可為工作負載規劃預留容量。

本文件僅適用於使用容量選項的工作負載,且該選項提及未來預留。如要進一步瞭解 H4D VM 的 HPC 叢集容量選項和進階管理功能,請參閱「選擇用量選項並取得容量」。

Google Cloud 核准未來預留項目要求後,Compute Engine 會自動為您要求的資源建立 (自動建立) 空預留項目。接著,您就可以查看預訂項目,規劃工作負載。 稍後,在您要求的啟動時間,Compute Engine 會將預留的虛擬機器 (VM) 執行個體新增至預留項目。接著,您可以建立符合預留項目的 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

    1. 安裝 Google Cloud CLI。 完成後,執行下列指令來初始化 Google Cloud CLI:

      gcloud init

      若您採用的是外部識別資訊提供者 (IdP),請先使用聯合身分登入 gcloud CLI

    2. 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 角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和組織的存取權」。

這個預先定義的角色具備查看預訂所需的權限。如要查看確切的必要權限,請展開「Required permissions」(必要權限) 部分:

所需權限

如要查看預留項目,必須具備下列權限:

  • 如要查看未來預留項目要求的詳細資料,請在專案上按一下 compute.futureReservations.get
  • 如要查看預訂詳細資料: compute.reservations.get 專案的

您或許還可透過自訂角色或其他預先定義的角色取得這些權限。

限制

您只能在 Google 建立共用預留項目或共用未來預留項目要求的專案中查看。

查看預留容量要求

如要查看未來的預留項目要求,請使用下列一或多種方法:

查看未來預留項目要求清單

您可以查看未來預留項目要求清單,瞭解要求預留項目期間、狀態和區域。

如要查看未來預留項目要求清單,請選取下列其中一個選項:

控制台

  1. 前往 Google Cloud 控制台的「Reservations」(預留項目) 頁面。

    前往「Reservations」(預留項目) 頁面

  2. 點選「Future reservations」(未來預留項目) 分頁標籤。表格會列出每項預訂要求,每個表格欄位則說明一項屬性。
  3. 選用步驟:如要縮小要求清單範圍,請在 「Filter」(篩選器) 欄位中,選取要用來篩選要求的屬性。

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": "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"
}

如要縮小未來預留項目要求清單的範圍,請發出相同要求,並在要求網址中加入 filter query 參數

查看未來預留項目的詳細資料 要求

您可以查看未來預留項目要求的詳細資料,瞭解預留資源的屬性和預留期間。

如要查看未來預留項目要求的詳細資料,請選取下列其中一個選項:

控制台

  1. 前往 Google Cloud 控制台的「Reservations」(預留項目) 頁面。

    前往「Reservations」(預留項目) 頁面

  2. 點選「Future reservations」(未來預留項目) 分頁標籤。表格會列出每項預訂要求,每個表格欄位則說明一項屬性。
  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": "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"
}

查看預留容量

如要執行下列一或多項操作,請查看預留容量:

  • 找出要用於部署工作負載的預訂項目、區塊和子區塊。
  • 瞭解預留容量的屬性、用量和拓撲。

如要查看預留容量,請使用下列一或多種方法:

查看預訂清單

您可以查看專案中的保留項目清單,瞭解專案中的所有保留容量,並搜尋要用於部署工作負載的保留項目。

如要查看預訂清單,請選取下列其中一個選項:

控制台

  1. 前往 Google Cloud 控制台的「Reservations」(預留項目) 頁面。

    前往「Reservations」(預留項目) 頁面

    在「On-demand reservations」(隨需預留項目) 分頁 (預設),表格會列出每個預留項目,而每個表格欄位則說明一項屬性。

  2. 選用步驟:如要縮小預訂清單範圍,請在 「Filter」(篩選器) 欄位中,選取要用來篩選預訂的屬性。

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-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 查詢參數

查看預訂詳細資料

您可以查看專案中的預留項目詳細資料,瞭解下列詳細資訊:

  • 預留項目中的 VM 類型。
  • 預留項目中預留和可用的 VM 數量。

如要瞭解預留項目的區塊和子區塊,請改為參閱「查看預留項目的拓撲」。

如要查看預訂詳細資料,請選取下列其中一個選項:

控制台

  1. 前往 Google Cloud 控制台的「Reservations」(預留項目) 頁面。

    前往「Reservations」(預留項目) 頁面

  2. 在「隨選預訂」表格的「名稱」欄中,按一下要查看詳細資料的預訂名稱。系統會顯示預訂詳細資料頁面。

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:可使用預訂項目部署的 VM 總數。如果這個值小於 count,請參閱如何排解 可供使用的 VM 數量較少的問題。
  • inUseCount:已在預留項目中部署的 VM 數量。
  • instanceProperties:可部署預留項目的 VM 屬性。

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:可部署預留項目的 VM 屬性。
  • inUseCount:已在預留項目中部署的 VM 數量。
  • assuredCount:可使用預訂項目部署的 VM 總數。如果這個值小於 count,請參閱如何排解 可供使用的 VM 數量較少的問題。
  • name:預訂名稱。

查看預留項目的拓撲

您可以查看預留項目的詳細拓撲資訊,決定要在預留區塊和子區塊中建立 VM。如要瞭解已部署預留 VM 的位置,請參閱「查看 H4D 叢集拓撲」。

如要查看預訂的其他詳細資料,請參閱「查看預訂詳細資料」一文。

查看預留的區塊

如要列出並說明預訂中可用的區塊,請使用下列任一方法。 這項工作可協助您判斷下列事項:

  • 預留項目中的容量區塊。
  • 每個區塊的可用容量。
  • 部署在區塊中的所有 VM 名稱、區塊和子區塊。(僅在使用 gcloud CLI 或 REST 查看特定區塊時提供)。

控制台

  1. 前往 Google Cloud 控制台的「Reservations」(預留項目) 頁面。

    前往「Reservations」(預留項目) 頁面

  2. 在「隨選預訂」表格的「名稱」欄中,按一下要查看詳細資料的預訂名稱。預訂詳細資料頁面隨即開啟。
  3. 在「資源拓撲」部分,您可以查看預留區塊的相關資訊。這項資訊包括每個區塊的下列內容:
    • 區塊 ID:區塊名稱。
    • 數量:可在區塊中部署的 VM 總數。
    • 使用中:已在區塊中部署的 VM 數量。

gcloud

您可以使用下列指令查看預訂中的區塊:

  • 如要查看預留項目中的所有可用區塊,請使用 gcloud compute reservations blocks list 指令
    gcloud compute reservations blocks list RESERVATION_NAME \
        --zone=ZONE
    
  • 如要查看預留項目中的特定區塊,請使用 gcloud compute reservations blocks describe 指令。如要一併查看部署在區塊中的所有 VM 名稱和拓撲,請新增 --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:可在區塊中部署的 VM 總數。
  • inUseCount:已部署在區塊中的 VM 數量。
  • name:區塊的名稱。
  • physicalTopology:區塊的實體位置,也會顯示在 VM 拓撲中,如下所示:
    • block:區塊的機構專屬 ID。
    • cluster:叢集的全域名稱。
    • instances:區塊中所有 VM 的名稱和實體位置清單,如下所示。(只有在您加入 --full-view=BLOCK_VIEW_FULL 旗標時,系統才會顯示這個欄位)。
      • instanceId:執行個體的 ID。
      • subBlock:這個執行個體所在子區塊的機構專屬 ID。
      • block:這個執行個體所在區塊的機構專屬 ID。
  • reservationSubBlockCount:區塊中的子區塊數量。
  • reservationSubBlockInUseCount:區塊中的子區塊數量,且至少有一個已部署的 VM。

REST

您可以使用下列方法查看預訂中的限制:

  • 如要查看預訂中的所有可用區塊,請對 reservationBlocks.list 方法發出 GET 要求:
    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/reservations/RESERVATION_NAME/reservationBlocks
    
  • 如要查看預訂中的特定區塊,請對 reservationBlocks.get 方法發出 GET 要求。如要查看部署在區塊中的所有 VM 名稱和拓撲,請新增 ?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:可在區塊中部署的 VM 總數。
  • inUseCount:已部署在區塊中的 VM 數量。
  • physicalTopology:區塊的實體位置,也會顯示在 查看 H4D 叢集拓撲中, 如下所示:
    • cluster:叢集的全域名稱。
    • block:區塊的機構專屬 ID。
    • instances:區塊中所有 VM 的名稱和實體位置清單,如下所示。(只有在您加入 ?view=FULL 查詢參數時,系統才會顯示這個欄位)。
      • instanceId:執行個體的 ID。
      • subBlock:這個執行個體所在子區塊的機構專屬 ID。
      • block:這個執行個體所在區塊的機構專屬 ID。
  • reservationSubBlockCount:區塊中的子區塊數量。
  • reservationSubBlockInUseCount:區塊中的子區塊數量,且至少有一個已部署的 VM。

查看預留的子區塊

如要列出及說明預訂區塊中的可用子區塊,請使用 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'
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:可在子區塊中部署的 VM 總數。
  • inUseCount:已部署在子區塊中的 VM 數量。
  • name:子區塊的名稱。
  • physicalTopology:子區塊的實體位置,也會顯示在 VM 拓撲中,如下所示:
    • 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:可在子區塊中部署的 VM 總數。
  • inUseCount:已部署在子區塊中的 VM 數量。
  • physicalTopology:子區塊的實體位置,也會顯示在 VM 拓撲中,如下所示:
    • cluster:叢集的全域名稱。
    • block:區塊的機構專屬 ID。
    • subblock:子區塊的機構專屬 ID。

後續步驟