If you have virtual disks in your on-premises environment with software and configurations that you need (sometimes referred to as golden disks or golden images ), you can save time by importing those virtual disks into Compute Engine and using the resulting image to create virtual machines . The import tool supports most virtual disk file formats, including VMDK and VHD.
If you exported your disk from Compute Engine, you can create images from the disk.
For information about how to create an automated system for migrating several virtual machines (VMs), see Migrating VMs to Compute Engine .
Before you begin
- If there is a trusted image policy
defined for the project that you are importing the image into,
add
projects/compute-image-import
andprojects/compute-image-tools
to the allowed list of publishers. - To find out how to meet requirements before importing images, see Prerequisites for importing and exporting VM images .
- If you haven't already, set up authentication. Authentication
is
the process by which your identity is verified for access to Google Cloud services and APIs.
To run code or samples from a local development environment, you can authenticate to
Compute Engine as follows.
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloud
-
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
- Set a default region and zone .
REST
To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI, then initialize it by running the following command:
gcloud init
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
-
Supported operating systems
You can import both bootable and non-bootable disks. For your virtual disks to be bootable on Compute Engine, they must run one of the supported operating systems .
Support for BYOL and BYOS
If you prefer to use your own software license or subscription, you can import your virtual disks with their licenses. For information about the operating systems that support BYOL or BYOS, see Operating system details .
You can import images with existing licenses
by using
the gcloud compute instances import
command
with the --byol
flag.
Limitations
This feature has the following general limitations:
-
If you are importing a virtual disk running RHEL, bring your own license (BYOL) is supported only if the python-boto package is installed on the virtual disk prior to import.
-
Operating systems on virtual disks must support ACPI .
-
This feature is not supported for projects that are protected with VPC Service Controls . For those environments, see Manually importing boot disks .
-
You cannot import Arm images by using the image import tool. To import Arm images, follow step-by-step instructions as described in Manually import boot disks .
-
Compute Engine does not support importing software encrypted disks because they cannot be read without a key. Specifically, you cannot import Windows 10 and later images that use BitLocker drive encryption .
This feature has the following limitations on Linux:
-
Linux virtual disks must use
grub
as the bootloader. -
Linux virtual disks must meet the same requirements as custom images , including support for Virtio-SCSI Storage Controller devices.
This feature has the following limitations on Windows:
-
When installed on Windows virtual disks, application-allowlisting software, such as CB Protection by Carbon Black , can cause the import process to fail. You might need to uninstall such software prior to import.
-
On Windows-based VMs, the Microsoft KM-TEST Loopback Adapter prevents network access to the metadata server and you must disable or remove it before import.
Permissions
To enable a seamless experience when importing images, ensure that you've granted required IAM roles to your account, the Cloud Build service account, and the Compute Engine service account. For more information, see Grant required IAM roles .
Check for compatibility
Before you attempt to import the disk for your VM, download and run the precheck tool inside your VM. The precheck tool scans for any compatibility issues that might cause the import process to fail or the disk to not work properly on Compute Engine.
Import virtual disks
You can import your virtual disks using either the Google Cloud console , the Google Cloud CLI , or Cloud Build API .
Import a bootable virtual disk
For bootable disks, you don't need to specify the operating system because the
import tool automatically detects the operating system to determine which
drivers and packages are required. However, if you need to override the
detected operating system, you can specify the --os
flag or -os
parameter. For a list of supported values, see --os
flag
.
Console
- In the Google Cloud console, upload the virtual disk file to Cloud Storage.
-
Go to the Create an imagepage .
-
Specify a Namefor your image.
-
Under Source, select Virtual disk (VMDK, VHD).
-
Select the Cloud Build service account. You can use the default service account or select a custom service account.
- If you select a service account that doesn't have enough permissions to import an image, you will see a message with an option to grant the required permissions. Click Grantto provide the service account with the required permissions.
-
Enter the Log location. If the service account you selected is a Cloud Build service account, you don't need to provide the log location. For all other service accounts (including the default Compute Engine service account) you must provide the log location.
-
Browse to or manually input the storage location for the Cloud Storage file.
-
Select the operating system that is available on the imported disk. You can also make the following changes:
-
You can choose to Install guest packages. Google recommends that you install the guest environment. For more information about the guest environment, see guest environment .
-
For Windows or Red Hat Enterprise Linux (RHEL) operating systems, you can also choose a licensing option. You can either allow Compute Engine to provide a license or you can bring your own license. For more information about bringing your own license on Windows, see Bring your own license .
-
-
(Optional) Specify additional properties for your image. For example, you can organize this image as part of an image family .
-
Click Createto import the image.
gcloud
Use the gcloud compute images import
command to create a bootable Compute Engine image. Although
Compute Engine can boot most boot disk images, the import
command ensures that the disk has the required drivers and latest guest environment
packages, which are required to start an instance and connect to it using
SSH or RDP.
You can import virtual disk files from either a Cloud Storage bucket or from your local workstation.
If you import the virtual disk file from your workstation, the import tool automatically uploads the file to a Cloud Storage bucket for you.
If you prefer, you can upload the virtual disk file to Cloud Storage yourself before you start the import process, but you must upload the file to a Cloud Storage bucket in the same project that will be used for the import process.
gcloud compute images import IMAGE_NAME \ --source-file SOURCE_FILE
Replace the following:
-
IMAGE_NAME
: the name of your destination image. -
SOURCE_FILE
: your virtual disk file. This file can be a local file or a file stored in Cloud Storage. If your virtual disk is a local file, you can provide an absolute or relative path. If your virtual disk file is already stored in Cloud Storage, the file must exist in a Cloud Storage bucket in the project that is used for the import process, and you must specify the full path of the file in thegs:// BUCKET_NAME / OBJECT_NAME
format.
If you're importing an image with an existing license, specify the --byol
flag as follows:
gcloud compute images import IMAGE_NAME \ --source-file SOURCE_FILE --byol
For instructions on how to import images with existing licenses to Google Cloud, see Bringing your own licenses .
If you specify a local file, the upload operation can take a long time depending on the size of your virtual disk and the speed of your network connection. The import operation can take tens of minutes to run depending on the size of the disk.
Example
The following example imports a virtual disk named my_server.vmdk
stored in gs://your_gcs_bucket
.
gcloud compute images import my-imported-image \ --source-file gs://your_gcs_bucket/my_server.vmdk
Optional parameters
By default guest environment packages
are added to all imported boot disk images. If you don't want these
packages, add the --no-guest-environment
flag to your import command.
REST
-
Add the virtual disk to Cloud Storage .
-
Send a
POST
request to the Cloud Build API .POST https://cloudbuild.googleapis.com/v1/projects/ PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-timeout=7000s", "-client_id=api" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following:
-
PROJECT_ID
: the project ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
.
For additional
args
values that can be provided, see the optional flags section of the VM image import GitHub page .Example response
The following sample response resembles the output that is returned:
{ "name": "operations/build/myproject-12345/operation-1578608233418", "metadata": { "@type": "type.googleapis.com/google.devtools.cloudbuild.v1.BuildOperationMetadata", "build": { "id": "3a2055bc-ccbd-4101-9434-d376b88b8940", "status": "QUEUED", "createTime": "2019-09-20T15:55:29.353258929Z", "steps": [ { "name": "gcr.io/compute-image-import/gce_vm_image_import:release", "env": [ "BUILD_ID=3a2055bc-ccbd-4101-9434-d376b88b8940" ], "args": [ "-timeout=7000s", "-image_name=my-image", "-client_id=api", "-data-disk", "-source_file=gs://my-bucket/my-image.vmdk" ] } ], "timeout": "7200s", "projectId": "myproject-12345", "logsBucket": "gs://123456.cloudbuild-logs.googleusercontent.com", "options": { "logging": "LEGACY" }, "logUrl": "https://console.cloud.google.com/cloud-build/builds/3a2055bc-ccbd-4101-9434-d376b88b8940?project=123456" } }
There are a couple ways you can monitor your build:
- Run a projects.builds.get
request using the returned
build-id
. - Review the logs hosted at the provided
logUrl
.
-
Import and append a license to a virtual disk
To append a license when importing an image, use the following gcloud compute
images import
command
.
gcloud compute images import IMAGE_NAME \ --source-file= SOURCE_FILE --os= OS
Replace the following:
-
IMAGE_NAME
: the name of the image to create. -
SOURCE_FILE
: a local file or Cloud Storage URI of the virtual disk to import. -
OS
: the OS of the disk image to import. The license for the OS is inferred from the value of this flag; there isn't an explicit flag to provide license information when importing. For a list of the supported values, see--os
flag .
For more information about viewing and appending licenses, see View and append licenses .
Import a non-bootable virtual disk
Console
- In the Google Cloud console, upload the virtual disk file to Cloud Storage.
-
Go to the Create an imagepage.
-
Specify a Namefor your image.
-
Under Source, select Virtual disk (VMDK, VHD, ...).
-
Browse to or manually input the storage location for the Cloud Storage file.
-
Under operating system, select No operating system. Data only.
-
(Optional) Specify additional properties for your image. For example, you can organize this image as part of an image family .
-
Click Createto import the image.
gcloud
You can use the gcloud compute images import
command to create a non-bootable Compute Engine image. If your
virtual disk does not have a bootable operating system installed on it,
specify the --data-disk
flag. This skips over the step that installs
drivers and guest environment packages to make the image bootable on
Compute Engine.
gcloud compute images import IMAGE_NAME \ --source-file SOURCE_FILE \ --data-disk
Replace the following:
-
IMAGE_NAME
: the name of your destination image. -
SOURCE_FILE
: your virtual disk file. This file can be a local file or a file stored in Cloud Storage. If your virtual disk is a local file, you can use an absolute or relative path. If your virtual disk file is already stored in Cloud Storage, the file must exist in a Cloud Storage bucket in the project that is used for the import process, and you must specify the full path of the file in thegs:// BUCKET_NAME / OBJECT_NAME
format.
Example 1: Import a non-bootable virtual disk from Cloud Storage
The following example imports a virtual disk name my_disk.vmdk
stored in gs://your_gcs_bucket
.
gcloud compute images import my-imported-image \ --source-file gs://your_gcs_bucket/my_disk.vmdk --data-disk
Example 2: Import a large VMDK file by specifying the timeout value
The default timeout value for the import process is two hours. Large VMDK
files might take up to 24 hours to import. If you don't specify the --timeout
flag when you import such large files, the process fails after
two hours.
The following example imports a virtual disk named my_disk.vmdk
stored in gs://your_gcs_bucket
. The timeout value for
this import is 24 hours.
gcloud compute images import my-imported-image \ --source-file gs://your_gcs_bucket/my_disk.vmdk --data-disk --timeout=24h
REST
-
Add the virtual disk to Cloud Storage .
-
Send a
POST
request to the Cloud Build API .POST https://cloudbuild.googleapis.com/v1/projects/ PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-timeout=7000s", "-client_id=api", "-data_disk" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following
args
values:-
PROJECT_ID
: the project ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
.
-
Import disks using networks that don't allow external IP addresses
To import virtual disks using a network that does not allow external IPs, complete the following steps:
-
Add the virtual disk to Cloud Storage .
-
The image import process requires package managers to be installed on the operating system for the virtual disk. These package managers might need to make requests to package repositories that are outside Google Cloud. To allow access for these updates, you need to configure Cloud NAT. For more information, see Create a NAT configuration using Cloud Router .
-
Configure Private Google Access . For more information, see Configuring Private Google Access .
-
Import the virtual disk using either Google Cloud CLI or REST.
When you import a virtual disk, temporary VMs are created in your project. To ensure that these temporary VMs are not assigned external IP addresses, you must specify an additional flag or argument.
For more information, click the following tabs:
gcloud
Use the gcloud compute images import
command
with the --no-address
flag to import your virtual disk.
gcloud compute images import IMAGE_NAME \ --source-file= SOURCE_FILE \ --zone= ZONE \ --no-address
Replace the following:
-
IMAGE_NAME
: the name of the disk image that you want to create. -
SOURCE_FILE
: your virtual disk file. It can be a local file or a file stored in Cloud Storage. If your virtual disk is a local file, you can provide an absolute or relative path. If your virtual disk file is already stored in Cloud Storage, the file must exist in a Cloud Storage bucket in the project that is used for the import process, and you must specify the full path of the file in thegs:// BUCKET_NAME / OBJECT_NAME
format. -
ZONE
: the zone in which to create the image. If left blank, the default zone for the project is used.
REST
Send a POST
request to the Cloud Build API
and specify the -no-external-ip
argument.
POST https://cloudbuild.googleapis.com/v1/projects/ PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-zone= ZONE ", "-no_external_ip", "-timeout=7000s", "-client_id=api" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following:
-
PROJECT_ID
: the project ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage. For example,gs://my-bucket/my-image.vmdk
. for thegcloud compute images import
command. -
ZONE
: the zone in which to create the image. If left blank, the default zone for the project is used.
Import a virtual disk with UEFI bootloader
For most virtual disks, Compute Engine can detect and successfully import disks with an UEFI bootloader without the need for an additional flag.
However, for scenarios like the following, you might need to force an UEFI boot during import.
- If the image import process fails to detect the UEFI bootloader during the import.
-
If your disk is dual-bootable and has a combination of either: hybrid-mbr + UEFI, or protective-mbr + UEFI. For dual-bootable disks, the import might default to the non-UEFI boot.
gcloud
You can use the gcloud compute images import
command
to force an import to use UEFI boot.
gcloud compute images import IMAGE_NAME \ --source-file= SOURCE_FILE \ --guest-os-features=UEFI_COMPATIBLE
Replace the following:
-
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
.
Example
The following example imports a virtual disk named my-disk.vmdk
stored in gs://my-gcs-bucket/
, and forces to use UEFI boot.
gcloud compute images import my-imported-image \ --source-file gs://my-gcs-bucket/my-disk.vmdk \ --guest-os-features=UEFI_COMPATIBLE
REST
To force an import to use UEFI boot, you can use the Cloud Build API and specify
the -uefi_compatible
argument. To do this, complete the following steps:
-
Add the virtual disk to Cloud Storage .
-
Send a
POST
request to the Cloud Build API .POST https://cloudbuild.googleapis.com/v1/projects/ PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-uefi_compatible", "-timeout=7000s", "-client_id=api" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following:
-
PROJECT_ID
: the project ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
.
-
Import a virtual disk using shared VPC
Before you import a virtual disk that uses a shared VPC, you must
add the compute.networkUser
role to the Cloud Build service account.
For more information, see Grant required roles to the Cloud Build service
account
.
gcloud
Use the gcloud compute images import
command
to import your virtual disk.
gcloud compute images import IMAGE_NAME \ --source-file SOURCE_FILE \ --project SERVICE_PROJECT_ID \ --zone ZONE \ --network NETWORK \ --subnet SUBNET
Replace the following:
-
IMAGE_NAME
: the name of your image to import. -
SOURCE_FILE
: your virtual disk file. It can be a local file or a file stored in Cloud Storage. If your virtual disk is a local file, you can provide an absolute or relative path. If your virtual disk file is already stored in Cloud Storage, the file must exist in a Cloud Storage bucket in the project that is used for the import process, and you must specify the full path of the file in thegs:// BUCKET_NAME / OBJECT_NAME
format. -
SERVICE_PROJECT_ID
: ID of the project that you want to import the image into. -
ZONE
: the zone that you want to import the image to. This zone must match the region of the subnet. For example, if theSUBNET
isus-west1
. The import zone must be one of the following:us-west1-a
,us-west1-b
orus-west1-c
. -
NETWORK
: the full path to a shared VPC network . For example,projects/ HOST_PROJECT_ID /global/networks/ VPC_NETWORK_NAME
. -
SUBNET
: the full path to a shared VPC subnetwork For example,projects/ HOST_PROJECT_ID /regions/ REGION /subnetworks/ SUBNET_NAME
.Sample command
gcloud compute images import example-image \ --source-file gs://source-bucket/source-file.vmdk \ --project my-image-project \ --zone us-west1-c \ --network projects/my-vpc-project/global/networks/my-shared-vpc \ --subnet projects/my-vpc-project/regions/us-west1/subnetworks/my-shared-subnet
REST
-
Add the virtual disk to Cloud Storage .
-
Send a
POST
request to the Cloud Build API .POST https://cloudbuild.googleapis.com/v1/projects/ SERVICE_PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-zone= ZONE ", "-network= NETWORK ", "-subnet= SUBNET ", "-timeout=7000s", "-client_id=api" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following
args
values:-
SERVICE_PROJECT_ID
: ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
. -
ZONE
: the zone that you want to import the image to. This zone must match the region of the subnet. For example, if theSUBNET
isus-west1
. The import zone must be one of the following:us-west1-a
,us-west1-b
orus-west1-c
. -
NETWORK
: the full path to a shared VPC network . For example,projects/ HOST_PROJECT_ID /global/networks/ VPC_NETWORK_NAME
. -
SUBNET
: the full path to a shared VPC subnetwork For example,projects/ HOST_PROJECT_ID /regions/ REGION /subnetworks/ SUBNET_NAME
-
Importing a virtual disk using a custom Compute Engine service account
During an image import, temporary virtual machine (VM) instances are created in your project. The image import tool on these temporary VMs must be authenticated.
A service account is an identity that is attached to a VM. Service account access tokens can be accessed through the instance metadata server and used to authenticate the image import tool on the VM.
By default, the import process uses the project's default Compute Engine Service Agent . However, if the default Compute Engine service account is disabled in your project or if you want to use a custom Compute Engine service account, then you need to create a service account and specify it for the import process.
gcloud
-
Add the virtual disk to Cloud Storage .
-
Create a service account and assign the minimum roles. For more information about creating service accounts, see Creating and managing service accounts .
At minimum, the specified Compute Engine service account needs to have the following roles assigned:
-
roles/compute.storageAdmin
-
roles/storage.objectViewer
For more information, see Grant required roles to the Compute Engine service account .
-
-
Use the
gcloud compute images import
to import the image.gcloud compute images import IMAGE_NAME \ --source-file SOURCE_FILE \ --compute-service-account SERVICE_ACCOUNT_EMAIL
Replace the following:
-
IMAGE_NAME
: the name of your destination image. -
SOURCE_FILE
: your virtual disk file. This file can be a local file or a file stored in Cloud Storage. If your virtual disk is a local file, you can provide an absolute or relative path. If your virtual disk file is already stored in Cloud Storage, the file must exist in a Cloud Storage bucket in the project that is used for the import process, and you must specify the full path of the file in thegs:// BUCKET_NAME / OBJECT_NAME
format. -
SERVICE_ACCOUNT_EMAIL
: the email address associated with the Compute Engine service account created in the previous step.
Example
The following example imports a bootable virtual disk named
my_server.vmdk
stored ings://your_gcs_bucket
by using a service account that has the emailimage-export-service-account@proj-12345.iam.gserviceaccount.com
.gcloud compute images import my-imported-image \ --source-file gs://your_gcs_bucket/my_server.vmdk \ --compute-service-account image-export-service-account@proj-12345.iam.gserviceaccount.com
-
REST
-
Add the virtual disk to Cloud Storage .
-
Create a service account and assign the minimum roles. For more information about creating service accounts, see Creating and managing service accounts .
At minimum, the specified Compute Engine service account needs to have the following roles assigned:
-
roles/compute.storageAdmin
-
roles/storage.objectViewer
For more information, see Grant required roles to the Compute Engine service account .
-
-
Add the virtual disk to Cloud Storage .
-
Send a
POST
request to the Cloud Build API .POST https://cloudbuild.googleapis.com/v1/projects/ PROJECT_ID /builds { "steps":[ { "args":[ "-image_name= IMAGE_NAME ", "-source_file= SOURCE_FILE ", "-compute_service_account= SERVICE_ACCOUNT_EMAIL ", "-timeout=7000s", "-client_id=api" ], "name":"gcr.io/compute-image-import/gce_vm_image_import:release", "env":[ "BUILD_ID=$BUILD_ID" ] } ], "timeout":"7200s", "tags":[ "gce-daisy", "gce-daisy-image-import" ] }
Replace the following:
-
PROJECT_ID
: the project ID for the project that you want to import the image into. -
IMAGE_NAME
: the name of the image to be imported. -
SOURCE_FILE
: the URI for the image in Cloud Storage—for example,gs://my-bucket/my-image.vmdk
. -
SERVICE_ACCOUNT_EMAIL
: the email address associated with the Compute Engine service account created in the previous step.
-
Make an image bootable
If you have a Compute Engine custom image that has a bootable operating system on it but does not have the necessary Compute Engine drivers or guest environment packages, you can use the image import tool to make that image bootable on Compute Engine.
Use the --source-image
flag to specify a custom image to make bootable,
instead of using the --source-file
flag that specifies a new disk to import.
gcloud compute images import IMAGE_NAME \ --source-image SOURCE_IMAGE_NAME
Replace the following:
-
IMAGE_NAME
: the name of your destination image. -
SOURCE_IMAGE_NAME
: the name of your source image.For instructions on how to import images with existing licenses to Google Cloud, see Bringing your own licenses .
Sample command
The following example turns a Compute Engine image named my-image
into a bootable image named my-bootable-image
.
In this example, --os ubuntu-1604
overrides the detected operating system.
gcloud compute images import my-bootable-image \ --source-image my-image \ --os ubuntu-1604
Resource cleanup
Files stored on Cloud Storage and images in Compute Engine incur charges. The import tool imports the virtual disk file to Cloud Storage and creates one Compute Engine custom image.
After you verify that the image is imported correctly and that it boots
correctly as a Compute Engine instance, you can delete the virtual
disk file from Cloud Storage. The tool prints the URI of the file as
it uploads it to Cloud Storage. This URI has the following form: gs:// BUCKET_NAME
/tmpimage/ IMAGE_NAME
.
If you imported an image using the --data-disk
flag and then ran the import
tool a second time with the --source-image
flag to make that image
bootable, then the first image still exists. If you have no need for it,
consider deleting that image. If you specify the same image name for both
the --image
and --source-image
flags, then the image is
automatically overwritten and no further cleanup is required.
What's next
- Create a new VM instance that uses your bootable image.
- Share your image across projects.