[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-04。"],[[["\u003cp\u003eCompute Engine instances transition through various states, including \u003ccode\u003ePROVISIONING\u003c/code\u003e, \u003ccode\u003eSTAGING\u003c/code\u003e, \u003ccode\u003eRUNNING\u003c/code\u003e, \u003ccode\u003ePENDING_STOP\u003c/code\u003e, \u003ccode\u003eSTOPPING\u003c/code\u003e, \u003ccode\u003eTERMINATED\u003c/code\u003e, \u003ccode\u003eREPAIRING\u003c/code\u003e, \u003ccode\u003eSUSPENDING\u003c/code\u003e, and \u003ccode\u003eSUSPENDED\u003c/code\u003e, each representing a different stage in the instance lifecycle.\u003c/p\u003e\n"],["\u003cp\u003eUnderstanding the lifecycle states of a Compute Engine instance is crucial for effective troubleshooting, managing resources, and planning instance migrations.\u003c/p\u003e\n"],["\u003cp\u003eInstances in \u003ccode\u003eRUNNING\u003c/code\u003e and \u003ccode\u003ePENDING_STOP\u003c/code\u003e states incur charges for CPU and memory usage, while memory charges also apply during \u003ccode\u003eSUSPENDING\u003c/code\u003e and \u003ccode\u003eSUSPENDED\u003c/code\u003e states, and resources like disks and IP addresses are charged regardless of the instance's current state.\u003c/p\u003e\n"],["\u003cp\u003eCompute Engine automatically restarts failed instances, but this behavior can be modified through the VM host maintenance policy settings.\u003c/p\u003e\n"],["\u003cp\u003eThe 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.\u003c/p\u003e\n"]]],[],null,["*** ** * ** ***\n\nThis document explains the lifecycle of a Compute Engine instance, covering\nthe various states it can go through from creation to deletion. To learn how\nto check the state of one or more instances, see the following:\n\n- [View a list of instances](/compute/docs/instances/get-list)\n\n- [View the details of a single instance](/compute/docs/instances/view-vm-details)\n\nBy understanding the lifecycle of an instance, you can do the following more\neffectively:\n\n- Troubleshoot instance issues.\n\n- Manage instance resources.\n\n- Plan instance migrations.\n\nInstance states\n\nA compute instance can transition through different states as part of its\nlifecycle. When creating an instance, Compute Engine provisions\nresources to start it, after which the instance moves into staging and prepares\nfor first boot. After the instance starts, it's considered running. A running\ninstance can be repeatedly stopped and restarted, or suspended and resumed,\nuntil its deletion.\n\nThe following diagram shows the different states that Compute Engine can\nset an instance to:\n\nThe states shown in the preceding diagram are as follows:\n\n- **`PROVISIONING`**: in the first stage of an instance,\n Compute Engine allocates resources for the instance.\n\n- **`STAGING`**: Compute Engine is preparing the instance for first\n boot due to one of the following reasons:\n\n - Compute Engine is still creating and configuring the instance.\n\n - You, or a scheduled operation, have requested to restart or resume the\n instance.\n\n In this state, the instance isn't running yet.\n- **`RUNNING`**: Compute Engine is booting up the instance, or the\n instance is running. In this state, you can stop, suspend, or delete the\n instance. Additionally, Compute Engine can stop or delete the\n instance for scheduled actions, or repair it if the instance is part of\n a managed instance group (MIG) and a hardware error occurs.\n\n- **`PENDING_STOP`** : the instance is gracefully shutting down. This shutdown\n process happens only if you've enabled\n [graceful shutdown](/compute/docs/instances/graceful-shutdown-overview) and\n you've requested to stop or delete the instance, or Compute Engine\n is doing so automatically for a scheduled stop or deletion. The instance\n state changes to `STOPPING` when one of the following happens:\n\n - You manually end the graceful shutdown.\n\n - The graceful shutdown period times out. If any tasks are still running,\n then Compute Engine forcefully stops them.\n\n- **`STOPPING`**: the instance is shutting down its guest OS, which happens in\n the following scenarios:\n\n - You, or a scheduled operation, have requested to stop or delete the\n instance.\n\n - A hardware error occurred.\n\n The shutdown time depends on the\n [instance type](/compute/docs/instances/suspend-stop-reset-instances-overview#stopping-instance);\n however, if the instance is stopping due to a hardware error, the shutdown\n time might vary. After Compute Engine shuts down the guest OS, it\n sets the instance state to `TERMINATED`, and then either completes the stop\n operation or deletes the instance and all attached resources.\n- **`TERMINATED`**: Compute Engine has completed the stop operation.\n The attached resources remain attached unless you detach them. In this\n state, the instance remains stopped until you restart or delete it.\n\n- **`REPAIRING`**: Compute Engine is repairing the instance.\n Compute Engine repairs an instance if it encounters an internal\n error or the instance's host server is unavailable due to maintenance. While\n an instance is in repair, the following happens:\n\n - You can't use it.\n\n - The [service level agreement (SLA)](/compute/sla) doesn't cover it.\n\n If Compute Engine successfully repairs the instance, then it returns\n the instance state to its original state before the repair operation began.\n This state can be `STAGING`, `RUNNING`, `SUSPENDING`, or `STOPPING`.\n- **`SUSPENDING`**: Compute Engine has started the suspend operation\n of the instance after you've requested to suspend it. In this state, you can\n only wait for the suspend operation to complete.\n\n- **`SUSPENDED`** : Compute Engine has completed the suspend operation.\n In this state, you can resume or delete the instance. If an instance remains\n in the `SUSPENDED` state for more than 60 days, then Compute Engine\n stops the instance and transitions its state to `TERMINATED`.\n\nHardware failure\n\nRarely, a compute instance might fail due to an unexpected outage, hardware\nerror, or another system issue. Google recommends mitigating hardware failures\nby using persistent storage volumes, routinely backing up your data, and\ndesigning your system so that a single instance failure isn't catastrophic. For\nmore information, see how to\n[design robust systems](/compute/docs/robustsystems).\n\nIf an instance fails, then Compute Engine automatically restarts the\ninstance using the same boot disk, metadata, and instance settings. To modify\nthe automatic restart behavior of an instance, see\n[Set VM host maintenance policy](/compute/docs/instances/setting-instance-scheduling-options).\n\nPricing\n\nYou're charged for a compute instance as follows:\n\n- For CPU usage, you're charged when the instance is in the following states:\n\n - `RUNNING`\n\n - `PENDING_STOP`\n\n- For memory usage, you're charged when the instance is in the following\n states:\n\n - `RUNNING`\n\n - `PENDING_STOP`\n\n - `SUSPENDING`\n\n - `SUSPENDED`\n\n- For attached resources like disks or external IP addresses, you're charged\n until the resources exist, regardless of the instance state.\n\nFor more information, see [VM instance pricing](/compute/vm-instance-pricing).\n\nWhat's next\n\n- Learn how to view the state of one or more compute instances:\n\n - [Get a list of VMs](/compute/docs/instances/get-list)\n\n - [View the details of a VM](/compute/docs/instances/view-vm-details)\n\n- Learn more about\n [suspending, stopping, or resetting instances](/compute/docs/instances/suspend-stop-reset-instances-overview).\n\n- Learn more about\n [live migration during maintenance events](/compute/docs/instances/live-migration).\n\n- Learn how to\n [delete an instance](/compute/docs/instances/deleting-instance)."]]