Suspend or resume a Compute Engine instance
Stay organized with collections
Save and categorize content based on your preferences.
Linux
Windows
This document explains how to suspend or resume Compute Engine instances. To
learn more about suspending, stopping, or resetting instances, see
Suspend, stop, or reset Compute Engine instances.
If you want to keep your Compute Engine instance around, but you don't
want to incur charges for it when the instance isn't in use, then you can
suspend the instance. Suspending an instance preserves the instance and migrates
the contents of the instance's memory to storage. After resuming the instance,
Compute Engine migrates the instance's memory from storage back to the
instance, and the instance starts running again.
Suspending a Compute Engine instance is useful for the following:
Development and test environments that are not being fully used during off
periods, such as during evenings or weekends, and that you want to maintain
for costs saving or faster initialization than creating new instances.
Applications that require a long period of initialization after the instance
has finished booting, but before the application is ready to service its
first request, such as virtual developer workstations or complex Java
applications.
Limitations
When you suspend a compute instance, the following limitations apply:
You can only suspend an instance if the guest OS supports it. For more
information, see
Operating system details.
You can only suspend an instance that uses the following OS images if
you configure their OS, as described in this document:
Debian 8 or 9
Any Windows OS
You can suspend an instance for only up to 60 days before
Compute Engine automatically transitions its state to TERMINATED.
You can suspend Spot VMs or preemptible
instances—however, if Compute Engine preempts the instance
before the suspend operation completes, Compute Engine ends the
suspend operation and preempts the instance.
You can't suspend instances by using the standard processes that are
built into their guest environment. Commands such as systemctl suspend
in Ubuntu 16.04 or later aren't supported. If called, then
Compute Engine ignores the in-guest signal.
You can't suspend the following types of instances:
Bare metal instances.
Confidential VMs.
Instances that have GPUs or TPUs attached.
Instances that have more than 208 GB of memory.
Instances that have CSEK-protected (Deprecated)
disks attached.
Before you begin
Verify that your project has sufficient Persistent disk standard (GB) quota in the region where the instance is
located. When you suspend an instance, Compute Engine stores the instance's memory in persistent storage, which consumes the Persistent disk standard (GB) quota. This requirement applies to all instances, including instances that
only have Google Cloud Hyperdisk volumes attached. For more information, see
Disk quotas and
Troubleshoot insufficient disk quota.
If you haven't already, set up authentication.
Authentication verifies your identity for access to Google Cloud services and APIs. To run
code or samples from a local development environment, you can authenticate to
Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and
APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
To use the Go samples on this page in a local development environment, install and
initialize the gcloud CLI, and then set up Application Default Credentials with
your user credentials.
To use the Java samples on this page in a local development environment, install and
initialize the gcloud CLI, and then set up Application Default Credentials with
your user credentials.
To use the Node.js samples on this page in a local development environment, install and
initialize the gcloud CLI, and then set up Application Default Credentials with
your user credentials.
To use the PHP samples on this page in a local development environment, install and
initialize the gcloud CLI, and then set up Application Default Credentials with
your user credentials.
To use the Python samples on this page in a local development environment, install and
initialize the gcloud CLI, and then set up Application Default Credentials with
your user credentials.
This predefined role contains
the permissions required to suspend or resume a compute instance. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to suspend or resume a compute instance:
If your compute instance uses Debian 8 or 9 as its guest OS, or any Windows
OS, then you must configure the OS before you can suspend and resume instances.
If your instance uses a different guest OS, then skip this section.
Enable suspend operations on Debian 8 or 9
Before you can suspend or resume compute instances that use Debian 8 or 9 as
a guest OS, you must configure the guest OS by using one of the following
methods:
To enable the suspend and resume operation in Debian 8 or 9, you can configure
the
Advanced Configuration and Power Interface events Daemon (ACPID)
to handle the sleep button event. After you enable the deep sleep button event,
you can add a shell script for handling the sleep event as described in this
section.
To configure the ACPID to support suspend and resume operations, do the
following:
To suspend an instance that uses a Windows guest OS, you must disable
hibernation in the OS. If you imported a Windows image, then hibernation
might be enabled by default, and you must disable it to suspend the
instance.
To disable hibernation in Windows, follow these steps:
If the guest OS of your compute instance is using Debian 8 or 9, then, before
suspending the instance, you must
configure the guest OS to support suspend and resume
operations as described in this document.
To suspend an instance, use of the following methods based on whether the
instance has Local SSD disks attached:
You can suspend multiple compute instances simultaneously or individual
instances. For multiple instances, use the Google Cloud console or, for instances
located in the same zone, the Google Cloud CLI. For individual instances, select
any of the following options:
Based on how many compute instances you want to suspend simultaneously and
whether you need to preserve the data of their attached Local SSD disks, do the
following:
To preserve the data of the Local SSD disks attached to an instance
(excluding instances with Titanium SSD disks), suspend the instance using the
gcloud CLI or REST API.
To suspend multiple instances simultaneously, use the Google Cloud console
or, for instances located in the same zone, the gcloud CLI.
To suspend one or more instances that have Local SSD disks attached, select one
of the following options:
Before resuming a suspended compute instance, consider the following:
You can resume an instance only if there is sufficient capacity in the zone
where the instance is located. This isn't usually a problem. If you have
troubles resuming an instance, then try again later.
If you attached Local SSD disks to the instance and chose to preserve Local
SSD data when suspending it, then you might need to remount the Local SSD
disks after resuming it. For more information, see how to remount non-boot
disks on Linux instances or
Windows instances.
You can resume multiple instances simultaneously or individual instances. For
multiple instances, use the Google Cloud console or, for instances located in
the same zone, the gcloud CLI. For individual instances, select any
of the following options:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-02 UTC."],[],[]]