Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird der Lebenszyklus einer Compute Engine-Instanz beschrieben, einschließlich der verschiedenen Status, die sie vom Erstellen bis zum Löschen durchlaufen kann. So prüfen Sie den Status einer oder mehrerer Instanzen:
Wenn Sie den Lebenszyklus einer Instanz kennen, können Sie Folgendes effektiver tun:
Probleme mit Instanzen beheben
Instanzressourcen verwalten
Instanzenmigrationen planen
Instanzstatus
Eine Compute-Instanz kann im Verlauf ihres Lebenszyklus verschiedene Status durchlaufen. Wenn eine Instanz erstellt wird, stellt Compute Engine Ressourcen zum Starten der Instanz bereit. Danach wird die Instanz in die Staging-Phase versetzt und für den ersten Bootvorgang vorbereitet. Nach dem Start gilt die Instanz als ausgeführt. Eine laufende Instanz kann bis zu ihrem Löschen wiederholt angehalten und neu gestartet bzw. angehalten und fortgesetzt werden.
Das folgende Diagramm zeigt die verschiedenen Status, in die Compute Engine eine Instanz versetzen kann:
Die im vorherigen Diagramm dargestellten Status sind:
PROVISIONING: In der ersten Phase einer Instanz weist Compute Engine Ressourcen für die Instanz zu.
STAGING: Compute Engine bereitet die Instanz aus einem der folgenden Gründe für den ersten Start vor:
Compute Engine erstellt und konfiguriert die Instanz noch.
Sie oder ein geplanter Vorgang haben einen Neustart oder eine Fortsetzung der Instanz angefordert.
In diesem Status wird die Instanz noch nicht ausgeführt.
RUNNING: Compute Engine startet die Instanz oder die Instanz wird ausgeführt. In diesem Status können Sie die Instanz beenden, aussetzen oder löschen. Außerdem kann Compute Engine die Instanz für geplante Aktionen beenden oder löschen oder sie reparieren, wenn die Instanz Teil einer verwalteten Instanzgruppe (MIG) ist und ein Hardwarefehler auftritt.
PENDING_STOP: Die Instanz wird ordnungsgemäß heruntergefahren. Dieser Herunterfahrvorgang erfolgt nur, wenn Sie Graceful Shutdown aktiviert haben und Sie das Beenden oder Löschen der Instanz angefordert haben oder Compute Engine dies automatisch für ein geplantes Beenden oder Löschen durchführt. Der Instanzstatus ändert sich in STOPPING, wenn eines der folgenden Ereignisse eintritt:
Sie beenden das ordnungsgemäße Herunterfahren manuell.
Der Zeitraum für das ordnungsgemäße Herunterfahren läuft ab. Wenn noch Tasks ausgeführt werden, werden sie von Compute Engine erzwungen.
STOPPING: Das Gastbetriebssystem der Instanz wird heruntergefahren. Dies geschieht in den folgenden Fällen:
Sie oder ein geplanter Vorgang haben das Beenden oder Löschen der Instanz angefordert.
Ein Hardwarefehler ist aufgetreten.
Die Shutdown-Zeit hängt vom Instanztyp ab. Wenn die Instanz jedoch aufgrund eines Hardwarefehlers beendet wird, kann die Shutdown-Zeit variieren. Nachdem Compute Engine das Gastbetriebssystem heruntergefahren hat, wird der Instanzstatus auf TERMINATED gesetzt. Anschließend wird entweder der Stoppvorgang abgeschlossen oder die Instanz und alle angehängten Ressourcen werden gelöscht.
TERMINATED: Compute Engine hat den Stoppvorgang abgeschlossen.
Die angehängten Ressourcen bleiben angehängt, bis Sie sie trennen. In diesem Status bleibt die Instanz angehalten, bis Sie sie neu starten oder löschen.
REPAIRING: Compute Engine repariert die Instanz.
Compute Engine repariert eine Instanz, wenn ein interner Fehler auftritt oder der Hostserver der Instanz aufgrund von Wartungsarbeiten nicht verfügbar ist. Während eine Instanz repariert wird, geschieht Folgendes:
Wenn Compute Engine die Instanz erfolgreich repariert, wird der Instanzstatus auf den ursprünglichen Status vor Beginn des Reparaturvorgangs zurückgesetzt.
Dieser Status kann STAGING, RUNNING, SUSPENDING oder STOPPING sein.
SUSPENDING: Compute Engine hat den Vorgang zum Anhalten der Instanz gestartet, nachdem Sie das Anhalten angefordert haben. In diesem Status können Sie nur warten, bis der Vorgang zum Sperren abgeschlossen ist.
SUSPENDED: Compute Engine hat den Vorgang zum Anhalten abgeschlossen.
In diesem Zustand können Sie die Instanz fortsetzen oder löschen. Wenn eine Instanz länger als 60 Tage im Status SUSPENDED verbleibt, wird sie von Compute Engine beendet und ihr Status in TERMINATED geändert.
Hardwarefehler
In seltenen Fällen kann eine Compute-Instanz aufgrund eines unerwarteten Ausfalls, Hardwarefehlers oder eines anderen Systemproblems fehlschlagen. Google empfiehlt, Hardwarefehler zu minimieren, indem Sie nichtflüchtige Speichervolumes verwenden, Ihre Daten regelmäßig sichern und Ihr System so konzipieren, dass ein einzelner Instanzausfall keine schwerwiegenden Auswirkungen hat. Weitere Informationen finden Sie unter Robuste Systeme konzipieren.
Wenn bei einer Instanz ein Fehler auftritt, wird sie von Compute Engine automatisch mit derselben Bootdisk, denselben Metadaten und denselben Instanzeinstellungen neu gestartet. Informationen zum Ändern des Verhaltens beim automatischen Neustart einer Instanz finden Sie unter VM-Hostwartungsrichtlinie festlegen.
Preise
Die Abrechnung für eine Compute-Instanz erfolgt so:
Die CPU-Nutzung wird Ihnen in Rechnung gestellt, wenn sich die Instanz in den folgenden Status befindet:
RUNNING
PENDING_STOP
Für die Arbeitsspeichernutzung werden Gebühren berechnet, wenn sich die Instanz in den folgenden Status befindet:
RUNNING
PENDING_STOP
SUSPENDING
SUSPENDED
Für angehängte Ressourcen wie Festplatten oder externe IP-Adressen werden Ihnen Gebühren berechnet, solange die Ressourcen vorhanden sind, unabhängig vom Instanzstatus.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-03 (UTC)."],[[["\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)."]]