Stay organized with collections Save and categorize content based on your preferences.
This document explains the lifecycle of a Compute Engine instance, covering the various states it can go through from creation to deletion. To learn how to check the state of one or more instances, see the following:
By understanding the lifecycle of an instance, you can do the following more effectively:
Troubleshoot instance issues.
Manage instance resources.
Plan instance migrations.
A compute instance can transition through different states as part of its lifecycle. When creating an instance, Compute Engine provisions resources to start it, after which the instance moves into staging and prepares for first boot. After the instance starts, it's considered running. A running instance can be repeatedly stopped and restarted, or suspended and resumed, until its deletion.
The following diagram shows the different states that Compute Engine can set an instance to:
The states shown in the preceding diagram are as follows:
PROVISIONING
: in the first stage of an instance, Compute Engine allocates resources for the instance.
STAGING
: Compute Engine is preparing the instance for first boot due to one of the following reasons:
Compute Engine is still creating and configuring the instance.
You, or a scheduled operation, have requested to restart or resume the instance.
In this state, the instance isn't running yet.
RUNNING
: Compute Engine is booting up the instance, or the instance is running. In this state, you can stop, suspend, or delete the instance. Additionally, Compute Engine can stop or delete the instance for scheduled actions, or repair it if the instance is part of a managed instance group (MIG) and a hardware error occurs.
PENDING_STOP
: the instance is gracefully shutting down. This shutdown process happens only if you've enabled graceful shutdown and you've requested to stop or delete the instance, or Compute Engine is doing so automatically for a scheduled stop or deletion. The instance state changes to STOPPING
when one of the following happens:
You manually end the graceful shutdown.
The graceful shutdown period times out. If any tasks are still running, then Compute Engine forcefully stops them.
STOPPING
: the instance is shutting down its guest OS, which happens in the following scenarios:
You, or a scheduled operation, have requested to stop or delete the instance.
A hardware error occurred.
The shutdown time depends on the instance type; however, if the instance is stopping due to a hardware error, the shutdown time might vary. After Compute Engine shuts down the guest OS, it sets the instance state to TERMINATED
, and then either completes the stop operation or deletes the instance and all attached resources.
TERMINATED
: Compute Engine has completed the stop operation. The attached resources remain attached unless you detach them. In this state, the instance remains stopped until you restart or delete it.
REPAIRING
: Compute Engine is repairing the instance. Compute Engine repairs an instance if it encounters an internal error or the instance's host server is unavailable due to maintenance. While an instance is in repair, the following happens:
You can't use it.
The service level agreement (SLA) doesn't cover it.
If Compute Engine successfully repairs the instance, then it returns the instance state to its original state before the repair operation began. This state can be STAGING
, RUNNING
, SUSPENDING
, or STOPPING
.
SUSPENDING
: Compute Engine has started the suspend operation of the instance after you've requested to suspend it. In this state, you can only wait for the suspend operation to complete.
SUSPENDED
: Compute Engine has completed the suspend operation. In this state, you can resume or delete the instance. If an instance remains in the SUSPENDED
state for more than 60 days, then Compute Engine stops the instance and transitions its state to TERMINATED
.
Rarely, a compute instance might fail due to an unexpected outage, hardware error, or another system issue. Google recommends mitigating hardware failures by using persistent storage volumes, routinely backing up your data, and designing your system so that a single instance failure isn't catastrophic. For more information, see how to design robust systems.
If an instance fails, then Compute Engine automatically restarts the instance using the same boot disk, metadata, and instance settings. To modify the automatic restart behavior of an instance, see Set VM host maintenance policy.
PricingYou're charged for a compute instance as follows:
For CPU usage, you're charged when the instance is in the following states:
RUNNING
PENDING_STOP
For memory usage, you're charged when the instance is in the following states:
RUNNING
PENDING_STOP
SUSPENDING
SUSPENDED
For attached resources like disks or external IP addresses, you're charged until the resources exist, regardless of the instance state.
For more information, see VM instance pricing.
What's nextLearn how to view the state of one or more compute instances:
Learn more about suspending, stopping, or resetting instances.
Learn more about live migration during maintenance events.
Learn how to delete an instance.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["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 2025-08-07 UTC."],[[["Compute Engine instances transition through various states, including `PROVISIONING`, `STAGING`, `RUNNING`, `PENDING_STOP`, `STOPPING`, `TERMINATED`, `REPAIRING`, `SUSPENDING`, and `SUSPENDED`, each representing a different stage in the instance lifecycle."],["Understanding the lifecycle states of a Compute Engine instance is crucial for effective troubleshooting, managing resources, and planning instance migrations."],["Instances in `RUNNING` and `PENDING_STOP` states incur charges for CPU and memory usage, while memory charges also apply during `SUSPENDING` and `SUSPENDED` states, and resources like disks and IP addresses are charged regardless of the instance's current state."],["Compute Engine automatically restarts failed instances, but this behavior can be modified through the VM host maintenance policy settings."],["The shutdown process of an instance may be graceful, provided that the user enabled graceful shutdown, otherwise the instance will be forced to shut down upon request."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4