DEV Community

Cover image for Part-14: Google Compute Engine (GCE) – Live Migration & Availability Policy Explained πŸš€
Latchu@DevOps
Latchu@DevOps

Posted on

Part-14: Google Compute Engine (GCE) – Live Migration & Availability Policy Explained πŸš€

When running workloads on Google Cloud Platform (GCP), one common concern is ensuring high availability of Virtual Machines (VMs) during planned or unplanned maintenance on the underlying host systems.

This is where GCE Live Migration & Availability Policies come into play. Let’s break it down πŸ‘‡


πŸ”Ή Who Manages Software & Hardware Updates?

Our Teams:

We manage VM instance-level updates (OS patches, configuration management) using VM Manager.

  • Patch Management
  • OS Configuration Policies

GCP Teams:

  • Google Cloud takes care of the host-level hardware and software updates for Compute Engine hosts.

This division ensures that we only worry about VM-level maintenance, while GCP ensures the underlying infrastructure remains healthy.

live-migration-policy


πŸ”Ή What is Live Migration?

Live Migration allows your VM instances to keep running even when the underlying host system undergoes maintenance or upgrades.

βœ… Benefits of Live Migration:

Keeps VMs running during GCP maintenance events

Covers scenarios like:

  • Hardware and infrastructure upgrades
  • Power grid or network maintenance
  • Regular system patching

In short β†’ Live Migration = Zero Downtime During GCP Maintenance


πŸ”Ή What Happens During Live Migration?

When a host machine is scheduled for maintenance:

  • Running VMs are migrated automatically to another host in the same zone.
  • VM settings and metadata remain unchanged.
  • No manual intervention required.

πŸ‘‰ Supported: VMs with local SSDs
πŸ‘‰ Not Supported: GPUs, Spot VMs, and Preemptible VMs

l-m-1


πŸ”Ή Availability Policy Settings in GCP

When creating a VM instance, you configure Availability Policies to define what should happen in different scenarios.

1️⃣ On Host Maintenance

What should happen during regular maintenance?

  • Migrate VM Instance (Recommended) β†’ VM is live migrated to another host (Best option for availability)
  • Terminate VM Instance β†’ VM stops when host is under maintenance

2️⃣ Automatic Restart

What should happen if VMs are terminated due to non-user initiated reasons (like crashes)?

  • Automatic Restart ON (Recommended) β†’ VM restarts automatically
  • Automatic Restart OFF β†’ VM stays stopped until you manually start it

l-m-2


πŸ”Ή Best Practices

  • Always enable Live Migration (Migrate VM Instance) unless you have workloads that don’t support it.
  • Keep Automatic Restart ON for production workloads.
  • Use VM Manager to stay on top of guest OS updates while relying on GCP for host maintenance.

πŸ“ Final Thoughts

GCE Live Migration & Availability Policies ensure your VMs continue running seamlessly during Google’s backend upgrades or infrastructure events.

By choosing the right availability policies, you can maximize uptime and ensure your workloads stay resilient with minimal manual intervention.

πŸ’‘ In short β†’ You manage the VMs, GCP manages the hosts, and Live Migration bridges the gap!

Top comments (0)