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
- If you want to use the command-line examples in this guide:
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
The following diagram describes the progression of these statuses.
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.
Check 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