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,500 points
45 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
• 35,810 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer

How to delete a project from Google Cloud Console

First of all, select the project you ...READ MORE

answered Apr 18, 2018 in GCP by kurt_cobain
• 9,260 points
170 views
+2 votes
2 answers

How to download multiple files in Google Cloud Storage?

You can achieve this through the gsutil ...READ MORE

answered May 9, 2018 in GCP by kurt_cobain
• 9,260 points
4,842 views
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
• 35,810 points
33 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
• 35,810 points
39 views
0 votes
1 answer
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
• 35,810 points
16 views