HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_alpha_compute_machine-images_create.1
.TH "GCLOUD_ALPHA_COMPUTE_MACHINE\-IMAGES_CREATE" 1



.SH "NAME"
.HP
gcloud alpha compute machine\-images create \- create a Compute Engine machine image



.SH "SYNOPSIS"
.HP
\f5gcloud alpha compute machine\-images create\fR \fIIMAGE\fR \fB\-\-source\-instance\fR=\fISOURCE_INSTANCE\fR [\fB\-\-csek\-key\-file\fR=\fIFILE\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-guest\-flush\fR] [\fB\-\-no\-require\-csek\-key\-create\fR] [\fB\-\-source\-disk\-csek\-key\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]] [\fB\-\-source\-instance\-zone\fR=\fISOURCE_INSTANCE_ZONE\fR] [\fB\-\-storage\-location\fR=\fILOCATION\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] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Create a Compute Engine machine image.



.SH "EXAMPLES"

To create a machine image, run:

.RS 2m
$ gcloud alpha compute machine\-images create my\-machine\-image \e
    \-\-source\-instance=example\-source \e
    \-\-source\-instance\-zone=us\-central1\-a
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fIIMAGE\fR

Name of the machineImage to create.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-source\-instance\fR=\fISOURCE_INSTANCE\fR

The source instance to create a machine image from.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-csek\-key\-file\fR=\fIFILE\fR

Path to a Customer\-Supplied Encryption Key (CSEK) key file that maps Compute
Engine machine images 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

Specifies a text description of the machine image.

.TP 2m
\fB\-\-guest\-flush\fR

Create an application\-consistent machine image by informing the OS to prepare
for the snapshot process.

.TP 2m
\fB\-\-require\-csek\-key\-create\fR

Refuse to create machine images 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 machine images
with no user managed key. Disabling the check allows creation of some machine
images 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\-\-source\-disk\-csek\-key\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]

Customer\-supplied encryption key of the disk attached to the source instance.
Required if the source disk is protected by a customer\-supplied encryption key.
This flag can be repeated to specify multiple attached disks.

.RS 2m
.TP 2m
\fBdisk\fR
URL of the disk attached to the source instance. This can be a full or valid
partial URL

.TP 2m
\fBcsek\-key\-file\fR
path to customer\-supplied encryption key.

.RE
.sp
.TP 2m
\fB\-\-source\-instance\-zone\fR=\fISOURCE_INSTANCE_ZONE\fR

Zone of the instance to operate on. 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.

.TP 2m
\fB\-\-storage\-location\fR=\fILOCATION\fR

Google Cloud Storage location, either regional or multi\-regional, where machine
image's content is to be stored. If absent, a nearby regional or multi\-regional
location is chosen automatically.

.TP 2m

Key resource \- The Cloud KMS (Key Management Service) cryptokey that will be
used to protect the machine image. 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.
.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
.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 alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud compute machine\-images create
.RE

.RS 2m
$ gcloud beta compute machine\-images create
.RE