gcloud_alpha_compute_images_create (1)
NAME
- gcloud alpha compute images create - create Google Compute Engine images
SYNOPSIS
-
gcloud alpha compute images create IMAGE_NAME (--source-disk=SOURCE_DISK | --source-image=SOURCE_IMAGE | --source-image-family=SOURCE_IMAGE_FAMILY | --source-snapshot=SOURCE_SNAPSHOT | --source-uri=SOURCE_URI) [--csek-key-file=FILE] [--description=DESCRIPTION] [--family=FAMILY] [--force] [--force-create] [--guest-os-features=[GUEST_OS_FEATURE,...]] [--labels=[KEY=VALUE,...]] [--licenses=[LICENSES,...]] [--no-require-csek-key-create] [--source-disk-zone=SOURCE_DISK_ZONE] [--source-image-project=SOURCE_IMAGE_PROJECT] [--storage-location=LOCATION] [--kms-key=KMS_KEY : --kms-keyring=KMS_KEYRING --kms-location=KMS_LOCATION --kms-project=KMS_PROJECT] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha compute images create is used to create custom
Images can be created from gzipped compressed tarball containing raw disk data, existing disks in any zone, existing images, and existing snapshots inside the same project.
Images are global resources, so they can be used across zones and projects.
To learn more about creating image tarballs, visit cloud.google.com/compute/docs/creating-custom-image
POSITIONAL ARGUMENTS
-
- IMAGE_NAME
-
Name of the disk image to create.
REQUIRED FLAGS
-
-
Exactly one of these must be specified:
-
- --source-disk=SOURCE_DISK
-
A source disk to create the image from. The value for this option can be the
name of a disk with the zone specified via --source-disk-zone
flag.
- --source-image=SOURCE_IMAGE
-
The name of an image to clone. May be used with
--source-image-project to clone an image in a different project.
- --source-image-family=SOURCE_IMAGE_FAMILY
-
The family of the source image. This will cause the latest non- deprecated
image in the family to be used as the source image. May be used with
--source-image-project to refer to an image family in a
different project.
- --source-snapshot=SOURCE_SNAPSHOT
-
A source snapshot to create the image from. The value for this option can be the
name of a snapshot within the same project as the destination image.
- --source-uri=SOURCE_URI
-
The full Google Cloud Storage URI where the disk image is stored. This file must
be a gzip-compressed tarball whose name ends in .tar.gz.
-
-
Exactly one of these must be specified:
OPTIONAL FLAGS
-
- --csek-key-file=FILE
-
Path to a Customer-Supplied Encryption Key (CSEK) key file, mapping Google
Compute Engine images to user managed keys to be used when creating, mounting,
or snapshotting disks.
If you pass - as value of the flag the CSEK will be read from stdin. See cloud.google.com/compute/docs/disks/customer-supplied-encryption for more details.
- --description=DESCRIPTION
-
An optional, textual description for the image being created.
- --family=FAMILY
-
The family of the image. When creating an instance or disk, specifying a family
will cause the latest non-deprecated image in the family to be used.
- --force
-
By default, image creation fails when it is created from a disk that is attached
to a running instance. When this flag is used, image creation from disk will
proceed even if the disk is in use.
- --force-create
-
(DEPRECATED) DEPRECATED, use --force instead. By default, image creation fails
when it is created from a disk that is attached to a running instance. When this
flag is used, image creation from disk will proceed even if the disk is in use.
Flag force-create is deprecated. Use --force instead.
- --guest-os-features=[GUEST_OS_FEATURE,...]
-
This parameter enables one or more features for VM instances that use the image
for their boot disks. The following features are available:
-
- ---
-
MULTI_IP_SUBNET - For configuring interfaces with a netmask other than /32.
- ---
-
SECURE_BOOT - Enables UEFI secure boot, which restrics unsigned software from
booting or unsigned drivers from loading on the VM instance.
- ---
-
UEFI_COMPATIBLE - Enables UEFI booting, which is an alternative system boot
method. Most public images use the GRUB bootloader as their primary boot method.
- ---
-
VIRTIO_SCSI_MULTIQUEUE - Enables multiqueue SCSI capabilities for Local SSD
devices. This option is an alternative to NVMe.
-
- *
- For Linux images, you can enable VIRTIO_SCSI_MULTIQUEUE on images with kernel versions 3.17 and higher.
- *
-
For Windows images, you can enable VIRTIO_SCSI_MULTIQUEUE on images with driver
version 1.2.0.1621 or higher.
-
- ---
-
WINDOWS - Required for Windows Server images. Newer public images for Windows
server include the WINDOWS parameter to indicate that it is a Windows image.
-
GUEST_OS_FEATURE must be one of: MULTI_IP_SUBNET, SECURE_BOOT,
UEFI_COMPATIBLE, VIRTIO_SCSI_MULTIQUEUE, WINDOWS.
-
- --labels=[KEY=VALUE,...]
-
List of label KEY=VALUE pairs to add.
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=[LICENSES,...]
-
Comma-separated list of URIs to license resources.
- --require-csek-key-create
-
Refuse to create 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 images with no user
managed key. Disabling the check allows creation of some images without a
matching Customer-Supplied Encryption Key in the supplied --csek-key-file.
See cloud.google.com/compute/docs/disks/customer-supplied-encryption
for more details. Enabled by default, use
--no-require-csek-key-create to disable.
- --source-disk-zone=SOURCE_DISK_ZONE
-
Zone of the source disk to operate on. If not specified and the
compute/zone property isn't set, you may be prompted to select a
zone.
To avoid prompting when this flag is omitted, you can set the compute/zone property:
- $ 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-image-project=SOURCE_IMAGE_PROJECT
-
The project name of the source image. Must also specify either
--source-image or --source-image-family when
using this flag.
- --storage-location=LOCATION
-
Google Cloud Storage location, either regional or multi-regional, where image
content is to be stored. If absent, a nearby regional or multi-regional
location is chosen automatically.
-
Key resource - The Cloud KMS (Key Management Service) cryptokey that will be
used to protect the image. The arguments in this group can be used to specify
the attributes of this resource.
-
- --kms-key=KMS_KEY
-
ID of the key or fully qualified identifier for the key. This flag must be
specified if any of the other arguments in this group are specified.
- --kms-keyring=KMS_KEYRING
-
The KMS keyring of the key.
- --kms-location=KMS_LOCATION
-
The Cloud location for the key.
- --kms-project=KMS_PROJECT
-
The Cloud project for the key.
-
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support These variants are also available:
- $ gcloud compute images create $ gcloud beta compute images create