While I believe this to be the case (not 100% sure) at one point I may have been able to create a GCE machine image of a preemptible/spot GCE instance...and then using that image build a new GCE VM instance with a non-preemptible setting.

And yet I'm stumped / continually getting errors when trying to do this lately, with the GCP console/cli output giving me the following error:

Invalid value for field 'resource.scheduling.provisioningModel': 'STANDARD'. For preemptible, only allowed provisioning_model value is SPOT.

My gut tells me that before Google introduced the Spot VMs (to replace the previous preemptible offering/setting on VM creation) this capability has been lost.

At the end of the day, I have a Spot VM instance that I used for testing...and now I want to deploy a standard VM that runs 24/7 which is a copy of that Spot VM instance as a starting point as I continue to utilize it. But unfortunately it appears I am unable to do so.

Any feedback or ideas on this would be greatly appreciated. Thank you.


Yes, it is possible. These are the steps to accomplish that:

  1. Take a snapshot of the preemptible boot disk with the command:
gcloud compute snapshots create $SNAPSHOT_NAME --source-disk $DISK_NAME --source-disk-zone $ZONE
  1. Create a new instance from the snapshot created with the command:
gcloud compute instances create $INSTANCE_NAME  --source-snapshot=$SNAPSHOT_NAME --boot-disk-device-name=$DISK_NAME --zone=$ZONE

Should see and output like this one:

NAME: non-preempt
ZONE: us-central1-a
MACHINE_TYPE: n1-standard-1
INTERNAL_IP: x.x.x.x
EXTERNAL_IP: x.x.x.x

A non-preemptible VM was created out of the preemptible boot disk.

Take a look at Create and manage disk snapshots and Create a new VM from a boot disk snapshot documentation.