The CentOS project announced the end of life (EOL) for CentOS Linux (also known as CentOS). If you need future technical support for your operating system, you must migrate from CentOS to another Linux distribution that has long-term support (LTS). This topic describes how to use the operating system migration feature to migrate an Elastic Compute Service (ECS) instance from CentOS 7 or 8 to Alibaba Cloud Linux or Anolis OS.
- 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.Note If 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 snapshot service is activated. For information about how to activate the snapshot service, see Activate ECS Snapshot.
- The ECS instance that you want to migrate is in the Stopped state. If the ECS instance is not in the Stopped state, stop the instance. For information about how to stop an instance, see Stop an instance.
On December 8, 2020, the CentOS project announced that it was shifting focus from CentOS Linux to CentOS Stream. For more information, see CentOS Project shifts focus to CentOS Stream. Alibaba Cloud CentOS public images are derived from CentOS. When the CentOS project ends support for CentOS, Alibaba Cloud also ends support for this Linux distribution. To prevent the impacts of the end of support for CentOS, we recommend that you replace your CentOS operating systems 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 Red Hat Enterprise Linux (RHEL) and CentOS ecosystems, and includes many optimizations for the Alibaba Cloud platform. Alibaba Cloud provides free LTS for Alibaba Cloud Linux. Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 public images are provided. For more information, see Overview.
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, see OpenAnolis.
Supported source operating systems and destination operating systems
|Architecture||Source operating system||Destination operating system|
- The source operating system must be the operating system of an ECS instance in the current Alibaba Cloud account.
- Alibaba Cloud Linux 2 and 3 do not support GUIs. If your CentOS operating system has a GUI, migrate to Anolis OS.
- 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 disk is created as the new system disk. Automatic snapshots that are released along 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, see Snapshots.
- The migration of an operating system is irreversible. You need to reinstall software packages during the migration process. 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 Snapshot overview.
- YUM or DNF is used for migration. Make sure that these two components run as expected.
- Anolis OS and Alibaba Cloud Linux do not provide i686-based software packages. If your CentOS operating system comes with i686-based software, you cannot migrate your operating system to Anolis OS or Alibaba Cloud Linux.
- To migrate from CentOS 7 to Alibaba Cloud Linux 2, take note of the following limits:
- Alibaba Cloud Linux 2 uses kernel version 4.19, which is incompatible with kernel version 3.10 of CentOS 7. Applications that must call the kernel API to program, such as to build out-of-tree kernel modules and to enable hardware, must be assessed beforehand to determine whether a direct migration is feasible and ensure that the applications can run normally after the migration.
- Alibaba Cloud Linux 2 does not support GUIs. As a result, the migration tool cannot be used to migrate away from CentOS 7 operating systems (OSs) that are configured with a GUI.
- To migrate from CentOS 8 to Alibaba Cloud Linux 3, take note of the following limits:Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS, and its GNU toolchain contains GCC 10.2, Binutils 2.35, and glibc 2.32. CentOS 8 software is compatible with Alibaba Cloud Linux 3. When you use the migration tool to migrate from CentOS 8 to Alibaba Cloud Linux 3, the migration tool determines which features and software may be limited after the migration. The following table describes the limits.
Feature or software Supported Migration affected Description GUI No. Yes. Alibaba Cloud Linux 3 does not support GUIs. As a result, if your CentOS 8 operating system is configured with a GUI, you cannot use the migration tool to migrate to Alibaba Cloud Linux 3. i386-based software packages No. Yes. Alibaba Cloud Linux 3 does not provide i386-based software packages. If your CentOS 8 operating system comes with i386-based software packages, you cannot use the migration tool to migrate to Alibaba Cloud Linux 3. To prevent system exceptions, you must delete the i386-based software packages before you perform a migration. epel-modular No. No. The Extra Packages for Enterprise Linux (EPEL) repositories of CentOS 8 and Alibaba Cloud Linux 3 depend on different platforms. You can migrate from CentOS 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 comes with software packages that are optimized 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 from CentOS 8 to Alibaba Cloud Linux 3, we recommend that you compile and verify your C/C++ programs by using the new GNU toolchain to prevent incompatibility. Kernel module compatibility No. No. Alibaba Cloud Linux 3 uses Linux Kernel 5.10 LTS. Alibaba Cloud Linux 3 is compatible with CentOS 8 software but is not fully compatible with kernel version 4.18 in CentOS 8. If your business uses the applications that depend on APIs, such as building out-of-tree kernel modules and using hardware resources, you must assess these applications beforehand. This way, you can determine whether a direct migration is feasible and make sure that the applications can run normally after the migration. MySQL database Only migrations to the same or later MySQL versions are supported.
- No if the MySQL version provided by Alibaba Cloud Linux 3 is the same as or later than that provided by CentOS 8
- Yes if the MySQL version provided by Alibaba Cloud Linux 3 is earlier than that provided by CentOS 8
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 that provided by CentOS 8, you cannot use the migration tool to migrate from CentOS 8 to Alibaba Cloud Linux. Operating system hot migration No. No. During the migration procedures, software packages are re-installed. This causes services to restart and results in brief service interruptions. To prevent impacts on services, we recommend that you back up data and isolate the source operating system environment before you use the migration tool to migrate from CentOS 8 to Alibaba Cloud Linux 3. For information about how to back up data, see Snapshot overview.The migration tool consumes resources to download and install software packages during migration. Before you perform a migration on an Elastic Compute Service (ECS) instance, make sure that the following resources are available:
Note If your instance has a smaller number of vCPUs, little memory, and a small amount of storage space (system disk space and data disk space), we recommend that you stop services that are running on the instance before you migrate the instance to Alibaba Cloud Linux 3. This way, you can prevent migration failures caused by insufficient resources.
- Amount of memory space: 300 MiB
- Amounts of disk space available for the following directories:
- /usr: 250 MiB
- /var: 1.5 GiB
- /boot: 50 MiB
- 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, if you no longer need the snapshots, delete the snapshots 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 top navigation bar, select the region where the ECS instance that you want to migrate resides.
- Find the ECS instance and choose Actions column. in the
- 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, OS Replacement Error appears in the Status column of the instance when an error occurs during the migration process. You can move the pointer over OS Replacement Error and click Cancel Operating System Replacement 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 Instances 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 OS to Running. Note When the operating system is being migrated, you can move the pointer over Replacing OS to view the progress of the migration task.
- If the operating system fails to be migrated, the instance enters the OS Replacement Error state. You can move the pointer over OS Replacement Error to view the cause of the error. Troubleshoot the error and then migrate the operating system of the instance again.
- If the operating system is migrated, the state of the instance changes from Replacing OS to Running.