Create a customized boot disk
When you create a Compute Engine instance, you must also create a
boot disk for the instance. You can use a public image, a custom image, or
a snapshot that was taken from another boot disk. When you create a boot disk,
limit the disk size to 2 TiB to account for the limitations of
MBR partitioning.
Compute Engine automatically creates a boot disk when you
create an instance.
If you require additional data storage space for your instances, add one or
more secondary instance storage disks to the instance.
Use the procedures described in this document to create boot disks that you can
use later to create VMs. To improve the performance of a boot disk or to add
space for additional applications or operating system files, you can
resize the
Google Cloud Hyperdisk
boot disk.
As a best practice, don't use
regional disks
for boot disks. In a failover situation, they don't force-attach to a compute
instance.
Before you begin
Create a boot disk from an image
You can create a standalone boot disk outside of instance creation
and attach it to an instance afterwards.
Console
In the Trusted Cloud console, go to the Create a disk page.
Go to the Create a disk page
Under Disk source type, select Image. Choose an image from the
list.
Click Create.
gcloud
To create a standalone boot disk, use the
gcloud compute disks create
command:
gcloud compute disks create DISK_NAME --image IMAGE_NAME
REST
To create a new boot disk, make a POST
request to the
disks.insert
method:
POST https://compute.s3nsapis.fr/compute/v1/projects/PROJECT_NAME/zones/ZONE/disks?sourceImage=IMAGE
Replace IMAGE
with the URL-encoded, fully qualified URI of the source
image to apply to this boot disk.
The request body must contain a name for this new disk:
{
"name": "DISK_NAME"
}
If you created a boot disk that is larger than the image, you might want to
repartition the boot disk.
Create a boot disk from a snapshot
After you create a snapshot of a boot disk, you can use the snapshot to create
new boot disks.
You can only apply data from a snapshot when you first create a disk. You can't
apply a snapshot to an existing disk, or apply a snapshot to disks that
belong to a different project than the snapshot.
Console
In the Trusted Cloud console, go to the Create a disk page.
Go to the Create a disk page
Under Disk source type, select Snapshot.
Choose a snapshot from the list.
Finish setting the properties for your disk and click Create.
gcloud
To apply data from a disk snapshot, run the following command:
gcloud compute disks create DISK_NAME --source-snapshot SNAPSHOT_NAME
REST
To create a boot disk from a snapshot, make a POST
request to the
disks.insert
method:
POST https://compute.s3nsapis.fr/compute/v1/projects/PROJECT_NAME/zones/ZONE/disks
The request body must contain a name for this new disk and the
URL for the snapshot to use when creating the disk:
{
"name": "DISK_NAME",
"sourceSnapshot": "zones/ZONE/snapshots/SNAPSHOT_NAME"
}
What's next
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-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eWhen creating a Compute Engine instance, a boot disk is required, which can be sourced from a public image, custom image, or a snapshot of another boot disk.\u003c/p\u003e\n"],["\u003cp\u003eBoot disks should be limited to 2 TiB in size due to MBR partitioning limitations, and additional storage can be added via secondary instance storage disks.\u003c/p\u003e\n"],["\u003cp\u003eBoot disks can be created independently of instance creation and attached later, and they can be created from an image or a snapshot of an existing disk.\u003c/p\u003e\n"],["\u003cp\u003eYou can resize Persistent Disk or Google Cloud Hyperdisk boot disks to enhance performance or accommodate more applications and operating system files.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating virtual machines from images or disks using Google Cloud CLI or REST there is a limit of 20 instances per second, and users can request a higher quota for the \u003cstrong\u003eImages\u003c/strong\u003e resource if needed.\u003c/p\u003e\n"]]],[],null,["# Create a customized boot disk\n\n*** ** * ** ***\n\nWhen you create a Compute Engine instance, you must also create a\nboot disk for the instance. You can use a public image, a custom image, or\na snapshot that was taken from another boot disk. When you create a boot disk,\nlimit the disk size to 2 TiB to account for the limitations of\n[MBR](https://wikipedia.org/wiki/Master_boot_record) partitioning.\n\nCompute Engine automatically creates a boot disk when you\n[create an instance](/compute/docs/instances/create-start-instance).\nIf you require additional data storage space for your instances, add one or\nmore secondary [instance storage disks](/compute/docs/disks) to the instance.\n\nUse the procedures described in this document to create boot disks that you can\nuse later to create VMs. To improve the performance of a boot disk or to add\nspace for additional applications or operating system files, you can\nresize the\n[Persistent Disk](/compute/docs/disks/resize-persistent-disk) or\n[Google Cloud Hyperdisk](/compute/docs/disks/modify-hyperdisks#modify_hyperdisk)\nboot disk.\n\nAs a best practice, don't use\n[regional disks](/compute/docs/disks/regional-persistent-disk)\nfor boot disks. In a failover situation, they don't force-attach to a compute\ninstance.\n\nBefore you begin\n----------------\n\n- When you create virtual machines (VMs) from images or disks by using the Google Cloud CLI or REST, there's a limit of 20 VM instances per second. If you need to create a higher number of VMs per second, [request a higher quota limit](/compute/quotas#requesting_additional_quota) for the **Images** resource.\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n ### Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n ### gcloud\n\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n ### REST\n\n\n To use the REST API samples on this page in a local development environment, you use the\n credentials you provide to the gcloud CLI.\n 1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n ```bash\n gcloud init\n ```\n 2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n For more information, see\n [Authenticate for using REST](/docs/authentication/rest)\n in the Google Cloud authentication documentation.\n\nCreate a boot disk from an image\n--------------------------------\n\nYou can create a standalone boot disk outside of instance creation\nand attach it to an instance afterwards. \n\n### Console\n\n1. In the Google Cloud console, go to the **Create a disk** page.\n\n [Go to the Create a disk page](https://console.cloud.google.com/compute/disksAdd)\n2. Under **Disk source type** , select **Image**. Choose an image from the\n list.\n\n3. Click **Create**.\n\n### gcloud\n\nTo create a standalone boot disk, use the\n[`gcloud compute disks create`](/sdk/gcloud/reference/compute/disks/create)\ncommand: \n\n```\ngcloud compute disks create DISK_NAME --image IMAGE_NAME\n```\n\n### REST\n\nTo create a new boot disk, make a `POST` request to the\n[`disks.insert` method](/compute/docs/reference/rest/v1/disks/insert): \n\n```\nPOST https://compute.googleapis.com/compute/v1/projects/PROJECT_NAME/zones/ZONE/disks?sourceImage=IMAGE\n```\n\nReplace `IMAGE` with the URL-encoded, fully qualified URI of the source\nimage to apply to this boot disk.\n\nThe request body must contain a name for this new disk: \n\n```\n{\n \"name\": \"DISK_NAME\"\n}\n```\n\nIf you created a boot disk that is larger than the image, you might want to\n[repartition the boot disk](/compute/docs/disks/resize-persistent-disk#resize_partitions).\n\nCreate a boot disk from a snapshot\n----------------------------------\n\nAfter you create a snapshot of a boot disk, you can use the snapshot to create\nnew boot disks.\n\nYou can only apply data from a snapshot when you first create a disk. You can't\napply a snapshot to an existing disk, or apply a snapshot to disks that\nbelong to a different project than the snapshot. \n\n### Console\n\n1. In the Google Cloud console, go to the **Create a disk** page.\n\n [Go to the Create a disk page](https://console.cloud.google.com/compute/disksAdd)\n2. Under **Disk source type** , select **Snapshot**.\n\n3. Choose a snapshot from the list.\n\n4. Finish setting the properties for your disk and click **Create**.\n\n### gcloud\n\nTo apply data from a disk snapshot, run the following command: \n\n```\ngcloud compute disks create DISK_NAME --source-snapshot SNAPSHOT_NAME\n```\n\n### REST\n\nTo create a boot disk from a snapshot, make a `POST` request to the\n[`disks.insert` method](/compute/docs/reference/rest/v1/disks/insert): \n\n```\nPOST https://compute.googleapis.com/compute/v1/projects/PROJECT_NAME/zones/ZONE/disks\n```\n\nThe request body must contain a name for this new disk and the\nURL for the snapshot to use when creating the disk: \n\n```\n{\n \"name\": \"DISK_NAME\",\n \"sourceSnapshot\": \"zones/ZONE/snapshots/SNAPSHOT_NAME\"\n}\n```\n\nWhat's next\n-----------\n\n- The process for resizing a boot disk and a non-boot disk are the same. For more information, see the instructions in [Resize a Persistent Disk](/compute/docs/disks/resize-persistent-disk#resize_partitions) or [Change the size or provisioned performance of a Hyperdisk volume](/compute/docs/disks/modify-hyperdisks#modify_hyperdisk)."]]