Sorry if it's duplicated, I didn't find anything similar. I have my VM running and already created an snapshot and now I want to have my snapshot someplace else. Say, download it to my computer, store it in another cloud product or reuse it in another account. How can I do that? Thanks
-
1possible duplicate of [how can I download a google compute engine image](http://stackoverflow.com/questions/27769364/how-can-i-download-a-google-compute-engine-image) – Misha Brukman Jun 05 '15 at 16:21
2 Answers
For those who are new to google, you can't download snapshots directly. There is no such command. You have to first go to images, and then choose create image based on the snapshot you would like to download. Then go to your main page and create a bucket and copy your bucket url, then export your image with the following command:
gcloud alpha compute images export --destination-uri gs://yourbucket/yourimagename.vmdk --image yourImageName --export-format vmdk --project yourProjectID
Finally go to your bucket and download the image and attach it to vmware and Go. * Note: you need to wait some time may be 30 minutes before you can download the exported image from your bucket and if you get and error try to change bucket settings and make it public.

- 87
- 12

- 1,608
- 20
- 23
-
Thanks. Helpful. But in command it should be yourProjectID instead of yourProjectName. – JohnK Aug 13 '19 at 19:43
-
5
-
2Updating https://cloud.google.com/compute/docs/images/export-image#exporting_an_image_with_a_single_command – Deividson Damasio Dec 04 '20 at 11:19
For my purposes it was actually better to just create an image, store it in another secondary drive and then from the VM send it to Google Storage.
This link helped me: https://cloud.google.com/compute/docs/creating-custom-image

- 1,740
- 2
- 13
- 23
-
-
I guess other people could have other reasons, my in our case it was a matter of making a "backup" in another account so that those who could delete/break the original, could not access the backup. – antonio.fornie Mar 02 '17 at 09:06