Stay organized with collections Save and categorize content based on your preferences.
You can create disks in a Hyperdisk Storage Pool and then attach the disk to a virtual machine (VM) instance, or you can create disks in the storage pool when creating a VM.
Before you beginSelect the tab for how you plan to use the samples on this page:
ConsoleWhen you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloudInstall the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.To use the Go samples on this page in a local development environment, install and initialize the gcloud CLI, and then set up Application Default Credentials with your user credentials.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
For more information, see Set up authentication for a local development environment.
JavaTo use the Java samples on this page in a local development environment, install and initialize the gcloud CLI, and then set up Application Default Credentials with your user credentials.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
For more information, see Set up authentication for a local development environment.
Node.jsTo use the Node.js samples on this page in a local development environment, install and initialize the gcloud CLI, and then set up Application Default Credentials with your user credentials.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
For more information, see Set up authentication for a local development environment.
RESTTo use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
To get the permissions that you need to create a Hyperdisk Balanced or Hyperdisk Throughput disk in a storage pool, ask your administrator to grant you the following IAM roles on the project:
roles/compute.instanceAdmin.v1
)roles/iam.serviceAccountUser
role)For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to create a Hyperdisk Balanced or Hyperdisk Throughput disk in a storage pool. To see the exact permissions that are required, expand the Required permissions section:
Required permissionsThe following permissions are required to create a Hyperdisk Balanced or Hyperdisk Throughput disk in a storage pool:
compute.disks.create
on the project compute.instances.attachDisk
on the VM compute.disks.use
on the volume that you want to attach to the VM compute.storagePools.use
on the storage pool you are creating disks in compute.instances.setMetadata
on the VMYou might also be able to get these permissions with custom roles or other predefined roles.
For the permissions needed to create an instance, see Required permissions.
LimitationsReview the following limitations for creating disks in a Hyperdisk Storage Pool:
Depending on the provisioning type for the Hyperdisk Storage Pool, you can choose how to provision both the capacity and the performance of each the disk that you create in the storage pool.
Provisioning disk capacityIf you create an Advanced capacity storage pool, you can use thin provisioning. You can create disks in the storage pool with a cumulative size that exceeds the provisioned capacity of the pool. The used capacity of the storage pool is defined by the total data in use and not by the amount of disk space that you've provisioned. You can provision disks with an aggregate capacity of up to 500% of the provisioned capacity of an Advanced capacity storage pool.
If you are creating disks in a Standard capacity storage pool, then you create disks in the storage pool until the total size of all disks in the storage pool reaches the storage pool's provisioned capacity. The disks in a storage pool with Standard capacity behave similarly to non-pool disks, where capacity is consumed when you create the disks.
Provisioning performanceIf you create an Advanced performance storage pool, you can use thin provisioning. You can create disks in the storage pool with a cumulative amount of IOPS and throughput that exceeds the provisioned performance of the pool. The used performance of the storage pool is defined by the total performance used by disks and not by the amount of performance provisioned to each disk. You can provision disks with an aggregate performance of up to 500% of the provisioned performance of an Advanced performance storage pool.
If you are creating disks in a Standard performance storage pool, the IOPS or throughput that you provision for a disk must be less than the available IOPS or throughput in the Hyperdisk Storage Pool. The available IOPS or throughput is the provisioned amount for the storage pool minus the used amount for all the disks created in the storage pool.
If any of the conditions in the previous paragraph are not true, then the request to create a disk in the storage pool fails and the disk is not created.
Example
Assume that you have a Hyperdisk Balanced Storage Pool with 100,000 provisioned IOPS.
With Standard performance provisioning:
Like disks created outside of a storage pool, Hyperdisk Balanced disks in Standard performance storage pools are automatically provisioned with up to 3,000 baseline IOPS and 140 MiB/s of baseline throughput. This baseline performance isn't counted against the provisioned performance for the storage pool. Only when you add disks to the storage pool with provisioned performance that's above the baseline does it count against the provisioned performance for the storage pool, for example:
With Advanced performance provisioning:
Disk1
) in the storage pool that has 5,000 IOPS, you don't consume any IOPS from the storage pool provisioned IOPS. However, the amount of IOPS that you can provision to new disks created in the storage pool is now 495,000.Disk1
starts to read and write data, and if it uses its maximum of 5,000 IOPS in a given minute, then 5,000 IOPS is consumed from the storage pool provisioned IOPS. Any other disks that you created in the same storage pool can use an aggregated maximum of 95,000 IOPS in that same minute without running into contention.You can use the Google Cloud console, Google Cloud CLI, or REST to create a disk in a storage pool.
ConsoleUsing the Google Cloud console, you can create a new disk in a storage pool either through the Storage pools page or the Disks page.
On the Storage pools page:
In the Google Cloud console, go to the Storage pools page.
Click the name of the storage pool that you would like to create a disk in.
On the Manage storage pool page, click +Create New Disk.
In the Add new disk panel, enter a Name for the disk.
Specify or change any values for which you don't want to use the default value.
When finished specifying the disk properties, click Save.
On the Manage storage pool page, you should see the new disk listed in the Storage pool disks section.
On the Create Disk page:
In the Google Cloud console, go to Disks > Create a disk page.
Enter a Name for the disk.
Select the zone that contains the storage pool you want to create the disk in.
For the Disk type, choose the disk type that matches the Hyperdisk Storage Pool, either Hyperdisk Throughput or Hyperdisk Balanced.
Modify the values in the Size, Provisioned IOPS, and Provisioned Throughput fields, as necessary.
In the Storage pool section, select Enable storage pool, then choose the name of the storage pool to create the disk in. Only storage pool that exist in the selected zone appear in the list.
When finished specifying the disk information, click Create.
To create one or more disks in a storage pool, use the gcloud compute disks create
command.
gcloud compute disks create DISK_NAME \ --zone=ZONE \ --storage-pool=STORAGE_POOL_NAME \ --size=SIZE \ --type=DISK_TYPE \ --provisioned-iops=PROVISIONED_IOPS \ --provisioned-throughput=PROVISIONED_THROUGHPUT
Replace the following:
us-central1-a
.hyperdisk-balanced
or hyperdisk-throughput
.To create one or more disks in a storage pool, construct a POST
using the disks.insert
method. Include the name
, sizeGb
, type
, storagePool
, provisionedIops
, and provisionedThroughput
properties. To create this disk as an empty and unformatted non-boot disk, don't specify a source image or a source snapshot.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/disks { "name": "DISK_NAME", "description": "DESCRIPTION", "type": "https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/diskTypes/DISK_TYPE", "sizeGb": "DISK_SIZE", "storagePool": "STORAGE_POOL_NAME", "provisionedIops": "IOPS_LIMIT", "provisionedThroughput": "THROUGHPUT_LIMIT", }
Replace the following:
us-central1-a
. This is the zone that the disk will be created in.hyperdisk-throughput
or hyperdisk-balanced
.Aftering creating the disk, you can attach the disk to a VM.
Create a VM that uses disks in the storage poolWhen creating a VM, you configure a boot disk, and you can optionally create additional data (non-boot) disks, which are automatically attached to the VM. The following sections explain how to create each type of disk in a storage pool as part of the VM creation process.
Create the boot disk for a VM in a storage poolTo create a VM that uses a boot disk in a storage pool, you must first create a Hyperdisk Balanced Storage Pool. You can then create a VM using a machine type that supports Hyperdisk Balanced disks. The machine type, disk type, and storage pool must all be available in the zone that you choose.
ConsoleIn the Google Cloud console, go to the VM Instances page.
Click Create Instance.
Enter a name for the instance.
Set the zone to the same zone where the storage pool is located.
Choose a machine type that supports Hyperdisk Balanced, for example H3.
In the Boot disk section, click Change.
In the Boot disk panel, set the Boot disk type to Hyperdisk Balanced.
Configure the properties for the disk.
Expand Show advanced configuration.
Under the heading Storage pool, select Enable storage pool.
Choose the storage pool to create the disk in from the list.
When finished with the disk configuration, click Select.
Finish configuring the VM properties.
Click Create.
The console creates the VM in the specified zone, and creates the boot disk in the selected storage pool.
You can create the boot disk for a new VM in the storage pool using the gcloud compute instances create
command and including the storage-pool
property for the boot disk.
gcloud compute instances create VM_NAME \ --zone=ZONE \ --machine-type=MACHINE_TYPE \ --create-disk=boot=yes,type=hyperdisk-balanced,size=DISK_SIZE,provisioned-throughput=THROUGHPUT, \ provisioned-iops=IOPS,image=projects/IMAGE_PROJECT/global/images/IMAGE, \ storage-pool=STORAGE_POOL_NAME
Replace the following:
us-central1-a
.m3-ultramem-32
.debian-12-bookworm-v20240213
.family/IMAGE_FAMILY
. This creates the instance from the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, Compute Engine creates a VM using the latest version of the OS image in the debian-12
image family. For more information about using image families, see Image families best practices.You can create the boot disk for a new VM in the storage pool by constructing a POST
request for the instances.insert
method and including the storagePool
property for the boot disk.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances { "name": "VM_NAME", "machineType": "zones/ZONE/machineTypes/MACHINE_TYPE", "disks": [ { "deviceName": "BOOT_DISK_DEVICE_NAME", "initializeParams": { "diskSizeGb": "DISK_SIZE", "diskType": "DISK_TYPE", "sourceImage": "projects/IMAGE_PROJECT/global/images/IMAGE" "boot": true, "provisionedIops": "IOPS_LIMIT", "provisionedThroughput": "THROUGHPUT_LIMIT", "storagePool": "POOL_URL" } } ] }
Replace the following:
us-central1-a
. This is the zone that VM and boot disk are created in.m3-ultramem-32
.debian-12-bookworm-v20240213
.family/IMAGE_FAMILY
. This creates the instance from the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, Compute Engine creates a VM using the latest version of the OS image in the debian-12
image family. For more information about using image families, see Image families best practices.https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
zones/ZONE/storagePools/STORAGE_POOL_NAME
When creating disks in a storage pool during VM creation, the machine type, disk type, and storage pool must be available in the zone that you choose.
ConsoleUse the following steps to use the console to create a new VM with additional, non-boot disks:
In the Google Cloud console, go to the VM Instances page.
Click Create Instance.
Enter a name for the VM.
Set the zone to the same zone where the storage pool is located.
Choose a machine type that supports disk type used by the storage pool.
Expand the Advanced options section.
Expand Disks.
Click add Add new disk.
In the Add new disk panel, enter the information for the disk. Set the Disk type to match the storage pool type.
In the Storage Pool section, select Enable storage pool.
In the Select a storage pool field, select the storage pool to create the disk in.
When finished with the disk configuration, click Save.
Finish configuring the VM properties.
Click Create.
The console creates the VM in the specified zone, and creates the non-boot disk in the selected storage pool.
You can create new disks in a storage pool during VM creation by using the gcloud compute instances create
command and including the storage-pool
property for the disk.
gcloud compute instances create VM_NAME \ --zone=ZONE \ --machine-type=MACHINE_TYPE \ --create-disk=auto-delete=yes,boot=yes,device-name=BOOT_DISK_DEVICE_NAME,image=IMAGE_NAME, \ size=BOOT_DISK_SIZE,type=BOOT_DISK_TYPE --create-disk=auto-delete=yes,boot=no,device-name=DATA_DISK_DEVICE_NAME,size=DATA_DISK_SIZE, \ type=DATA_DISK_TYPE,provisioned-iops=IOPS,provisioned-throughput=THROUGHPUT, \ storage_pool=STORAGE_POOL_NAME
Replace the following:
us-central1-a
debian-12-bookworm-v20240213
hyperdisk-balanced
or hyperdisk-throughput
You can create new disks in a storage pool during VM creation by constructing a POST
request for the instances.insert
method and including the storagePool
property for the additional disks.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances { "name": "VM_NAME", "machineType": "zones/ZONE/machineTypes/MACHINE_TYPE", "disks": [ { "initializeParams":{ "sourceImage":"projects/IMAGE_PROJECT/global/images/IMAGE" }, "boot":true }, { "deviceName": "DEVICE_NAME", "boot":false, "initializeParams": { "diskSizeGb": "DISK_SIZE", "diskType": "DISK_TYPE", "sourceImage": "projects/IMAGE_PROJECT/global/images/IMAGE" "provisionedIops": "IOPS_LIMIT", "provisionedThroughput": "THROUGHPUT_LIMIT", "storagePool": "POOL_URL" } } ] }
Replace the following:
us-central1-a
. This is the zone that VM and boot disk are created in.m3-ultramem-32
.debian-12-bookworm-v20240213
.family/IMAGE_FAMILY
. This creates the instance from the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, Compute Engine creates a VM using the latest version of the OS image in the debian-12
image family. For more information about using image families, see Image families best practices.https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
zones/ZONE/storagePools/STORAGE_POOL_NAME
The instance templates used to create managed instance groups (MIGs) can contain the storage pool information. The disks created using the instance template are placed in the specified storage pool.
ConsoleIn the Google Cloud console, go to the Instance templates page.
Click Create Instance Template.
Enter a name for the instance template.
Choose Regional for the location, and in the Region field, choose the region where the storage pool is located.
Choose a machine type that supports Hyperdisk Balanced, for example C3.
In the Boot disk section, click Change.
In the Boot disk panel, set the Boot disk type to Hyperdisk Balanced.
Configure the properties for the disk.
Expand Show advanced configuration.
Under the heading Storage pool, select Enable storage pool.
Choose the storage pool to create the disk in from the list.
When finished with the disk configuration, click Select.
Finish configuring the VM properties.
Click Create.
The template creates the VM in the specified zone, and creates the boot disk in the selected storage pool.
You can specify in an instance template that the book disk be created in a storage pool by using the gcloud compute instance-templates create
command and including the storage-pool
property for the boot disk.
gcloud compute instance-templates create TEMPLATE_NAME \ --instance-template-region=REGION \ --machine-type=MACHINE_TYPE \ --create-disk=boot=yes,type=hyperdisk-balanced,size=DISK_SIZE,provisioned-throughput=THROUGHPUT, \ provisioned-iops=IOPS,image=projects/IMAGE_PROJECT/global/images/IMAGE, \ storage-pool=STORAGE_POOL_NAME
Replace the following:
h3-standard-88
.debian-12-bookworm-v20240213
.family/IMAGE_FAMILY
. This creates the instance from the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, Compute Engine creates a VM using the latest version of the OS image in the debian-12
image family. For more information about using image families, see Image families best practices.You can create the boot disk for a new VM in the storage pool by constructing a POST
request for the instances.insert
method and including the storagePool
property for the boot disk.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/global/instanceTemplates { "name": "VM_NAME", "machineType": "zones/ZONE/machineTypes/MACHINE_TYPE", "disks": [ { "deviceName": "BOOT_DISK_DEVICE_NAME", "initializeParams": { "diskSizeGb": "DISK_SIZE", "diskType": "DISK_TYPE", "sourceImage": "projects/IMAGE_PROJECT/global/images/IMAGE" "boot": true, "provisionedIops": "IOPS_LIMIT", "provisionedThroughput": "THROUGHPUT_LIMIT", "storagePool": "POOL_URL" } } ] }
Replace the following:
us-central1-a
. This is the zone that VM and boot disk are created in.m3-ultramem-32
.debian-12-bookworm-v20240213
.family/IMAGE_FAMILY
. This creates the instance from the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, Compute Engine creates an instance using the latest version of the OS image in the debian-12
image family. For more information about using image families, see Image families best practices.https://www.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
projects/PROJECT_ID/zones/ZONE/storagePools/STORAGE_POOL_NAME
zones/ZONE/storagePools/STORAGE_POOL_NAME
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Disks can be created within a Hyperdisk Storage Pool and subsequently attached to a virtual machine (VM), or they can be created directly within the storage pool when a VM is being set up."],["When setting up authentication for accessing Google Cloud services and APIs, the gcloud CLI should be installed and initialized, and Application Default Credentials can be set up for local development environments using specific language examples such as Go, Java, or Node.js."],["To create Hyperdisk Balanced or Hyperdisk Throughput disks in a storage pool, users need specific IAM roles, including Compute Instance Admin (v1) and Service Account User, along with permissions like `compute.disks.create`, `compute.instances.attachDisk`, `compute.disks.use`, and `compute.storagePools.use`."],["Hyperdisk Storage Pools have limitations such as only allowing the creation of Hyperdisk Balanced disks in Hyperdisk Balanced Storage Pools and Hyperdisk Throughput disks in Hyperdisk Throughput Storage Pools, not supporting regional disks, and a maximum of 1,000 disks per pool."],["When provisioning capacity and performance, Advanced capacity and performance storage pools allow thin provisioning with up to 500% of provisioned capacity or performance, while Standard pools require capacity and performance to be within the pool's limits."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4