Common questions about replacing an ECS instance system disk, including snapshots and billing.
How do I replace an operating system (system disk)?
Replace the operating system (system disk) by replacing the image of the ECS instance.
Replacing the operating system releases the original system disk and purges all its data. Create a snapshot of the system disk before you proceed.
Can a custom image created from an instance in Account A be used to replace the operating system of an instance in Account B?
Yes. Account A must share the custom image with Account B, which can then use it to replace the operating system (system disk).
If an image contains data disks, can I use the image to replace an operating system?
Yes. Only the system disk is replaced. Data disks are not affected.
If you use a custom image that contains a data disk to change the operating system, make sure that there are no service dependencies between the system disk and data disks, or that the new system disk's interaction with the data disks does not disrupt your business processes. For example, if your services read data from or write data to the data disks, changing the operating system can cause data access errors after the system disk is replaced.
What are the differences between replacing an operating system and re-initializing a system disk?
The main differences are described in the following table.
Item | Re-initialize system disk | Change operating system |
Functional differences | Re-initialization restores the ECS instance to its initial state. The operating system remains the same. | Switches the instance to a different operating system. |
Impact on the system disk |
|
|
Impact on data disks | Data disks are not affected. | Data disks are not affected. |
Impact on snapshots |
|
|
Billing | Re-initializing a system disk is free of charge. Billing is not affected because the operating system remains the same. | Changing the operating system is free of charge. However, fees are charged in the following cases:
|
What do I do if I fail to resize a system disk by replacing the operating system?
Partition extension may fail due to a timeout during the OS replacement. If the system disk is not resized successfully, manually extend the partitions and file systems. This only extends the system disk partitions and does not affect the OS version.
When I replace an operating system, what do I do if the target image is not available and a message indicates that the instance is non-I/O optimized?
Cause
The I/O optimization property of the instance must match that of the image. If they do not match, you cannot select the target image, and the following message appears: 'This instance is non-I/O optimized. You can select only non-I/O optimized images to replace the operating system.'
Solutions
-
Change to a new instance type. All purchasable instance types are I/O optimized.
-
Select an I/O optimized image and replace the operating system by replacing the system disk.
-
Call DescribeInstances and check the IoOptimized parameter to determine the I/O optimization property of the instance.
-
Call DescribeImages and check the IsSupportIoOptimized parameter to determine the I/O optimization property of the image.