Create Instance from snapshot using skd

477 views
Skip to first unread message

escufi

unread,
Jun 15, 2015, 9:42:34 AM6/15/15
to gce-dis...@googlegroups.com
Hello All,

I'm trying to create a script that creates a snapshot from a running machine and after that, create another machine ( with different name) in order to make tests.

The problem is , when i tried to create instance with "$gcloud compute instances create..." it is not posible to create instance from a snapshot.... 

Anybody can help me ?

Kamran (Google Cloud Support)

unread,
Jun 15, 2015, 10:39:01 AM6/15/15
to gce-dis...@googlegroups.com, esc...@gmail.com

In order to create a VM instance from a snapshot, first you will need to create a disk from the snapshot [1] and then create the VM instance from the disk [2]. 

Example:

1. gcloud compute disks create "disk-1" --zone "us-central1-f" --source-snapshot "snapshot-1" --type "pd-standard"
2. gcloud compute instances create "instance-1" --zone "us-central1-f" --disk name=disk-1,device-name=instance-1,mode=rw,boot=yes


Sincerely,

Kamran

Xavier Sanchez

unread,
Jun 15, 2015, 10:42:39 AM6/15/15
to Kamran (Google Cloud Support), gce-dis...@googlegroups.com

Thanks Kamran

--
© 2014 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/85527e93-5151-42a1-af4b-fd01d691d300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages