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

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Compute Engine > VM instances and select the instance to review.

  4. Open the instance details and locate the Availability policy / Provisioning model section.

  5. Verify that the VM provisioning model is set to Standard rather than Spot or Preemptible.

  6. If a production or availability-sensitive instance is provisioned as Spot/Preemptible, follow the implementation steps.

Implementation Steps

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Compute Engine > VM instances.

  4. Note that the provisioning model (Spot/Preemptible versus Standard) generally cannot be changed on an existing instance and requires creating a replacement instance.

  5. Create a new instance (or update the instance template, for Managed Instance Groups) with the Provisioning model set to Standard.

  6. Migrate the workload to the new Standard instance, verifying functionality.

  7. Delete the original Preemptible/Spot instance once the migration is verified.

Backout Plan

  1. Sign in to the Google Cloud Console at https://console.cloud.google.com.

  2. Select the relevant project.

  3. Navigate to Compute Engine > VM instances.

  4. 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.

  5. Migrate the workload to the new instance and verify functionality.

  6. Delete the original Standard instance once the migration is verified.

Reference