forked from Long80A/ecs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
admin
committed
Sep 20, 2019
1 parent
b95e1dc
commit 8804117
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 实例创建失败事件 {#concept_491226 .concept} | ||
|
||
本文介绍实例创建失败的系统事件如何提高您的云服务器ECS创建成功率和运维效率。 | ||
|
||
## 什么是实例创建失败事件 {#section_klm_v8x_iu3 .section} | ||
|
||
您在ECS控制台创建实例或者调用[RunInstances](../../../../cn.zh-CN/API参考/实例/RunInstances.md#)时,如果ECS实例都达到**运行中**(Runing)状态,则本批ECS实例创建完成。但云服务器ECS在当前地域下的供货数量,以及虚拟交换机VSwitch中私网IP地址数量等是动态变化的,小概率情况下,会因为库存不足而无法成功创建ECS实例。此时,云服务器ECS会触发实例创建失败的系统事件流程,事件代码为SystemFailure.Delete。 | ||
|
||
发生实例创建失败的事件后,您无法在ECS控制台**实例与镜像** \> **实例**页面或通过[DescribeInstances](../../../../cn.zh-CN/API参考/实例/DescribeInstances.md#)查看到新增实例,请在**事件**页面查询ECS实例。如果您已经完成订单支付,会收到相应的消费退款。您可以在**事件**列表页对创建失败的ECS实例执行以下操作: | ||
|
||
- 等待系统释放,大约在创建失败的五分钟内会被释放。 | ||
- 自行释放实例。 | ||
|
||
## 查看实例创建失败事件 {#section_cmc_q94_jhi .section} | ||
|
||
本文示例通过阿里云CLI调用[DescribeInstanceHistoryEvents](../../../../cn.zh-CN/API参考/系统事件/DescribeInstanceHistoryEvents.md#)查看ECS实例是否有执行中或者已执行的创建失败事件。有关如何使用其他开发者工具调用API,请参见[ECS API快速入门](../../../../cn.zh-CN/API参考/ECS API快速入门.md#)。 | ||
|
||
``` {#codeblock_h32_2ex_mqy} | ||
aliyun ecs DescribeInstanceHistoryEvents --RegionId TheRegionId --InstanceEventCycleStatus.1 Executing --InstanceEventCycleStatus.2 Executed --EventType SystemFailure.Delete | ||
``` | ||
|
||
**说明:** 以上示例中,您还可以通过指定EventPublishTime.Start和EventPublishTime.End参数查看时间段内的事件信息。 | ||
|
||
有关如何使用ECS控制台查看实例创建失败事件,请参见[系统事件](../../../../cn.zh-CN/运维与监控/系统事件/系统事件概述.md#)。 | ||
|
||
## 状态区别 {#section_wix_2po_81c .section} | ||
|
||
在ECS控制台的实例页面或通过[DescribeInstances](../../../../cn.zh-CN/API参考/实例/DescribeInstances.md#)接口查询到实例状态与实例创建失败的系统事件(SystemFailure.Delete)的状态对比如下表所示。 | ||
|
||
|业务状态|实例状态|事件状态| | ||
|----|----|----| | ||
|实例创建中|启动中(Pending)|无法查询| | ||
|触发实例创建失败事件|已停止(Stopped)|执行中(Executing)| | ||
|您自行释放了实例|无法查询|已避免(Avoided)| | ||
|系统释放了实例|无法查询|已执行(Executed)| | ||
|
||
## 提高实例创建成功率 {#section_owp_826_5ye .section} | ||
|
||
建议您按照以下流程创建ECS实例,提高成功率: | ||
|
||
1. 调用[DescribeAvailableResource](../../../../cn.zh-CN/API参考/地域/DescribeAvailableResource.md#),确认目标地域及可用区下是否有足够的ECS实例供应量,以及虚拟交换机中的私网IP数量是否充足。 | ||
2. 在ECS控制台创建实例或者调用[RunInstances](../../../../cn.zh-CN/API参考/实例/RunInstances.md#)创建实例。 | ||
3. 调用[DescribeInstanceStatus](../../../../cn.zh-CN/API参考/实例/DescribeInstanceStatus.md#)或者[DescribeInstances](../../../../cn.zh-CN/API参考/实例/DescribeInstances.md#)查看新增实例的状态,确认实例进入Running状态。 | ||
4. 如果实例长时间处于启动中状态,调用[DescribeInstanceHistoryEvents](../../../../cn.zh-CN/API参考/系统事件/DescribeInstanceHistoryEvents.md#)查看是否产生了实例创建失败的事件。 | ||
|