gcloud alpha compute disks create
DISK_NAME
[DISK_NAME
…] [--access-mode
=ACCESS_MODE
] [--architecture
=ARCHITECTURE
] [--confidential-compute
] [--csek-key-file
=FILE
] [--description
=DESCRIPTION
] [--erase-windows-vss-signature
] [--guest-os-features
=[GUEST_OS_FEATURE
,…]] [--interface
=INTERFACE
] [--labels
=[KEY
=VALUE
,…]] [--licenses
=[LICENSE
,…]] [--multi-writer
] [--physical-block-size
=PHYSICAL_BLOCK_SIZE
; default="4096"] [--primary-disk-project
=PRIMARY_DISK_PROJECT
] [--provisioned-iops
=PROVISIONED_IOPS
] [--provisioned-throughput
=PROVISIONED_THROUGHPUT
] [--replica-zones
=ZONE
,ZONE
] [--no-require-csek-key-create
] [--resource-policies
=[RESOURCE_POLICY
,…]] [--size
=SIZE
] [--storage-pool
=STORAGE_POOL
] [--type
=TYPE
] [--user-licenses
=[LICENSE
,…]] [--global-source-snapshot
| --source-snapshot-region
=SOURCE_SNAPSHOT_REGION
] [--image-family-scope
=IMAGE_FAMILY_SCOPE
--image-project
=IMAGE_PROJECT
--image
=IMAGE
| --image-family
=IMAGE_FAMILY
| --primary-disk
=PRIMARY_DISK
| --source-disk
=SOURCE_DISK
| --source-instant-snapshot
=SOURCE_INSTANT_SNAPSHOT
| --source-snapshot
=SOURCE_SNAPSHOT
] [--kms-key
=KMS_KEY
: --kms-keyring
=KMS_KEYRING
--kms-location
=KMS_LOCATION
--kms-project
=KMS_PROJECT
] [--primary-disk-region
=PRIMARY_DISK_REGION
| --primary-disk-zone
=PRIMARY_DISK_ZONE
] [--region
=REGION
| --zone
=ZONE
] [--source-disk-region
=SOURCE_DISK_REGION
| --source-disk-zone
=SOURCE_DISK_ZONE
] [GCLOUD_WIDE_FLAG …
]
(ALPHA)
gcloud alpha compute disks create
creates one or more Compute Engine persistent disks. When creating virtual machine instances, disks can be attached to the instances through the gcloud compute instances create
command. Disks can also be attached to instances that are already running using gcloud compute instances attach-disk
.
Disks are zonal resources, so they reside in a particular zone for their entire lifetime. The contents of a disk can be moved to a different zone by snapshotting the disk (using gcloud compute disks snapshot
) and creating a new disk using --source-snapshot
in the desired zone. The contents of a disk can also be moved across project or zone by creating an image (using gcloud compute images create
) and creating a new disk using --image
in the desired project and/or zone.
For a comprehensive guide, including details on minimum and maximum disk size, refer to: https://cloud.google.com/compute/docs/disks
--zone
option. To create disks 'my-disk-1' and 'my-disk-2' in zone us-east1-a:
gcloud alpha compute disks create my-disk-1 my-disk-2 --zone=us-east1-a
DISK_NAME
[DISK_NAME
…]
--access-mode
=ACCESS_MODE
ACCESS_MODE
must be one of: READ_ONLY_MANY
, READ_WRITE_MANY
, READ_WRITE_SINGLE
.
--architecture
=ARCHITECTURE
ARCHITECTURE
must be one of: ARM64
, X86_64
.
--confidential-compute
--csek-key-file
=FILE
If you pass -
as value of the flag, the CSEK is read from stdin. See https://cloud.google.com/compute/docs/disks/customer-supplied-encryption for more details.
--description
=DESCRIPTION
--erase-windows-vss-signature
--guest-os-features
=[GUEST_OS_FEATURE
,…]
GUEST_OS_FEATURE
must be one of: BARE_METAL_LINUX_COMPATIBLE
, GVNIC
, IDPF
, MULTI_IP_SUBNET
, SEV_CAPABLE
, SEV_LIVE_MIGRATABLE
, SEV_LIVE_MIGRATABLE_V2
, SEV_SNP_CAPABLE
, SNP_SVSM_CAPABLE
, TDX_CAPABLE
, UEFI_COMPATIBLE
, VIRTIO_SCSI_MULTIQUEUE
, WINDOWS
.
--interface
=INTERFACE
SCSI
and NVME
. The default is SCSI
.
--labels
=[KEY
=VALUE
,…]
Keys must start with a lowercase character and contain only hyphens (-
), underscores (_
), lowercase characters, and numbers. Values must contain only hyphens (-
), underscores (_
), lowercase characters, and numbers.
--licenses
=[LICENSE
,…]
--multi-writer
--physical-block-size
=PHYSICAL_BLOCK_SIZE
; default="4096"
PHYSICAL_BLOCK_SIZE
must be one of: 4096
, 16384
.
--primary-disk-project
=PRIMARY_DISK_PROJECT
--provisioned-iops
=PROVISIONED_IOPS
--provisioned-throughput
=PROVISIONED_THROUGHPUT
--replica-zones
=ZONE
,ZONE
--region
flag. See available zones with gcloud compute zones list
.
--require-csek-key-create
--no-require-csek-key-create
to disable.
--resource-policies
=[RESOURCE_POLICY
,…]
--size
=SIZE
GB
for gigabyte, or TB
for terabyte. If no size unit is specified, GB is assumed. For example, 10GB
will produce 10 gigabyte disks. Disk size must be a multiple of 1 GB. If disk size is not specified, the default size of 500GB for pd-standard disks, 100GB for pd-balanced disks, 100GB for pd-ssd disks, and 1000GB for pd-extreme will be used. For details about disk size limits, refer to: https://cloud.google.com/compute/docs/disks
--storage-pool
=STORAGE_POOL
--type
=TYPE
gcloud compute disk-types list
. The default disk type is pd-standard.
--user-licenses
=[LICENSE
,…]
--global-source-snapshot
--source-snapshot-region
=SOURCE_SNAPSHOT_REGION
compute/region
property value for this command invocation.
--image-family-scope
=IMAGE_FAMILY_SCOPE
--image-family
flag. By default, when specifying an image family in a public image project, the zonal image family scope is used. All other projects default to the global image. Use this flag to override this behavior. IMAGE_FAMILY_SCOPE
must be one of: zonal
, global
.
--image-project
=IMAGE_PROJECT
gcloud projects list
.
--image
=IMAGE
--size
to adjust the size of the disks.
This flag is mutually exclusive with
and --source-snapshot
.--image-family
--image-family
=IMAGE_FAMILY
--primary-disk
=PRIMARY_DISK
--source-disk
=SOURCE_DISK
gcloud compute disks list
. This flag is mutually exclusive with --image
and --source-snapshot
.
When using this option, the size of the disks must be at least as large as the source disk size. Use --size
to adjust the size of the disks.
The source disk must be in the same zone/region as the disk to be created.
--source-instant-snapshot
=SOURCE_INSTANT_SNAPSHOT
--source-snapshot
=SOURCE_SNAPSHOT
gcloud compute snapshots list
. A snapshot from an existing disk can be created using the gcloud compute disks snapshot
command. This flag is mutually exclusive with --image
.
When using this option, the size of the disks must be at least as large as the snapshot size. Use --size
to adjust the size of the disks.
--kms-key
=KMS_KEY
To set the kms-key
attribute:
--kms-key
on the command line.This flag argument must be specified if any of the other arguments in this group are specified.
--kms-keyring
=KMS_KEYRING
To set the kms-keyring
attribute:
--kms-key
on the command line with a fully specified name;--kms-keyring
on the command line.--kms-location
=KMS_LOCATION
To set the kms-location
attribute:
--kms-key
on the command line with a fully specified name;--kms-location
on the command line;--region
on the command line.--kms-project
=KMS_PROJECT
To set the kms-project
attribute:
--kms-key
on the command line with a fully specified name;--kms-project
on the command line;core/project
.--primary-disk-region
=PRIMARY_DISK_REGION
compute/region
property value for this command invocation.
--primary-disk-zone
=PRIMARY_DISK_ZONE
compute/zone
property value for this command invocation.
--region
=REGION
To avoid prompting when this flag is omitted, you can set the
property:compute/region
gcloud config set compute/region REGION
A list of regions can be fetched by running:
gcloud compute regions list
To unset the property, run:
gcloud config unset compute/region
Alternatively, the region can be stored in the environment variable
.CLOUDSDK_COMPUTE_REGION
--zone
=ZONE
compute/zone
property isn't set, you might be prompted to select a zone (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/zone
gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
gcloud compute zones list
To unset the property, run:
gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
--source-disk-region
=SOURCE_DISK_REGION
compute/region
property value for this command invocation.
--source-disk-zone
=SOURCE_DISK_ZONE
compute/zone
property value for this command invocation.
--access-token-file
, --account
, --billing-project
, --configuration
, --flags-file
, --flatten
, --format
, --help
, --impersonate-service-account
, --log-http
, --project
, --quiet
, --trace-token
, --user-output-enabled
, --verbosity
.
Run $ gcloud help
for details.
gcloud compute disks create
gcloud beta compute disks create
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