tencent cloud

Migrating CentOS to TencentOS Server
Last updated: 2024-01-08 09:37:01
Migrating CentOS to TencentOS Server
Last updated: 2024-01-08 09:37:01

Overview

CentOS plans to officially discontinue support for CentOS Linux, with details shown in the table below. For more information, see CentOS's official announcement.
OS Version
EOL
Impact
CentOS 8
January 1, 2022
After end of maintenance, any software maintenance and support including bug fixes and feature updates are unavailable.
CentOS 7
June 30, 2024
Choose TencentOS Server images for newly purchased CVMs. For existing CentOS instances, you can migrate them to TencentOS Server.

Supported versions

OS versions supported for source servers:
CentOS 7 series:
CentOS_7.2_64-bit, CentOS_7.3_64-bit, CentOS_7.4_64-bit, CentOS_7.5_64-bit, CentOS_7.6_64-bit, CentOS_7.7_64-bit, CentOS_7.8_64-bit, and CentOS_7.9_64-bit
CentOS 8 series:
CentOS_8.0_64-bit, CentOS_8.2_64-bit, and CentOS_8.4_64-bit
OS versions recommended for target servers:
CentOS 7 series: TencentOS Server 2.4 (TK4) is recommended.
CentOS 8 series: TencentOS Server 3.1 (TK4) is recommended.
Note:
CentOS 7.2 and CentOS 7.3 public images may contain packages for 32-bit systems by default. Delete these packages before update.

Reminders

OS migration is not supported in the following cases:
A GUI is installed.
An i686 RPM package is installed.
Business may fail to run properly after migration under the following conditions:
The business program is installed with and relies on a third-party RPM package.
The business program relies on a fixed kernel version or has its own kernel module compiled. The target version after migration is TK14 based on the v5.4 kernel. This version is later than the kernel versions of CentOS 7 and CentOS 8 and may have changes in some old features.
The business program relies on a fixed GCC version. TencentOS 2.4 is installed with GCC v4.8.5 by default, and TencentOS 3.1 is installed with GCC v8.5 by default.
After migration, you need to restart the instance to enter the TencentOS kernel.
Migration does not affect data disks. Upgrade only in the OS layer does not involve any operation on data disks.

Resource Requirements

500 MB of available memory
10 GB of available space in the system disk of the destination instance

Directions

Preparation

1. Create a snapshot to back up system disk data.
2. Uninstall i686 RPM package (if any).

Migration execution

CentOS 7 series to TencentOS Server 2.4 (TK4)
CentOS 8 series to TencentOS Server 3.1 (TK4)
1. Log in to the target CVM instance. For operation details, see Logging in to Linux Instance Using Standard Login Method.
2. Run the following command to install Python 3:
yum install -y python3
3. Run the following command to obtain the migration tool:
wget http://mirrors.tencent.com/tencentos/2.4/tlinux/x86_64/RPMS/migrate2tencentos-1.0-4.tl2.noarch.rpm
4. Run the following command to install the migration tool. The command will create migrate2tencentos.py in /usr/sbin.
rpm -ivh migrate2tencentos-1.0-4.tl2.noarch.rpm
5. Run the following command to start migration:
python3 /usr/sbin/migrate2tencentos.py -v 2.4
The migration takes some time. When the script execution is completed, the following information will be displayed:


6. Restart the instance. For operation details, see Restarting Instances.
7. Check the migration result.
7.1 Run the following command to check the OS release information:
cat /etc/os-release
The information shown in the figure below is displayed:


7.2 Run the following command to check the kernel:
uname -r
The information shown in the figure below is displayed:


Note:
By default, the kernel is the latest version of YUM. The actual result prevails. This document uses the version shown in the figure as an example.
7.3 Run the following command to check YUM:
yum makecache
The information shown in the figure below is displayed:


1. Log in to the target CVM instance. For operation details, see Logging in to Linux Instance Using Standard Login Method.
2. Run the following command to install Python 3:
yum install -y python3
3. Run the following command to obtain the migration tool:
wget http://mirrors.tencent.com/tlinux/3.1/Updates/x86_64/RPMS/migrate2tencentos-1.0-4.tl3.noarch.rpm
4. Run the following command to install the migration tool. The command will create migrate2tencentos.py in /usr/sbin.
rpm -ivh migrate2tencentos-1.0-4.tl3.noarch.rpm
5. Run the following command to start migration:
python3 /usr/sbin/migrate2tencentos.py -v 3.1
The migration takes some time. When the script execution is completed, the following information will be displayed:


6. Restart the instance. For operation details, see Restarting Instances.
7. Check the migration result.
7.1 Run the following command to check the OS release information:
cat /etc/os-release
The information shown in the figure below is displayed:


7.2 Run the following command to check the kernel:
uname -r
The information shown in the figure below is displayed:


Note:
By default, the kernel is the latest version of YUM. The actual result prevails. This document uses the version shown in the figure as an example.
7.3 Run the following command to check YUM:
yum makecache
The information shown in the figure below is displayed:


Should you encounter any issues during the migration process, please reach out to the Contact Us.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback