Stay organized with collections Save and categorize content based on your preferences.
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 Persistent Disk or 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 beginSelect the tab for how you plan to use the samples on this page:
You can create a standalone boot disk outside of instance creation and attach it to an instance afterwards.
ConsoleIn the Google Cloud console, go to the Create a disk page.
Under Disk source type, select Image. Choose an image from the list.
Click Create.
To create a standalone boot disk, use the gcloud compute disks create
command:
gcloud compute disks create DISK_NAME --image IMAGE_NAMEREST
To create a new boot disk, make a POST
request to the disks.insert
method:
POST https://compute.googleapis.com/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 snapshotAfter 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.
ConsoleIn the Google Cloud console, 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.
To apply data from a disk snapshot, run the following command:
gcloud compute disks create DISK_NAME --source-snapshot SNAPSHOT_NAMEREST
To create a boot disk from a snapshot, make a POST
request to the disks.insert
method:
POST https://compute.googleapis.com/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-07-02 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-07-02 UTC."],[[["When 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."],["Boot 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."],["Boot 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."],["You can resize Persistent Disk or Google Cloud Hyperdisk boot disks to enhance performance or accommodate more applications and operating system files."],["When 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 **Images** resource if needed."]]],[]]
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