Help & Documentation>Cloud Virtual Machine

Migrating to OpenCloudOS

Last updated: 2023-09-07 17:33:31

Scenario

CentOS has officially discontinued support for CentOS 8. 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.
If you are using a CentOS 8 instance, migrate CentOS 8 to OpenCloudOS 8 by referring to the directions provided in this document.

Release notes

OS versions supported for source servers

Name
Version
CentOS 8 series
CentOS_8.0_64-bit, CentOS_8.2_64-bit, CentOS_8.3_64-bit, CentOS_8.4_64-bit, and CentOS_8.2_ARM_64-bit

OS versions recommended for target servers

If you are using CentOS 8 series, migrate it to OpenCloudOS 8.
OS migration is not supported for CentOS Stream 8 public images.

Supports and Limits

OS migration is not supported in the following cases:
A GUI is installed.
An i686 RPM package is stalled.
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 tkernel4 (TK4) based on the v5.4 kernel. This version is later than the kernel versions of CentOS 8 and may have changes in some old features. If your business program relies heavily on the kernel, we recommend that you know which features your business program actually relies on. You can also visit the OpenCloudOS community Bugtracker.
The business program relies on a fixed GCC version. Currently, OpenCloudOS 8 is installed with GCC v8.5 by default.
After migration, you need to restart the instance to enter the OpenCloudOS kernel.
Migration does not affect data disks. Upgrade only in the OS layer does not involve any operation on data disks.

Resource Requirements

The memory has a free space of over 500 MB.
The system disk has a free space of over 10 GB.

Instructions

Preparing for the migration

1. Create a snapshot to backup the system disk.
2. Check whether an i686 RPM package is installed and, if so, uninstall the package.
3. Install Python 3 in your operating environment if you have not installed it. You can install Python 3 using a CentOS Vault repository.
# cat <<EOF | sudo tee /tmp/centos8_vault.repo
[c8_vault_baseos]
name=c8_vault - BaseOS
baseurl=https://mirrors.cloud.tencent.com/centos-vault/8.5.2111/BaseOS/\$basearch/os/
gpgcheck=0
enabled=1
[c8_vault_appstream]
name=c8_vault - AppStream
baseurl=https://mirrors.cloud.tencent.com/centos-vault/8.5.2111/AppStream/\$basearch/os/
gpgcheck=0
enabled=1
EOF
# yum -y install python3 --disablerepo=* -c /tmp/centos8_vault.repo --enablerepo=c8_vault*

Migration execution

Steps to migrate from CentOS 8 to OpenCloudOS 8
1. Log in to the target host. For Tencent Cloud CVM users, please refer to Logging in to Linux Instance Using Standard Login Method.
2. Run the following command to install Python 3: If no YUM repository is available, install Python 3 using a CentOS Vault repository. For more information, see item 3 in the Preparation section.
yum install -y python3
3. Run one of the following commands based on your Python version to download the migration tool:
#x86 version
wget https://mirrors.opencloudos.tech/opencloudos/8.6/AppStream/x86_64/os/Packages/migrate2opencloudos-1.0-1.oc8.noarch.rpm
#ARM version
wget https://mirrors.opencloudos.tech/opencloudos/8/AppStream/aarch64/os/Packages/migrate2opencloudos-1.0-1.oc8.noarch.rpm
4. Run the following command to install the migration tool. The command will create the migrate2opencloudos.py file in /usr/sbin.
rpm -ivh migrate2opencloudos-1.0-1.oc8.noarch.rpm
5. Run the following command to start migration:
python3 /usr/sbin/migrate2opencloudos.py -v 8
The migration takes some time. When the script execution is completed, the following information is displayed:

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

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

By default, the kernel is the latest version of YUM.
Run the following command to check YUM:
yum makecache
The information shown in the figure below is displayed: