Suspend, stop, or reset Compute Engine instances


This document gives an overview of the suspend, stop, or reset operations that you can use on a Compute Engine instance. To learn how to perform these operations, see instead the following:

You can suspend, stop, or reset an instance to do the following:

  • Save costs.

  • Perform maintenance.

  • Troubleshoot issues.

  • Free up resources.

You can repeatedly suspend and resume, stop and restart, or reset a running instance throughout its lifecycle until the instance is deleted.

Understand instance operations

Based on your workload and cost needs, you can suspend, stop, or reset a compute instance:

Suspend an instance

When you suspend an instance, this action is similar to closing the lid of your laptop. We recommend that you suspend an instance in the following scenarios:

  • You want to save money by no longer paying for the core and memory costs of running an instance, but still pay for storage to preserve its state.

  • You don't need the instance at this time, but you want to be able to bring it back up quickly with its OS and application state where you left it.

For more information, see Suspend operation in this document.

Stop an instance

When you stop an instance, this action is similar to shutting down your laptop. We recommend that you stop an instance in the following scenarios:

  • You no longer need the instance, but you want to remove and reuse the resources attached to the instance—such as its internal IP addresses or Google Cloud Hyperdisk volumes.

  • You don't need to preserve the guest OS memory, device state, or application state.

  • You want to change certain properties of the instance and you need to stop the instance to make these changes.

For more information, see Stop operation in this document.

Reset an instance

When you reset an instance, this action is similar to doing a reset of your computer, such as when you press a reset button or press and hold the power button. A reset operation doesn't perform a graceful reboot, and loss of unsaved data is possible. We recommend that you reset an instance in the following scenarios:

  • You want to re-initialize the instance to its boot state to help ensure optimal performance and stability.

  • You want to resume your workload after your guest OS has crashed and is unresponsive, and you have no other options than resetting the instance.

For more information, see Reset operation in this document.

For an overview of the differences between the stop, suspend, and reset operations for an instance, see the comparison table in this document.

Suspend operation

When you suspend a compute instance, the following occurs:

  1. Compute Engine sends an Advanced Configuration and Power Interface (ACPI) G1 Sleeping signal to the guest OS and changes the instance state to SUSPENDING. Then, Compute Engine uses persistent storage to store the following:

    • The guest OS memory

    • The device state

    • The application state of the instance

    The storing operation might take some time to complete, depending on the amount of data to store.

  2. After Compute Engine has completed storing the data, the instance state transitions to SUSPENDED within a few seconds, and the suspend operation completes. All resources attached to the instance, like disks and static IP addresses, remain attached to the instance. However, any ephemeral IP addresses are released unless you promote them to a static IP address.

Unless you resume or delete the instance, the instance remains in the SUSPENDED state for up to 60 days. After that time, Compute Engine transitions the instance state to TERMINATED, and the instance loses the preserved guest OS memory, device state, and application state.

Stop operation

When you stop or delete a compute instance, or Compute Engine does so for a scheduled stop or deletion, the following occurs:

  1. If graceful shutdown is enabled, then the instance enters the PENDING_STOP state, giving you time to finish running tasks before the shutdown process begins. The instance remains in this state until the graceful shutdown process times out or you manually end it.

  2. Compute Engine sends the ACPI G2 Soft Off signal to the guest OS in the instance, and then sets the instance state to STOPPING. Unless you specified to skip the guest OS shutdown, the time that the guest OS has to cleanly shut down depends on the instance type as follows:

    • Spot VMs: for Spot VMs and preemptible instances, the guest OS shuts down in 30 seconds. This period is the same length as the preemption process.

    • Other instance types: for any other instance types, the guest OS shuts down in 120 seconds.

  3. After the guest OS has shut down, Compute Engine sends the ACPI G3 Mechanical Off signal to instance, and, depending on the operation that is running, does one of the following:

    • For stop operations: Compute Engine sets the instance state to TERMINATED within a few seconds, and the stop operation completes. The instance retains its attached resources, configuration settings, internal IP addresses, MAC addresses, and metadata.

    • For delete operations: Compute Engine deletes the instance and all attached resources within a few seconds.

Reset operation

When you reset a compute instance, Compute Engine immediately restarts the instance without sending an ACPI shutdown signal to the guest OS, bypassing any shutdown procedure. When your reset an instance, Compute Engine does the following:

  • Compute Engine re-initializes the instance to its initial boot state, but doesn't modify instance metadata or attached disks.

  • Compute Engine wipes the contents of the instance's memory.

  • Compute Engine keeps the instance state to RUNNING throughout the reset operation.

