Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I download an snapshot in Google Compute Engine?

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

like image 226
antonio.fornie Avatar asked Jun 05 '15 11:06

antonio.fornie


People also ask

How do I download from Google Compute Engine?

In the Google Cloud console, go to the VM instances page. In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to. After the connection is established, click the download icon download. The download dialog opens.

What is the difference between Compute Engine snapshots and images?

A snapshot reflects the contents of a persistent disk in a concrete instant in time. An image is the same thing, but includes an operating system and boot loader and can be used to boot an instance. Images and snapshots can be public or private.

What is a Compute Engine snapshot?

Compute Engine stores multiple copies of each snapshot across multiple locations with automatic checksums to ensure the integrity of your data. You can create snapshots from disks even while they are attached to running virtual machine (VM) instances.


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.

like image 122
M.Ali El-Sayed Avatar answered Sep 20 '22 18:09

M.Ali El-Sayed


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

like image 30
antonio.fornie Avatar answered Sep 19 '22 18:09

antonio.fornie