The technical support for operating systems of Elastic Compute Service (ECS) instances may be discontinued due to reasons such as end of life (EOL), end of third-party support, and evolution of open source projects. If you require technical support for your operating system in the future, you must migrate or upgrade the operating system. This topic describes how to migrate and upgrade an operating system in the ECS console.
Prerequisites
Resource Access Management (RAM) is activated, and Server Migration Center (SMC) is granted the permissions required to access cloud resources.
Log on to the RAM console and click Confirm Authorization Policy.
NoteIf you are using a RAM user, log on to the RAM console with the corresponding Alibaba Cloud account and grant the AliyunSMCFullAccess permission to the RAM user.
The Alibaba Cloud ECS snapshot service is activated. For more information, see Activate ECS Snapshot.
The ECS instance whose operating system you want to migrate is in the Stopped state. If the ECS instance is not in the Stopped state, stop the instance. For more information, see Stop an instance.
The ECS instance whose operating system you want to migrate belongs to the current Alibaba Cloud account.
Cloud Assistant Agent is installed on the ECS instance whose operating system you want to migrate. Cloud Assistant Agent has been run within the last 24 hours. For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent.
No snapshot is being created for the ECS instance whose operating system you want to migrate.
Background information
On December 8, 2020, CentOS announced that they would be shifting focus from CentOS Linux, the rebuild of Red Hat Enterprise Linux (RHEL), to CentOS Stream. For more information, see CentOS Project shifts focus to CentOS Stream. Alibaba Cloud CentOS Linux public images are derived from CentOS. When the CentOS project ends support for CentOS Linux, Alibaba Cloud also ends support for this Linux distribution. To prevent the impacts of the EOL for CentOS, we recommend that you replace your CentOS operating system at the earliest opportunity.
Alibaba Cloud Linux is a Linux distribution that is provided by Alibaba Cloud. Alibaba Cloud Linux is fully compatible with the RHEL and CentOS ecosystems, and is optimized for the Alibaba Cloud platform. Alibaba Cloud provides free long-term support (LTS) for Alibaba Cloud Linux. Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 public images are available. For more information, see Overview.
Alibaba Cloud Linux 2 reached its EOL on March 31, 2024. Alibaba Cloud Linux 2 is an operating system provided by Alibaba Cloud. After the EOL, Alibaba Cloud continues to provide technical support for Alibaba Cloud Linux 2. To obtain better user experience and use new features, such as the support for the AI ecosystem, we recommend that you upgrade to Alibaba Cloud Linux 3.
Anolis OS is an open source, independent Linux distribution that is released by the OpenAnolis community. Anolis OS is fully compatible with the CentOS 8 ecosystem and other mainstream Linux distributions, and can deliver enterprise-level stability, security, reliability, and high performance. For more information, visit OpenAnolis.
Scenarios
Windows
The following table describes the x86-based operating systems that can be migrated by using SMC and the operating systems that can serve as migration destinations.
Operating system architecture | Source operating system | Destination operating system |
x86 |
| Windows Server 2012 R2 Datacenter 64-bit (Chinese/English) Important The language of the destination operating system must be the same as that of the source operating system. |
|
Important The language of the destination operating system must be the same as that of the source operating system. | |
| Windows Server 2019 Datacenter 64-bit (Chinese/English) Important The language of the destination operating system must be the same as that of the source operating system. |
Linux
The following table describes the x86- or ARM64-based operating systems that can be migrated by using SMC and the corresponding operating systems to which they can be migrated.
Operating system architecture | Source operating system | Destination operating system |
X86 | CentOS 7 |
|
CentOS 8 |
| |
| Alibaba Cloud Linux 3 | |
Alibaba Cloud Linux 2 | Alibaba Cloud Linux 3 | |
ARM64 | CentOS 7 |
|
CentOS 8 |
|
Limits
Migration limits vary based on the operating system.
Windows
Cross-language migration of Windows operating systems is not supported.
The ECS instance whose Windows operating system is to be migrated must have at least 2 vCPUs and 2 GiB of memory.
The migration tool consumes resources to download and install software packages during the migration process. Therefore, make sure that the available space of the C drive on the instance is at least 20 GiB, and the available space is larger than the size of the
C:\Windows
directory.
Linux
Item | Description |
General limit |
|
Limit on migrating from CentOS 7 to Alibaba Cloud Linux 2 | Alibaba Cloud Linux 2 uses kernel version 4.19, which is incompatible with kernel version 3.10 of CentOS 7. If your business uses applications that depend on kernel APIs for different purposes, such as building out-of-tree kernel modules and using hardware resources, you must assess the applications in advance and determine whether they can run as expected after a direct migration. |
Limit on migrating from CentOS 7 to Alibaba Cloud Linux 3 | Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS, which is incompatible with kernel version 3.10 of CentOS 7. In addition, the GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. If your business uses applications that depend on kernel APIs for different purposes, such as building out-of-tree kernel modules and using hardware resources, you must assess the applications in advance and determine whether they can run as expected after a direct migration. |
Limit on migrating from CentOS 8 to Alibaba Cloud Linux 3 | Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS. The GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. Alibaba Cloud Linux 3 is compatible with the CentOS 8 ecosystem. When you use the migration tool to migrate from CentOS 8 to Alibaba Cloud Linux 3, the migration tool performs a basic assessment on the operating system that you want to migrate. |
The following table describes the limits on migrating features or software related to your operating system.
Feature or software | Supported | Migration affected | Description |
i386-based software package | Not supported. | Yes. | Alibaba Cloud Linux does not provide i386-based software packages. If your CentOS 7 or 8 operating system is equipped with i386-based software packages, you cannot use the migration tool to migrate the operating system. To prevent system exceptions, you must delete the i386-based software packages before you migrate the operating system. |
epel-modular | Not supported. | No. | The Extra Packages for Enterprise Linux (EPEL) repositories of CentOS 7 or 8 and Alibaba Cloud Linux 3 depend on different platforms. You can migrate from CentOS 7 or 8 to Alibaba Cloud Linux 3, but you cannot install the software packages that are based on epel-modular after the migration. |
Compatibility with C/C++ programs | Not guaranteed. | No. | Alibaba Cloud Linux 3 is equipped with software packages that are tuned for better compatibility with C/C++ programs. The GNU toolchain of Alibaba Cloud Linux 3 contains GCC 10.2, Binutils 2.35, and glibc 2.32. After you migrate an operating system, we recommend that you compile and verify your C/C++ programs by using the new GNU toolchain to prevent incompatibility issues. |
Kernel module compatibility | Not supported. | No. | Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS, which is compatible with the CentOS 8 ecosystem but is not fully compatible with kernel version 3.10 of CentOS 7 and kernel version 4.18 of CentOS 8. If your business uses the applications that depend on kernel APIs for different purposes, such as building out-of-tree kernel modules and using hardware resources, you must assess the applications in advance to determine whether they can run as expected after a direct migration. |
MySQL database | Only migrations to the same or later MySQL versions are supported. |
| Alibaba Cloud Linux 3 supports MySQL. However, MySQL version downgrades are not supported. If the MySQL version provided by Alibaba Cloud Linux 3 is earlier than the MySQL version provided by CentOS 7 or 8, you cannot use the migration tool to migrate operating systems. |
Operating system hot migration | Not supported. | No. | During the migration process, software packages are re-installed. This causes services to restart and results in service interruptions. Before you proceed with the migration, you must create snapshots for your disks to back up data and isolate the source operating system environment to prevent service interruptions. For more information, see Create a snapshot for a disk. |
Usage notes
During the migration process, the following operations are performed on the ECS instance: creating snapshots for basic disks, reinstalling software packages, creating a custom image from a system disk snapshot, replacing the system disk, stopping the ECS instance, and starting the ECS instance. After the system disk is replaced, a new disk is created for the system disk. Automatic snapshots that are released with the original disk are deleted and cannot be restored. We recommend that you back up important data and plan a proper migration time to prevent the preceding operations from affecting your business.
During the migration process, do not stop, restart, or release the ECS instance in manual mode or by using O&M scripts.
During the migration process, snapshots are created for all disks to back up data. You are charged for snapshots based on the pay-as-you-go billing method. For more information about the billing methods and rules of snapshots, see Snapshots.
The migration of an operating system is irreversible. You need to reinstall software packages during the migration process. Therefore, before you migrate the operating system of your ECS instance, we recommend that you create snapshots for the ECS instance to back up data. For more information about snapshots, see Overview.
YUM or DNF is used for migration. Make sure that these two components run as expected.
If you perform an in-place upgrade for an operating system, the operating system kernel, software packages, and configurations are modified. The modifications are irreversible. Therefore, we recommend that you create snapshots for the source operating system and data for backup so that you can perform restoration if necessary.
Before and during migration, the system checks whether the source instance meets the required conditions and prechecks the migration job. If the source instance does not meet the required conditions or fails to pass the precheck, errors occur during migration and the migration job fails. We recommend that you familiarize yourself with the migration limits and FAQ documents and perform migration tests.
During migration, the operating system kernel and software packages are installed or updated and the operating system is automatically restarted multiple times. In this process, business continuity cannot be ensured. We recommend that you assess the impact of migration on your business and suspend your business before you perform a migration. We also recommend that you do not use the source operating system during migration.
After the migration is complete, the operating system kernel and software packages of the source operating system are upgraded. Original application data is retained. However, the applications may not run as expected due to changes in the environment or dependencies, which affects your business. Therefore, you must test and verify a migration solution before you perform a migration.
Procedure
The operating system migration feature is supported only in the new ECS console.
When you migrate the operating system of an ECS instance, snapshots are automatically created for the instance. After you migrate the operating system of the instance, we recommend that you delete the snapshots that you no longer need at the earliest opportunity to prevent additional costs. For more information, see Delete a snapshot. For information about the pricing of snapshots, see Snapshots.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region where the ECS instance resides.
Find the ECS instance that you want to manage and choose
in the Actions column.ImportantYou cannot migrate the operating systems of multiple instances at a time.
In the Replace Operating System dialog box, select Migrate Operating System.
Read the precautions, select I acknowledge and accept these risks and authorize Alibaba Cloud to create snapshots for all disks on the instance, and then click Continue to Replace Operating System.
In the Replacement Operating System section of the Migrate Operating System dialog box, select the operating system to which to migrate the ECS instance.
In this example, the ECS instance is migrated from CentOS 7 to Alibaba Cloud Linux 3.
Clear If an error occurs during the migration process, the operating system replacement operation is automatically canceled or leave this option selected.
If this option is selected, the operating system migration task is automatically canceled when an error occurs during the migration process. The ECS instance remains in the Stopped state. You can migrate the operating system of the instance again.
If this option is cleared, Operating System Replacement Failed appears in the Status column of the instance when an error occurs during the migration process. You can move the pointer over Operating System Replacement Failed and click Cancel to cancel the operating system migration task. Then, you can migrate the operating system of the instance again.
Click Confirm.
Approximately 10 minutes are required to migrate the operating system. This excludes the period of time that is required to create snapshots. On the Instance page or the Instance Details page, you can view the progress of the migration task.
If the operating system is migrated, the state of the instance changes from Replacing Operating System to Running.
NoteWhen the operating system is being migrated, you can move the pointer over Replacing Operating System to view the progress of the migration task.
If the operating system fails to be migrated, the instance enters the Operating System Replacement Failed state. You can move the pointer over Operating System Replacement Failed to view the cause of the error. Troubleshoot the issue and then migrate the operating system of the instance again.
References
The operating system migration feature is provided by SMC. For more information, see What is SMC? To view and manage migration records of operating systems, go to the SMC console. You can also perform operating system migrations in the SMC console. For more information, see Create an operating system migration job.