The reset operation doesn't change any instance properties. The instance retains its ephemeral IPs, static external IPs, attached disks, machine type, and Local SSD disks (if any).

Comparison table

The following table shows how stop, suspend, and reset operations affect a compute instance and its attached resources:

Suspend an instance Stop an instance Reset an instance
Billing While an instance is in the SUSPENDING or SUSPENDED state, you don't incur charges for CPU usage. However, you keep incurring charges for the resources attached to the instance until you delete them. While an instance is in the STOPPING or TERMINATED state, you don't incur charges for CPU usage. However, you keep incurring charges for the resources attached to the instance until you delete them. Because the instance remains in the RUNNING state when it's resetting, you keep incurring charges for the instance at the same rate as a running instance.
Instance state SUSPENDED TERMINATED RUNNING
Attached disks Attached disks are maintained and you keep incurring charges for them. Attached disks are maintained and you keep incurring charges for them. Attached disks are maintained and you keep incurring charges for them.
Memory and instance state The guest OS and application state are preserved and restored when the instance is resumed.

You incur charges at a specific rate for storing the preserved data. For more information, see the pricing for suspended instances.
The instance resets to power-on state and no data is saved. The instance resets to power-on state and no data is saved.
GPUs Not supported.

If a GPU is attached to an instance, then you can't suspend the instance.
You don't incur charges for GPUs when an instance is stopped.

A GPU that is attached to an instance with a TERMINATED state doesn't count against your project quota.
You incur charges at standard GPU prices.
Local SSD disks When you suspend an instance, you can choose whether to discard or preserve the data on the attached Local SSD disks.

If you opt to preserve Local SSD data (Preview), then Compute Engine migrates the Local SSD data to durable storage, and you incur charges for the used storage space until you resume or delete the instance.
When you stop an instance, you can choose whether to discard or preserve the data on the attached Local SSD disks.

If you opt to preserve Local SSD data (Preview), then Compute Engine migrates the Local SSD data to durable storage, and you incur charges for the used storage space until you restart or delete the instance.
Local SSD disks and their data are maintained; however, resetting an instance can cause data loss or corrupt file systems.
External ephemeral IP addresses Compute Engine releases ephemeral IP addresses when an instance is suspended, and it assigns a new ephemeral IP address to the instance when the instance resumes. To retain an external IP address, promote it to a static IP address. Compute Engine releases ephemeral IP addresses when an instance is stopped, and it assigns a new ephemeral IP address to the instance when the instance restarts. To retain an external IP address, promote it to a static IP address. Ephemeral IP addresses are maintained.
External static IP addresses Static external IP addresses are maintained.

If you reserve a static external IP address and don't assign it to an instance, then you're charged at a higher rate than for static and ephemeral external IP addresses that are in use. For more information, see External IP address pricing.
Static external IP addresses are maintained.

If you reserve a static external IP address and don't assign it to an instance, or you assign it an instance in the TERMINATED state, then you're charged at a higher rate than for static and ephemeral external IP addresses that are in use. For more information, see External IP address pricing.
Static external IP addresses are maintained.
Internal IP or MAC addresses Internal IP and MAC addresses are maintained. Internal IP and MAC addresses are maintained. Internal IP and MAC addresses are maintained.
VM metadata VM metadata is maintained. VM metadata is maintained. VM metadata is maintained.

Pricing

The following sections outlines the pricing for stop, suspend, or reset operations for a compute instance.

Pricing for suspending an instance

After a compute instance state transitions to SUSPENDING, you no longer incur charges for CPU usage. However, you continue incurring charges for the following resources attached to the instance until you delete them:

  • The instance's memory.

  • Any disks attached attached to the instance.

  • Any static IP addresses assigned to the instance.

Additionally, you might still incur charges for your software license fees. For example, if you suspend Windows Server instances, you don't incur charges for Windows Server license fees. However, you might still incur charges for other types of licenses.

For more information, see the pricing for suspended instances.

Pricing for stopping an instance

After a compute instance state transitions to STOPPING, you no longer incur charges for CPU usage. However, you continue incurring charges for any resources attached to the instance, such as disks and external IP addresses, until you delete them.

For more information, see Instance uptime.

Pricing for resetting an instance

Since the state of a compute instance remains RUNNING when you reset it, you continue to incur charges for the instance at the same rate as a running instance.

For more information, see VM instance pricing.

What's next