Checking Instance Status

When you first create an instance, you should check the instance status to see if it is running before you can expect it to respond to requests. It can take a couple seconds before your instance is fully up and running after the initial request. You can also check the status of an instance at anytime after instance creation.

Before you begin

Permissions required for this task

To perform this task, you must have the following permissions.

  • compute.instances.get on the instance

Instance statuses

Instances can be in the following states:

  • PROVISIONING - Resources are being reserved for the instance. The instance isn't running yet.
  • STAGING - Resources have been acquired and the instance is being prepared for launch.
  • RUNNING - The instance is booting up or running. You should be able to ssh into the instance soon, though not immediately, after it enters this state.
  • STOPPING - The instance is being stopped either due to a failure, or the instance being shut down. This is a temporary status and the instance will move to TERMINATED.
  • TERMINATED - The instance was shut down or encountered a failure, either through the API or from inside the guest. You can choose to restart the instance or delete it.

The following diagram describes the progression of these statuses.

Diagram describing the progression of instance statuses
The progression of instance states.

After an instance is RUNNING, you can try to connect to it. If you cannot connect to the instance initially, try connecting again in a few minutes, as the operating system might still be booting up.

Windows instances experience a longer startup time because of the sysprep process, so you must run an additional check to verify that the Windows instance has started.

Checking an instance's status

List all instances and their status:

gcloud compute instances list

Describe the status of a single instance:

gcloud compute instances describe example-instance
Was this page helpful? Let us know how we did:

Send feedback about...

Compute Engine Documentation