gcloud_beta_compute_images_import (1)
NAME
- gcloud beta compute images import - import an image into Google Compute Engine
SYNOPSIS
-
gcloud beta compute images import IMAGE_NAME (--data-disk | --os=OS) (--source-file=SOURCE_FILE | --source-image=SOURCE_IMAGE) [--async] [--no-guest-environment] [--log-location=LOG_LOCATION] [--network=NETWORK] [--subnet=SUBNET] [--timeout=TIMEOUT; default="2h"] [--zone=ZONE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(BETA) gcloud beta compute images import imports Virtual Disk
Importing images involves 3 steps:
-
- *
- Upload the virtual disk file to Google Cloud Storage.
- *
- Import the image to Google Compute Engine.
- *
- Translate the image to make a bootable image.
This command will perform all three of these steps as necessary, depending on
the input arguments specified by the user.
This command uses the --os flag to choose the appropriate translation.
You can omit the translation step using the --data-disk flag.
If you exported your disk from Google Compute Engine then you do not need to
re-import it. Instead, use the create command to create further images
from it.
Files stored on Cloud Storage and images in Compute Engine incur charges. See
cloud.google.com/compute/docs/images/importing-virtual-disks#resource_cleanup
POSITIONAL ARGUMENTS
-
- IMAGE_NAME
-
Name of the disk image to create.
REQUIRED FLAGS
-
-
Exactly one of these must be specified:
-
- --data-disk
-
Specifies that the disk has no bootable OS installed on it. Imports the disk
without making it bootable or installing Google tools on it.
- --os=OS
-
Specifies the OS of the image being imported. OS must be one of:
centos-6, centos-7, debian-8, debian-9,
rhel-6, rhel-6-byol, rhel-7, rhel-7-byol,
ubuntu-1404, ubuntu-1604, windows-2008r2,
windows-2012r2, windows-2016.
-
-
Exactly one of these must be specified:
-
- --source-file=SOURCE_FILE
-
A local file, or the Google Cloud Storage URI of the virtual disk file to
import. For example: gs://my-bucket/my-image.vmdk or
./my-local-image.vmdk
- --source-image=SOURCE_IMAGE
-
An existing Compute Engine image from which to import.
-
-
Exactly one of these must be specified:
OPTIONAL FLAGS
-
- --async
-
Display information about the operation in progress, without waiting for the
operation to complete.
- --no-guest-environment
-
Google Guest Environment will not be installed on the image.
- --log-location=LOG_LOCATION
-
Directory in Google Cloud Storage to hold build logs. If not set,
gs://<project num>.cloudbuild-logs.googleusercontent.com/ will be created
and used.
- --network=NETWORK
-
Name of the network in your project to use for the image import. The network
must have access to Google Cloud Storage. If not specified, the network named
default is used.
- --subnet=SUBNET
-
Name of the subnetwork in your project to use for the image import. If the
network resource is in legacy mode, do not provide this property. If the network
is in auto subnet mode, providing the subnetwork is optional. If the network is
in custom subnet mode, then this field should be specified. Region or zone
should be specified if this field is specified.
- --timeout=TIMEOUT; default="2h"
-
Maximum time a build can last before it is failed as "TIMEOUT". For example,
specifying 2h will fail the process after 2 hours. See $ gcloud
topic datetimes for information on duration formats.
- --zone=ZONE
-
Zone of the image to import. The zone in which to do the work of importing the
image. Overrides the default compute/zone property value for this command
invocation.
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 BETA and may change without notice. These variants are also available:
- $ gcloud compute images import $ gcloud alpha compute images import