File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_compute_disks_create.1
.TH "GCLOUD_BETA_COMPUTE_DISKS_CREATE" 1
.SH "NAME"
.HP
gcloud beta compute disks create \- create Compute Engine persistent disks
.SH "SYNOPSIS"
.HP
\f5gcloud beta compute disks create\fR \fIDISK_NAME\fR [\fIDISK_NAME\fR\ ...] [\fB\-\-access\-mode\fR=\fIACCESS_MODE\fR] [\fB\-\-architecture\fR=\fIARCHITECTURE\fR] [\fB\-\-confidential\-compute\fR] [\fB\-\-csek\-key\-file\fR=\fIFILE\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-erase\-windows\-vss\-signature\fR] [\fB\-\-guest\-os\-features\fR=[\fIGUEST_OS_FEATURE\fR,...]] [\fB\-\-interface\fR=\fIINTERFACE\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-licenses\fR=[\fILICENSE\fR,...]] [\fB\-\-multi\-writer\fR] [\fB\-\-physical\-block\-size\fR=\fIPHYSICAL_BLOCK_SIZE\fR;\ default="4096"] [\fB\-\-primary\-disk\-project\fR=\fIPRIMARY_DISK_PROJECT\fR] [\fB\-\-provisioned\-iops\fR=\fIPROVISIONED_IOPS\fR] [\fB\-\-provisioned\-throughput\fR=\fIPROVISIONED_THROUGHPUT\fR] [\fB\-\-replica\-zones\fR=\fIZONE\fR,\fIZONE\fR] [\fB\-\-no\-require\-csek\-key\-create\fR] [\fB\-\-resource\-policies\fR=[\fIRESOURCE_POLICY\fR,...]] [\fB\-\-size\fR=\fISIZE\fR] [\fB\-\-storage\-pool\fR=\fISTORAGE_POOL\fR] [\fB\-\-type\fR=\fITYPE\fR] [\fB\-\-global\-source\-snapshot\fR\ |\ \fB\-\-source\-snapshot\-region\fR=\fISOURCE_SNAPSHOT_REGION\fR] [\fB\-\-image\-family\-scope\fR=\fIIMAGE_FAMILY_SCOPE\fR\ \fB\-\-image\-project\fR=\fIIMAGE_PROJECT\fR\ \fB\-\-image\fR=\fIIMAGE\fR\ |\ \fB\-\-image\-family\fR=\fIIMAGE_FAMILY\fR\ |\ \fB\-\-primary\-disk\fR=\fIPRIMARY_DISK\fR\ |\ \fB\-\-source\-disk\fR=\fISOURCE_DISK\fR\ |\ \fB\-\-source\-instant\-snapshot\fR=\fISOURCE_INSTANT_SNAPSHOT\fR\ |\ \fB\-\-source\-snapshot\fR=\fISOURCE_SNAPSHOT\fR] [\fB\-\-kms\-key\fR=\fIKMS_KEY\fR\ :\ \fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR\ \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR\ \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR] [\fB\-\-primary\-disk\-region\fR=\fIPRIMARY_DISK_REGION\fR\ |\ \fB\-\-primary\-disk\-zone\fR=\fIPRIMARY_DISK_ZONE\fR] [\fB\-\-region\fR=\fIREGION\fR\ |\ \fB\-\-zone\fR=\fIZONE\fR] [\fB\-\-source\-disk\-region\fR=\fISOURCE_DISK_REGION\fR\ |\ \fB\-\-source\-disk\-zone\fR=\fISOURCE_DISK_ZONE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(BETA)\fR \fBgcloud beta compute disks create\fR creates one or more Compute
Engine persistent disks. When creating virtual machine instances, disks can be
attached to the instances through the \f5gcloud compute instances create\fR
command. Disks can also be attached to instances that are already running using
\f5gcloud compute instances attach\-disk\fR.
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 \f5gcloud compute disks snapshot\fR) and creating a
new disk using \f5\-\-source\-snapshot\fR in the desired zone. The contents of a
disk can also be moved across project or zone by creating an image (using
\f5gcloud compute images create\fR) and creating a new disk using
\f5\-\-image\fR 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
.SH "EXAMPLES"
When creating disks, be sure to include the \f5\-\-zone\fR option. To create
disks 'my\-disk\-1' and 'my\-disk\-2' in zone us\-east1\-a:
.RS 2m
$ gcloud beta compute disks create my\-disk\-1 my\-disk\-2 \e
\-\-zone=us\-east1\-a
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
\fIDISK_NAME\fR [\fIDISK_NAME\fR ...]
Names of the disks to create. For details on the naming convention for this
resource, refer to: https://cloud.google.com/compute/docs/naming\-resources
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-access\-mode\fR=\fIACCESS_MODE\fR
Specifies how VMs attached to the disk can access the data on the disk. To grant
read\-only access to multiple VMs attached to the disk, set access\-mode to
READ_ONLY_MANY. To grant read\-write access to only one VM attached to the disk,
use READ_WRITE_SINGLE. READ_WRITE_SINGLE is used if omitted. \fIACCESS_MODE\fR
must be one of: \fBREAD_ONLY_MANY\fR, \fBREAD_WRITE_MANY\fR,
\fBREAD_WRITE_SINGLE\fR.
.TP 2m
\fB\-\-architecture\fR=\fIARCHITECTURE\fR
Specifies the architecture or processor type that this disk can support. For
available processor types on Compute Engine, see
https://cloud.google.com/compute/docs/cpu\-platforms. \fIARCHITECTURE\fR must be
one of: \fBARM64\fR, \fBX86_64\fR.
.TP 2m
\fB\-\-confidential\-compute\fR
Creates the disk with confidential compute mode enabled. Encryption with a Cloud
KMS key is required to enable this option.
.TP 2m
\fB\-\-csek\-key\-file\fR=\fIFILE\fR
Path to a Customer\-Supplied Encryption Key (CSEK) key file that maps Compute
Engine resources to user managed keys to be used when creating, mounting, or
taking snapshots of disks.
If you pass \f5\-\fR 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.
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
An optional, textual description for the disks being created.
.TP 2m
\fB\-\-erase\-windows\-vss\-signature\fR
Specifies whether the disk restored from a source snapshot should erase Windows
specific VSS signature. See
https://cloud.google.com/sdk/gcloud/reference/compute/disks/snapshot#\-\-guest\-flush
.TP 2m
\fB\-\-guest\-os\-features\fR=[\fIGUEST_OS_FEATURE\fR,...]
Enables one or more features for VM instances that use the image for their boot
disks. See the descriptions of supported features at:
https://cloud.google.com/compute/docs/images/create\-delete\-deprecate\-private\-images#guest\-os\-features.
\fIGUEST_OS_FEATURE\fR must be one of: \fBBARE_METAL_LINUX_COMPATIBLE\fR,
\fBGVNIC\fR, \fBIDPF\fR, \fBMULTI_IP_SUBNET\fR, \fBSEV_CAPABLE\fR,
\fBSEV_LIVE_MIGRATABLE\fR, \fBSEV_LIVE_MIGRATABLE_V2\fR, \fBSEV_SNP_CAPABLE\fR,
\fBSNP_SVSM_CAPABLE\fR, \fBTDX_CAPABLE\fR, \fBUEFI_COMPATIBLE\fR,
\fBVIRTIO_SCSI_MULTIQUEUE\fR, \fBWINDOWS\fR.
.TP 2m
\fB\-\-interface\fR=\fIINTERFACE\fR
Specifies the disk interface to use for attaching this disk. Valid values are
\f5SCSI\fR and \f5NVME\fR. The default is \f5SCSI\fR.
.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.
.TP 2m
\fB\-\-licenses\fR=[\fILICENSE\fR,...]
A list of URIs to license resources. The provided licenses will be added onto
the created disks to indicate the licensing and billing policies.
.TP 2m
\fB\-\-multi\-writer\fR
Create the disk in multi\-writer mode so that it can be attached with
read\-write access to two VMs. The multi\-writer feature requires specialized
filesystems, among other restrictions. For more information, see
https://cloud.google.com/compute/docs/disks/sharing\-disks\-between\-vms.
.TP 2m
\fB\-\-physical\-block\-size\fR=\fIPHYSICAL_BLOCK_SIZE\fR; default="4096"
Physical block size of the persistent disk in bytes. Valid values are
4096(default) and 16384. \fIPHYSICAL_BLOCK_SIZE\fR must be one of: \fB4096\fR,
\fB16384\fR.
.TP 2m
\fB\-\-primary\-disk\-project\fR=\fIPRIMARY_DISK_PROJECT\fR
Project of the primary disk for asynchronous replication.
.TP 2m
\fB\-\-provisioned\-iops\fR=\fIPROVISIONED_IOPS\fR
Provisioned IOPS of disk to create. Only for use with disks of type pd\-extreme
and hyperdisk\-extreme.
.TP 2m
\fB\-\-provisioned\-throughput\fR=\fIPROVISIONED_THROUGHPUT\fR
Provisioned throughput of disk to create. The throughput unit is MB per sec.
Only for use with disks of type hyperdisk\-throughput.
.TP 2m
\fB\-\-replica\-zones\fR=\fIZONE\fR,\fIZONE\fR
A comma\-separated list of exactly 2 zones that a regional disk will be
replicated to. Required when creating regional disk. The zones must be in the
same region as specified in the \f5\-\-region\fR flag. See available zones with
\f5gcloud compute zones list\fR.
.TP 2m
\fB\-\-require\-csek\-key\-create\fR
Refuse to create resources not protected by a user managed key in the key file
when \-\-csek\-key\-file is given. This behavior is enabled by default to
prevent incorrect gcloud invocations from accidentally creating resources with
no user managed key. Disabling the check allows creation of some resources
without a matching Customer\-Supplied Encryption Key in the supplied
\-\-csek\-key\-file. See
https://cloud.google.com/compute/docs/disks/customer\-supplied\-encryption for
more details. Enabled by default, use \fB\-\-no\-require\-csek\-key\-create\fR
to disable.
.TP 2m
\fB\-\-resource\-policies\fR=[\fIRESOURCE_POLICY\fR,...]
A list of resource policy names to be added to the disk. The policies must exist
in the same region as the disk.
.TP 2m
\fB\-\-size\fR=\fISIZE\fR
Size of the disks. The value must be a whole number followed by a size unit of
\f5\fIGB\fR\fR for gigabyte, or \f5\fITB\fR\fR for terabyte. If no size unit is
specified, GB is assumed. For example, \f5\fI10GB\fR\fR 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
.TP 2m
\fB\-\-storage\-pool\fR=\fISTORAGE_POOL\fR
Specifies the URI of the storage pool in which the disk is created.
.TP 2m
\fB\-\-type\fR=\fITYPE\fR
Specifies the type of disk to create. To get a list of available disk types, run
\f5gcloud compute disk\-types list\fR. The default disk type is pd\-standard.
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-global\-source\-snapshot\fR
If set, the snapshot is global.
.TP 2m
\fB\-\-source\-snapshot\-region\fR=\fISOURCE_SNAPSHOT_REGION\fR
Region of the snapshot to operate on. Overrides the default \fBcompute/region\fR
property value for this command invocation.
.RE
.sp
.TP 2m
\fB\-\-image\-family\-scope\fR=\fIIMAGE_FAMILY_SCOPE\fR
Sets the scope for the \f5\-\-image\-family\fR 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. \fIIMAGE_FAMILY_SCOPE\fR must be one of: \fBzonal\fR, \fBglobal\fR.
.TP 2m
\fB\-\-image\-project\fR=\fIIMAGE_PROJECT\fR
The Google Cloud project against which all image and image family references
will be resolved. It is best practice to define image\-project. A full list of
available projects can be generated by running \f5gcloud projects list\fR.
.RS 2m
.IP "\(em" 2m
If specifying one of our public images, image\-project must be provided.
.IP "\(em" 2m
If there are several of the same image\-family value in multiple projects,
image\-project must be specified to clarify the image to be used.
.IP "\(em" 2m
If not specified and either image or image\-family is provided, the current
default project is used.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-image\fR=\fIIMAGE\fR
An image to apply to the disks being created. When using this option, the size
of the disks must be at least as large as the image size. Use
\f5\fI\-\-size\fR\fR to adjust the size of the disks.
This flag is mutually exclusive with \f5\fI\-\-source\-snapshot\fR\fR and
\f5\fI\-\-image\-family\fR\fR.
.TP 2m
\fB\-\-image\-family\fR=\fIIMAGE_FAMILY\fR
The image family for the operating system that the boot disk will be initialized
with. Compute Engine offers multiple Linux distributions, some of which are
available as both regular and Shielded VM images. When a family is specified
instead of an image, the latest non\-deprecated image associated with that
family is used. It is best practice to use \-\-image\-family when the latest
version of an image is needed.
.TP 2m
\fB\-\-primary\-disk\fR=\fIPRIMARY_DISK\fR
Primary disk for asynchronous replication. This flag is required when creating a
secondary disk.
.TP 2m
\fB\-\-source\-disk\fR=\fISOURCE_DISK\fR
Source disk used to create the disk(s). It is safe to delete a source disk after
a disk has been created from the source disk. To get a list of disks in your
current project, run \f5gcloud compute disks list\fR. This flag is mutually
exclusive with \fB\-\-image\fR and \fB\-\-source\-snapshot\fR.
When using this option, the size of the disks must be at least as large as the
source disk size. Use \fB\-\-size\fR to adjust the size of the disks.
The source disk must be in the same zone/region as the disk to be created.
.TP 2m
\fB\-\-source\-instant\-snapshot\fR=\fISOURCE_INSTANT_SNAPSHOT\fR
Name of the source instant snapshot used to create the disks.
.TP 2m
\fB\-\-source\-snapshot\fR=\fISOURCE_SNAPSHOT\fR
Source snapshot used to create the disks. It is safe to delete a snapshot after
a disk has been created from the snapshot. In such cases, the disks will no
longer reference the deleted snapshot. To get a list of snapshots in your
current project, run \f5gcloud compute snapshots list\fR. A snapshot from an
existing disk can be created using the \f5gcloud compute disks snapshot\fR
command. This flag is mutually exclusive with \fB\-\-image\fR.
When using this option, the size of the disks must be at least as large as the
snapshot size. Use \fB\-\-size\fR to adjust the size of the disks.
.RE
.sp
.TP 2m
Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be
used to protect the disk. The 'Compute Engine Service Agent' service account
must hold permission 'Cloud KMS CryptoKey Encrypter/Decrypter'. The arguments in
this group can be used to specify the attributes of this resource.
.RS 2m
.TP 2m
\fB\-\-kms\-key\fR=\fIKMS_KEY\fR
ID of the key or fully qualified identifier for the key.
To set the \f5kms\-key\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-key\fR on the command line.
.RE
.sp
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR
The KMS keyring of the key.
To set the \f5kms\-keyring\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-keyring\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR
The Google Cloud location for the key.
To set the \f5kms\-location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-location\fR on the command line;
.IP "\(bu" 2m
provide the argument \f5\-\-region\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR
The Google Cloud project for the key.
To set the \f5kms\-project\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-project\fR on the command line;
.IP "\(bu" 2m
set the property \f5core/project\fR.
.RE
.sp
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-primary\-disk\-region\fR=\fIPRIMARY_DISK_REGION\fR
Region of the primary disk for asynchronous replication. The primary and
secondary disks must not be in the same region. Overrides the default
\fBcompute/region\fR property value for this command invocation.
.TP 2m
\fB\-\-primary\-disk\-zone\fR=\fIPRIMARY_DISK_ZONE\fR
Zone of the primary disk for asynchronous replication. The primary and secondary
disks must not be in the same region. Overrides the default \fBcompute/zone\fR
property value for this command invocation.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
Region of the disks to create. If not specified, you might be prompted to select
a region (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
\f5\fIcompute/region\fR\fR property:
.RS 2m
$ gcloud config set compute/region REGION
.RE
A list of regions can be fetched by running:
.RS 2m
$ gcloud compute regions list
.RE
To unset the property, run:
.RS 2m
$ gcloud config unset compute/region
.RE
Alternatively, the region can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_REGION\fR\fR.
.TP 2m
\fB\-\-zone\fR=\fIZONE\fR
Zone of the disks to create. If not specified and the \f5\fIcompute/zone\fR\fR
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
\f5\fIcompute/zone\fR\fR property:
.RS 2m
$ gcloud config set compute/zone ZONE
.RE
A list of zones can be fetched by running:
.RS 2m
$ gcloud compute zones list
.RE
To unset the property, run:
.RS 2m
$ gcloud config unset compute/zone
.RE
Alternatively, the zone can be stored in the environment variable
\f5\fICLOUDSDK_COMPUTE_ZONE\fR\fR.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-source\-disk\-region\fR=\fISOURCE_DISK_REGION\fR
Region of the source disk. This argument is not required if the target disk is
in the same region as the source disk. Overrides the default
\fBcompute/region\fR property value for this command invocation.
.TP 2m
\fB\-\-source\-disk\-zone\fR=\fISOURCE_DISK_ZONE\fR
Zone of the source disk. This argument is not required if the target disk is in
the same zone as the source disk. Overrides the default \fBcompute/zone\fR
property value for this command invocation.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud compute disks create
.RE
.RS 2m
$ gcloud alpha compute disks create
.RE