An operating system replacement operation replaces a system disk. This topic provides answers to frequently asked questions (FAQ) about replacing the operating system (system disk) of an Elastic Compute Service (ECS) instance.
How do I replace the operating system (system disk) of an instance?
You can replace the operating system of an instance by replacing the image. For more information, see Replace the operating system (system disk) of an instance.
After the operating system (system disk) of an instance is replaced, the original system disk is released and all data stored on the disk is deleted. Before you replace the operating system, we recommend that you create a snapshot of the original system disk to back up data. For more information, see Create a snapshot.
Can I use an image created from an instance in Account A to replace the operating system of an instance in Account B?
Yes, you can share the image from Account A to Account B and then use the image to replace the operating system of an instance in Account B. For more information, see Share a custom image and Replace the operating system (system disk) of an instance.
When I replace the operating system of an instance, can I select an image that contains data disk snapshots?
You can replace the operating system with an image that contains data disk snapshots, replacing only the system disk of the original instance without affecting the data disks of the original instance.
If the image that you use to replace the operating system of an ECS instance contains data from data disks, make sure that no business dependency exists between the original system disk and the data disks attached to the instance or no issues occur when the new system disk performs operations on the data disks. For example, if the original system disk read data from and wrote data to the data disks, exceptions may occur when the new system disk reads data from and writes data to the data disks.
What are the differences between replacing an operating system and re-initializing an system disk?
The following table describes the differences.
Item | After the system disk of an instance is re-initialized | After the system disk (operating system) of an instance is replaced |
Features | The instance is restored to the initial state when it was created. The operating system of the instance remains unchanged before and after initialization. | The operating system of the instance is changed. |
Impacts on the system disk |
|
|
Impacts on the data disks | The data disks are not affected. | The data disks are not affected. |
Impacts on snapshots |
|
|
Charges | You are not charged for initializing the system disk. The operating system of the instance remains unchanged before and after initialization so that billable items remain unchanged. | You are not charged for replacing the operating system of an ECS instance, but you are charged for the resources that are used in the following scenarios:
|
What do I do if partitions on the system disk of an instance fail to be extended when I extend the disk by replacing the operating system of the instance?
If you extend the system disk of an instance by replacing the operating system of the instance, partitions on the system disk may fail to be extended due to a timeout error. You can perform the operations that are described in Extend the partitions and file systems of disks on a Linux instance to manually extend the partitions that fail to be extended. The partition extend operations only extend the system disk partitions and do not affect the version of the operating system.
What do I do if the desired image is not found and I am prompted that the instance is non-I/O optimized when I replace the operating system of an instance?
ECS instances are divided into two categories based on disk I/O performance: I/O optimized instances designed for high read/write demand scenarios with high performance, and non-I/O optimized instances suitable for general computing with standard performance. The instance and image I/O optimization types must match when you replace the operating system:
I/O optimized instances require images that support I/O optimization.
Non-I/O optimized instances require images that do not support I/O optimization.
Background information
Alibaba Cloud has phased out non-I/O optimized instances. Now users can only create I/O optimized instances, and only a limited inventory of non-I/O optimized instances remains. When you try to replace the operating system on a non-I/O optimized instance, the system will prompt the following information: "The instance is a non-I/O optimized instance. You can only select images that support non-I/O optimization."
Solutions
The available instance types are all I/O optimized. We recommend that you switch to a new instance type. For more information, see Change instance types.
Select an image that supports I/O optimized instances to replace the operating system. For more information, see Replace the operating system (system disk) of an instance.
You can query the I/O attribute of an instance using the DescribeInstances operation with the IoOptimized parameter specified. Additionally, you can query the I/O attribute of an image using the DescribeImages operation with the IsSupportIoOptimized parameter specified.