How to export a custom image to the cloud storage?

0 votes
I have created a custom image that I wish to export to cloud storage. How should I go about doing the same?
Oct 18 in GCP by Sam
• 3,920 points
51 views

1 answer to this question.

0 votes

The preferred way to export an image to Cloud Storage is to use the gcloud compute images export command. 

This command uses Daisy to chain together the multiple steps that are required to export an image. 

Using the gcloud command-line tool, run:

gcloud compute images export --destination-uri [DESTINATION_URI] \
    --image [IMAGE]

where:

  • [DESTINATION_URI] is the Cloud Storage URI destination for the exported virtual disk file.

  • [IMAGE] is the name of the disk image to export.

For example, the following command exports an image named my-image from my-project to a Cloud Storage bucket named my-bucket. By default, the image is exported as a disk.raw file and is compressed into the tar.gz file format.

gcloud compute images export --destination-uri gs://my-bucket/my-image.tar.gz \
    --image my-image --project my-project
answered Oct 18 by Sirajul
• 37,930 points

Related Questions In GCP

0 votes
1 answer

How to create a cloud storage bucket in GCP?

Buckets are the basic containers that hold your ...READ MORE

answered Oct 23 in GCP by Sirajul
• 37,930 points
18 views
0 votes
1 answer
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23 in GCP by Sirajul
• 37,930 points
36 views
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23 in GCP by Sirajul
• 37,930 points
44 views
0 votes
1 answer
0 votes
1 answer