Home  >  Article  >  Operation and Maintenance  >  How to replace the system disk or operating system of an ECS instance

How to replace the system disk or operating system of an ECS instance

坏嘻嘻
坏嘻嘻Original
2018-09-21 14:06:282939browse

The content of this article is about how to replace the system disk or operating system of an ECS instance. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

ReplaceSystemDisk

Description

When calling this interface, you need to note:

You cannot replace The disk type of the system disk.

Changing the system disk cannot modify the disk type and payment method, but it will change the disk ID of the system disk and the original disk will be released.

The status of the instance must be Stopped. If your private network VPC type instance has enabled the no-charge feature for instance downtime within the VPC, in order to prevent the instance from being unable to restart after replacing the system disk due to insufficient ECS instance resources in the region, you need to turn off the no-charge feature for downtime when stopping the instance. See StopInstance for more details.

The OperationLocks of the ECS instance controlled by security cannot be marked as "LockReason": "security".

The instance cannot be in arrears state.

You can re-specify the capacity of the system disk through the parameter SystemDisk.Size. The value of SystemDisk.Size must be greater than or equal to max{20, current system disk capacity}. Additional fees will be charged for the disk capacity exceeding max{20, system disk capacity before replacement}.

Request parameters

How to replace the system disk or operating system of an ECS instance

##Return parameters

How to replace the system disk or operating system of an ECS instance

Example

Request Example

https://ecs.aliyuncs.com/?Action=ReplaceSystemDisk
&InstanceId=i-23jggx34b
&ImageId=m-myimage11
&<公共请求参数>

Return example

XML format

<ReplaceSystemDiskResponse>
    <DiskId>d-23jbf2v5m</DiskId>
    <RequestId>F3CD6886-D8D0-4FEE-B93E-1B73239673DE</RequestId>
</ReplaceSystemDiskResponse>

JSON format

{
    "RequestId":"337568C5-64F3-4B76-8CDD-D3D8C57B5B8C",
    "DiskId":"d-j6cam2z21u4ks3dj6flb"
}

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to replace the system disk or operating system of an ECS instance

The above is the detailed content of How to replace the system disk or operating system of an ECS instance. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn