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 for a disk.
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 disks, make sure that no business dependency exists between the original system disk and the data disks attached to the instance, or make sure that 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 instance but 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?
I/O optimized instances can use only I/O optimized images. Non-I/O optimized instances can use only non-I/O optimized images. This is why you cannot find the desired image and are prompted that the instance is non-I/O optimized. We recommend that you select an available image to replace the operating system.
You can call the DescribeInstances operation to query whether an instance is I/O optimized and call the DescribeImages operation to query whether an image is I/O optimized.