Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se explica el ciclo de vida de una instancia de Compute Engine, incluidos los distintos estados por los que puede pasar desde su creación hasta su eliminación. Para obtener información sobre cómo verificar el estado de una o más instancias, consulta lo siguiente:
Si comprendes el ciclo de vida de una instancia, puedes hacer lo siguiente de manera más eficaz:
Solucionar problemas de instancias
Administrar los recursos de la instancia
Planificar migraciones de instancias
Estados de la instancia
Una instancia de procesamiento puede pasar por diferentes estados como parte de su ciclo de vida. Cuando creas una instancia, Compute Engine aprovisiona recursos para iniciarla. Luego, la instancia pasa a la etapa de pruebas y se prepara para el primer inicio. Después de que se inicia la instancia, se considera que está en ejecución. Una instancia en ejecución se puede detener y reiniciar o suspender y reanudar varias veces hasta que se borre.
En el siguiente diagrama, se muestran los diferentes estados en los que Compute Engine puede establecer una instancia:
Los estados que se muestran en el diagrama anterior son los siguientes:
PROVISIONING: En la primera etapa de una instancia, Compute Engine asigna recursos para la instancia.
STAGING: Compute Engine está preparando la instancia para el primer inicio debido a uno de los siguientes motivos:
Compute Engine aún está creando y configurando la instancia.
Tú o una operación programada solicitaron reiniciar o reanudar la instancia.
En este estado, la instancia aún no se está ejecutando.
RUNNING: Compute Engine está iniciando la instancia o la instancia se está ejecutando. En este estado, puedes detener, suspender o borrar la instancia. Además, Compute Engine puede detener o borrar la instancia para realizar acciones programadas, o bien repararla si forma parte de un grupo de instancias administrado (MIG) y se produce un error de hardware.
PENDING_STOP: La instancia se está cerrando de forma correcta. Este proceso de cierre solo se produce si habilitaste el cierre ordenado y solicitaste detener o borrar la instancia, o si Compute Engine lo hace automáticamente para una detención o un borrado programados. El estado de la instancia cambia a STOPPING cuando sucede una de las siguientes situaciones:
Finalizas manualmente el cierre ordenado.
Se agota el tiempo del período de cierre ordenado. Si hay tareas en ejecución, Compute Engine las detiene de manera forzosa.
STOPPING: La instancia está cerrando su SO invitado, lo que sucede en las siguientes situaciones:
Tú o una operación programada solicitaron detener o borrar la instancia.
Se produjo un error de hardware.
El tiempo de apagado depende del tipo de instancia. Sin embargo, si la instancia se detiene debido a un error de hardware, el tiempo de apagado puede variar. Después de que Compute Engine cierra el SO invitado, establece el estado de la instancia en TERMINATED y, luego, completa la operación de detención o borra la instancia y todos los recursos adjuntos.
TERMINATED: Compute Engine completó la operación de detención.
Los recursos adjuntos permanecen así, a menos que los desvincules. En este estado, la instancia permanece detenida hasta que la reinicies o la borres.
REPAIRING: Compute Engine está reparando la instancia.
Compute Engine repara una instancia si encuentra un error interno o si el servidor host de la instancia no está disponible debido al mantenimiento. Mientras una instancia está en reparación, sucede lo siguiente:
Si Compute Engine repara la instancia correctamente, esta volverá al estado original que tenía antes de que comenzara la operación de reparación.
Este estado puede ser STAGING, RUNNING, SUSPENDING o STOPPING.
SUSPENDING: Compute Engine inició la operación de suspensión de la instancia después de que solicitaste suspenderla. En este estado, solo puedes esperar a que se complete la operación de suspensión.
SUSPENDED: Compute Engine completó la operación de suspensión.
En este estado, puedes reanudar o borrar la instancia. Si una instancia permanece en el estado SUSPENDED durante más de 60 días, Compute Engine la detiene y cambia su estado a TERMINATED.
Falla del hardware
En raras ocasiones, una instancia de procesamiento puede fallar debido a una interrupción inesperada, un error de hardware o algún otro problema del sistema. Google recomienda mitigar las fallas de hardware con volúmenes de almacenamiento persistente, crear copias de seguridad de tus datos de forma rutinaria y diseñar tu sistema para que la falla de una sola instancia no sea catastrófica. Para obtener más información, consulta cómo diseñar sistemas sólidos.
Si una instancia falla, Compute Engine la reinicia automáticamente con el mismo disco de arranque, los mismos metadatos y la misma configuración de instancia. Para modificar el comportamiento de reinicio automático de una instancia, consulta Configura la política de mantenimiento del host de VM.
Precios
Se te cobra por una instancia de procesamiento de la siguiente manera:
En el caso del uso de CPU, se te cobra cuando la instancia se encuentra en los siguientes estados:
RUNNING
PENDING_STOP
En el caso del uso de memoria, se te cobra cuando la instancia se encuentra en los siguientes estados:
RUNNING
PENDING_STOP
SUSPENDING
SUSPENDED
En el caso de los recursos conectados, como los discos o las direcciones IP externas, se te cobrará hasta que existan los recursos, independientemente del estado de la instancia.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-19 (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)."]]