Description
Ensure that Compute Engine VM instances supporting production or availability-sensitive workloads are not configured as Preemptible or Spot VMs, which can be terminated by Google Cloud at any time with little advance notice.
Rationale
Preemptible and Spot VMs offer significantly reduced pricing in exchange for the possibility that Google Cloud can reclaim the instance at any time, typically with only a short notice period, and such instances also have a maximum runtime. For workloads requiring high availability or consistent uptime, this behavior is unsuitable, since unexpected termination can cause service disruption, incomplete transactions, or data loss if the workload is not specifically designed to tolerate interruption (for example, stateless, checkpointed, or batch-style processing).
Impact
Ensures production or availability-sensitive workloads are not subject to unexpected preemption
Avoids service disruption from Google Cloud reclaiming compute capacity with short notice
Results in higher compute cost compared to Preemptible/Spot pricing, which should be weighed against the availability requirement
Default Value
By default, newly created VM instances are standard (non-preemptible, non-Spot) instances unless Preemptible or Spot provisioning is explicitly selected at creation.
Pre-Requisites
IAM permissions to view and edit Compute Engine instance settings (e.g., Compute Instance Admin)
Confirmation of which workloads are appropriately tolerant of preemption versus those that are not
Test Plan
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances and select the instance to review.
Open the instance details and locate the Availability policy / Provisioning model section.
Verify that the VM provisioning model is set to Standard rather than Spot or Preemptible.
If a production or availability-sensitive instance is provisioned as Spot/Preemptible, follow the implementation steps.
Implementation Steps
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances.
Note that the provisioning model (Spot/Preemptible versus Standard) generally cannot be changed on an existing instance and requires creating a replacement instance.
Create a new instance (or update the instance template, for Managed Instance Groups) with the Provisioning model set to Standard.
Migrate the workload to the new Standard instance, verifying functionality.
Delete the original Preemptible/Spot instance once the migration is verified.
Backout Plan
Sign in to the Google Cloud Console at https://console.cloud.google.com.
Select the relevant project.
Navigate to Compute Engine > VM instances.
Create a new instance (or update the instance template) with the Provisioning model set to Spot or Preemptible, if reverting to reduced-cost provisioning is intended.
Migrate the workload to the new instance and verify functionality.
Delete the original Standard instance once the migration is verified.
Reference