CentOS has announced the end of life (EOL) for CentOS Linux versions including CentOS 7 and CentOS 8. If you need future technical support for your CentOS operating system, you can use Server Migration Center (SMC) to migrate your CentOS operating system to another Linux distribution that provides long-term support (LTS). SMC can also be used to migrate a source Alibaba Cloud Linux 2 operating system to Alibaba Cloud Linux 3. This topic describes how to use SMC to migrate an operating system.
Prerequisites
The preparations for the migration are complete. For more information, see Before you begin.
The information about your migration source is imported. You can import the information about a migration source by using one of the following methods:
The migration source is in the Active state. You can create a migration job for a migration source only when the migration source is in the Active state. For more information about how to restore a migration source to the Active state, see the What do I do if I am unable to create a migration job because the migration source is not in the Active state? section of the "FAQ" topic.
Comparison of migration solutions
The following table compares three operating system migration solutions.
Migration solution | Usability | Reliability | Service | Migration result |
(Recommended) Migrate an operating system in the SMC console | ★★★★★
| ★★★★★ Snapshots are automatically created without manual intervention. | ★★★★★ The migration solution is integrated into the Alibaba Cloud Global Technology Services (GTS) system and helps you resolve issues by using mature processes. | ★★★★★
|
Replace an operating system (a system disk) in the Elastic Compute Service (ECS) console | ★★★★ Operations are performed on a GUI. | ★★★★ Snapshots are manually created. | ★★★★★ The migration solution is integrated into the Alibaba Cloud GTS system and helps you resolve issues by using mature processes. | ★★★
|
★★★
| ★★★ Snapshots are manually created. | ★★★ The migration solution is supported by the community. | ★★★
|
Scenarios
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 2 | Alibaba Cloud Linux 3 | |
ARM64 | CentOS 7 |
|
CentOS 8 |
|
The source operating system must be the operating system of an ECS instance in the current Alibaba Cloud account.
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 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 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. 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.
Limits
Anolis OS and Alibaba Cloud Linux do not provide i686-based software packages. If your CentOS operating system comes with i386- or i686-based software packages, you cannot migrate to Anolis OS or Alibaba Cloud Linux.
The operating systems of instances that are created from custom images cannot be migrated.
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.
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
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.
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:- 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
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.
Procedure
Log on to the SMC console.
In the left-side navigation pane, click Migration Sources.
Find the migration source that you want to manage, and click Create Migration Job in the Actions column.
In the Create Migration Job dialog box, configure the parameters to create an operating system migration job.
You can configure the following parameters to create an operating system migration job:
Migration Job Type: Select Operating System Migration.
Current Operating System: By default, the current operating system is displayed and cannot be modified. Example: CentOS 7.
Destination Operating System: Select the operating system to which you want to migrate the source operating system from the drop-down list. Example: Alibaba Cloud Linux 3.
Click Create.
In the Migrate Operating System dialog box, read the message and click Got It.
On the Operating System Migration tab of the Migration Jobs page, wait until the migration job is complete.
If the migration job enters the Completed state, the migration is successful.
You can find the migration job and click View Destination Instance in the Actions column. On the Instance Details tab of the ECS instance, you can find that the source operating system is migrated to the destination operating system.
If the migration job enters the InError state, the migration fails. You can check the logs to troubleshoot the failure. Then, restart the migration job. For more information about common errors and solutions, see FAQ and Troubleshoot server migration failures.
If you want to roll back the system disk on which the source operating system is installed, you can use the snapshots that are automatically created for the system disk. To roll back the system disk, perform the following steps:
Log on to the ECS console.
In the left-side navigation pane, choose
.On the Disk Snapshots tab, find the snapshot that you want to use to roll back the system disk, and click Roll Back Disk in the Actions column.
In the Roll Back Disk message, click OK.