We’ve just released a feature to GA which allows you to detach and re-attach boot disks to GCE VMs.
Using this feature, you may now restore a VM from snapshot by:
1. Stopping the instance – (e.g. gcloud compute instances stop INSTANCE_NAME —zone INSTANCE_ZONE)
2. Detaching the boot disk from the VM in question ($ gcloud compute instances detach-disk INSTANCE_NAME —disk DISK_NAME —zone INSTANCE_ZONE)
2. Creating a disk from the snapshot in question
3. Attaching the disk from step 2 to the VM as the boot disk ($ gcloud compute instances attach-disk INSTANCE_NAME —disk NEW_DISK_NAME —boot —zone INSTANCE_ZONE)
After restore, the VM will keep its IP address and other properties (e.g. tags, labels, etc.).
See more info about the feature in the docs:
Down the road, we’re also planning to improve this flow to be “one-click easy.” More updates to come.NIc Boyde commented
Snapshots cannot be used to restore an instance. They can be used to start a new instance, but that instance, of course, has a different ip address. This process is nowhere (that I can find) described in full. The documentation skirts the issue - and should not.NIc Boyde supported this idea ·