How to export a custom image to the cloud storage

+1 vote
I have created a custom image that I wish to export to cloud storage. How should I go about doing the same?
Oct 18, 2019 in GCP by Sam
• 6,260 points
2,193 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

Hope it helps!!

If you need to know more about Google Cloud, We recommend joining GCP Certification course today.

Thanks!

answered Oct 18, 2019 by Sirajul
• 59,230 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 24, 2019 in GCP by Sirajul
• 59,230 points
2,664 views
0 votes
1 answer

How to change the storage class of objects within a bucket?

You could do this probably by overwriting the ...READ MORE

answered Oct 25, 2019 in GCP by Sirajul
• 59,230 points
1,943 views
+1 vote
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, 2019 in GCP by Sirajul
• 59,230 points
2,896 views
0 votes
1 answer
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, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,244 views
0 votes
1 answer
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP