What is Compute Engine? Choose VMs, disks, and recovery for your workload
Google Cloud Compute Engine is an IaaS service for virtual machines (VMs) and bare-metal instances. Google operates the physical infrastructure and virtualization layer, while you design and operate the guest OS, applications, access, storage, and backup policy. Choosing a VM is therefore more than picking a machine size: match the machine family to CPU, memory, or accelerator needs, choose a disk and failure domain, and plan how to stop, protect, and recover the instance.
What is Compute Engine? Choose VMs, disks, and recovery for your workload
Google Cloud Compute Engine is an IaaS service for virtual machines (VMs) and bare-metal instances. Google operates the physical infrastructure and virtualization layer, while you design and operate the guest OS, applications, access, storage, and backup policy. Choosing a VM is therefore more than picking a machine size: match the machine family to CPU, memory, or accelerator needs, choose a disk and failure domain, and plan how to stop, protect, and recover the instance.
Who manages what in Compute Engine?
Compute Engine is a self-managed VM service: you choose an operating system, install software, and control instance configuration. You can create and manage resources through the Google Cloud console, gcloud CLI, REST API, or client libraries. Your team manages guest OS updates, accounts and firewall rules, application patching, capacity, data protection, and cost. You do not procure physical servers or operate the hypervisor, but the service does not manage the guest OS for you like an application platform would.
An instance combines a machine type, boot image, disks, network settings, and other configuration into a running computer. A VM is placed in a zone, and zones are separate failure domains within a region. Creating a VM therefore means choosing its image, compute capacity, storage, network, and failure location together.
How should you choose a machine family and type?
First measure whether the workload is constrained by CPU, memory, network, disk, or an accelerator such as a GPU. Compute Engine offers general-purpose, compute-optimized, memory-optimized, storage-optimized, network-optimized, and accelerator-optimized machine families. A family groups hardware designed for workload needs; a machine type specifies a vCPU and memory configuration within a series. Some series allow custom CPU and memory configurations when predefined types do not fit.
General-purpose machines are a reasonable starting point for web servers, business applications, and microservices. Memory-optimized, compute-optimized, or accelerator-optimized families can be candidates for workloads with those specific bottlenecks. Do not infer performance or cost from a family name. Test representative traffic and data, measuring latency, throughput, memory pressure, disk IOPS, and network use. Also verify that the machine type and disk are available in the required zone.
How do regions and zones affect availability?
A region is a geographic area where Google Cloud resources are located; a zone is a separate failure domain within a region. Choose a region based on user and data latency, regional service and machine availability, and data-residency needs. A single VM resides in one zone and can be affected by an outage there.
Automatic restart or host-maintenance policy for one VM is not a complete high-availability design. For greater resilience, consider distributing instances across zones and balancing traffic, for example with a managed instance group. Replicating a data disk across zones does not automatically recover the VM, network, or application. Design and test which components survive and how traffic moves during a zone or regional failure.
How should you configure boot and data disks?
The boot disk holds the operating system and startup files; separate data disks can hold application data. Persistent Disk is network block storage, not a disk physically attached to the host. It can be detached or moved, which lets you preserve data while deleting or replacing a VM. The VM and disk are separate resources, so a disk can continue to incur storage charges after the VM is stopped.
Disk types trade off performance and cost. Standard Persistent Disk can suit large sequential workloads; Balanced offers a cost/performance balance for many applications; SSD is a candidate when low latency and random I/O matter; Extreme lets you provision target IOPS but is limited to certain machine types. Actual performance depends on disk size, VM vCPU count, and service limits, so validate it with the application workload.
Regional Persistent Disk synchronously replicates data across two zones in the same region. This can help disks remain available after a zonal outage, but disk replication alone is not an application-consistent backup or complete VM high availability. Review the performance and cost trade-off if write latency is important.
When should you stop, suspend, or reset an instance?
Stop shuts down the guest OS and leaves the instance in TERMINATED. CPU charges stop, but attached disks and external IP resources can remain billable until deleted. Stop is useful when you want to preserve instance configuration and Persistent Disks while pausing compute. Because compute resources return to the zone, a restart can fail if capacity is unavailable.
Suspend saves guest memory, device state, and application state, then places the VM in SUSPENDED. It can resume closer to its previous state, but stored memory and attached resources can still incur charges. A suspended instance can remain suspended for up to 60 days before Compute Engine changes it to TERMINATED. Not every VM type or configuration supports suspension, so check first.
Reset immediately reinitializes the VM without a graceful OS shutdown. Unsaved data can be lost and the file system can be damaged, so treat reset as a last resort when the guest OS is unresponsive. For a normal restart, use the OS or a supported restart operation. Before maintenance, check in-flight writes and application shutdown behavior.
Which costs remain when a VM is off?
CPU and memory charges depend on instance state, but attached resources such as disks and static external IPs can continue to cost money while the VM is stopped. Suspension can retain memory state and incur memory-related charges. Deletion removes the VM configuration, and attached resources might also be permanently deleted depending on deletion settings. Do not assume an accidentally deleted VM or disk can be recovered.
For development and test environments, scheduled stops can reduce compute use, but include data disks, IPs, images, snapshots, and backup retention in the total. Savings depend on current prices, machine type, licensing, and attached resources; confirm them in your project’s pricing and billing data. This article does not assert a fixed price or savings percentage because those inputs change.
How should you design backup and recovery?
Compute Engine does not automatically back up VMs or disks. Configure a protection method based on your goal: snapshot schedules, standard or archive snapshots, machine images, Backup and DR Service, or replication. Snapshots can protect disk data at a point in time; machine images can help clone or recover an instance with its configuration and multiple attached disks. Check retention, storage location, permissions, and deletion protection for every method.
A machine image can capture multiple disks at a crash-consistent point, but that does not guarantee application-level transaction consistency. It also does not include memory state or Local SSD data. For a database, coordinate an application or OS quiesce/flush operation, or use database-native backups as well. Define RPO (acceptable age of recovered data) and RTO (acceptable service recovery time), then restore to a new VM or disk and verify connectivity, permissions, and data consistency.
Example: designing a VM for a nightly batch job
Assume a batch job processes data for a few hours each night and its completed output must be kept until the next day. Measure CPU and memory against the input size, then determine whether processing or sequential disk I/O is the bottleneck. If compute-bound, compare a compute-optimized and a general-purpose family on representative data. If sequential reads or writes dominate, test disk type and throughput too. When the job completes, stopping the VM can pause compute use, but the data disk and backups remain and can still cost money.
Make the job safe to rerun and ensure it records completion only after output is durable. An OS image or machine image can help recreate a failed VM; configure snapshots or application backups separately for data recovery. If the job must survive a zone outage, compare a single VM restart with multi-zone execution, replication, and recovery automation against the required RTO/RPO. This is an illustrative scenario, not a cost or performance claim.
When should you consider a different service?
Compute Engine fits when you need OS- and VM-level control or must move existing server software into virtual machines. If you want container scheduling and cluster automation, Google Kubernetes Engine may fit better; if you want to run code with managed scaling, consider Cloud Run; and if you want less runtime management for an application, consider App Engine. Each service has different runtime constraints, responsibilities, and pricing. Compare the control you need, operational capacity, and recovery goals rather than only asking whether the existing app can be moved unchanged.
References
[Google Cloud docs: Compute Engine overview](https://docs.cloud.google.com/compute/docs/overview)
[Google Cloud docs: Machine families resource and comparison guide](https://docs.cloud.google.com/compute/docs/machine-resource)
[Google Cloud docs: Compute Engine instance lifecycle](https://docs.cloud.google.com/compute/docs/instances/instance-lifecycle)
[Google Cloud docs: Suspend, stop, or reset instances](https://docs.cloud.google.com/compute/docs/instances/suspend-stop-reset-instances-overview)
[Google Cloud docs: Persistent Disk](https://docs.cloud.google.com/compute/docs/disks/persistent-disks)
[Google Cloud docs: Machine images](https://docs.cloud.google.com/compute/docs/machine-images)
[Google Cloud docs: Data protection options for disks and instances](https://docs.cloud.google.com/compute/docs/disks/data-protection)
[Google Cloud docs: Create a VM with a custom machine type](https://docs.cloud.google.com/compute/docs/instances/creating-instance-with-custom-machine-type)
Google Cloud documentation was checked on 2026-11-20. Machine-family and disk support, regional availability, prices, and feature stages can change; check current documentation before deployment.