This topic describes the system event of instance creation failure, and how to improve the success rate of instance creation and O&M efficiency of ECS instances.

Introduction to the system event of instance creation failure

When you create instances by using the ECS console or calling the RunInstances operation, the instances are created while they enter the Running (Running) state. However, ECS instances may fail to be created because of insufficient resource inventory in the current region or insufficient number of private IP addresses in the VSwitch. In this case, ECS triggers the system event of instance creation failure with the SystemFailure.Delete event code.

When an instance fails to be created, you cannot view the new instance by choosing Instances & Images > Instances in the ECS console or by calling the DescribeInstances operation. You can only query the instance on the Events page. If you have made a payment, your payment will be refunded. On the Events page, perform one of the following operations on the ECS instance that fails to be created:
  • Wait for the system to release the ECS instance. An ECS instance is released within five minutes if it fails to be created.
  • Manually release the instance.

View the event of instance creation failure

In this example, the DescribeInstanceHistoryEvents operation is called through Alibaba Cloud CLI for you to check whether an event of ECS instance in the Executing or Executed state exists. For information about how to use other developer tools to call this API operation, see Quick start.

aliyun ecs DescribeInstanceHistoryEvents --RegionId TheRegionId --InstanceEventCycleStatus.1 Executing --InstanceEventCycleStatus.2 Executed --EventType SystemFailure.Delete
Note In the example, you can specify the EventPublishTime.Start and EventPublishTime.End parameters to view information about events during the specified time period.

For information about how to use the ECS console to view events of instance creation failure, see Overview of system events.

Different states

The following table describes different states that are returned when you query instance states and the system event of instance creation failure (SystemFailure.Delete) on the Instances page in the ECS console or by calling the DescribeInstances operation.

Operation status Instance state Event state
The instance is being created. Starting (Pending) N/A
The event of instance creation failure is triggered. Stopped (Stopped) Executing (Executing)
The instance is manually released. N/A Aborted (Avoided)
The instance is automatically released. N/A Executed (Executed)

Improve the success rate of instance creation

We recommend that you perform the following steps to create an ECS instance and improve the success rate:

  1. Call the DescribeAvailableResource operation to check whether sufficient resource inventory is available in the specified region and zone, and whether sufficient private IP addresses are available in the VSwitch.
  2. Create instances by using the ECS console or by calling the RunInstances operation.
  3. Call the DescribeInstanceStatus or DescribeInstances operation to check the status of the new instances, and whether the instances enter the Running state.
  4. If one of the instances stays at the Starting state for an extended period of time, call the DescribeInstanceHistoryEvents operation to check whether an event of instance creation failure occurs.