Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I copy a Google Compute Engine snapshot to Google Cloud Storage?

I have one application that has preset of the app server installed.

I just want that be copied as an image to GCS.

I tried 'gcimagebundle' that said 'platform is not found, you can configure the platform in the python_factory.py file'.

Is there any way that I can copy my snapshot to GCS?

More Information:

sudo gcimagebundle   -d /dev/sda -o /tmp/ --log_file=/tmp/abc.log
***************************************************************************
*                                                                         *
*             !!!!  WARNING: YOU ARE INSIDE LVE !!!!                      *
*IF YOU RESTART ANY SERVICES STABILITY OF YOUR SYSTEM WILL BE COMPROMIZED *
*        CHANGE YOUR USER'S GROUP TO wheel to safely use SU/SUDO          *
*                             MORE INFO:                                  *
*      http://docs.cloudlinux.com/index.html?lve_pam_module.html          *
*                                                                         *
***************************************************************************
Starting logging in /tmp/abc.log
Platform is not supported. Platform rules can be added to platform_factory.py.

os which i used is CentOS 6

  • n1-standard-1 (1 vCPU, 3.8 GB memory)
  • us-central1-b
  • centos-6-v20140415
like image 297
Krishnan Tringer Avatar asked Nov 11 '22 07:11

Krishnan Tringer


1 Answers

There is a recently added capability in Compute Engine that allows you to create an image directly from a persistent disk. Please see the docs at https://developers.google.com/compute/docs/images#creating_an_image_from_a_root_persistent_disk

If you only have the snapshot, you would have to create a persistent disk from your snapshot first, and then use the 'gcloud compute images create' command with that disk as the source-disk

like image 187
Martin Gannholm Avatar answered Nov 15 '22 09:11

Martin Gannholm