Linux

How to Convert/Migrate CentOS 7 to AlmaLinux 8

With the recent announcement that F2H would be discontinuing CentOS 7-based instance templates, we wanted to make it as easy as possible for users to upgrade to a different Operating System like AlmaLinux 8. There are a few options that you can choose like Rocky Linux. In this guide, we will convert a CentOS 7 VPS to an Almalinux 8 VPS. AlmaLinux is a good choice for cPanel users because cPanel provided a substantial sum of money in financial backing to the AlmaLinux project. That suggests they intend to support this in the long term. Please ensure you have a backup or snapshot of the system before beginning the process of Conver/Migrate CentOS 7 to AlamLinux 8.

Convert/Migrate CentOS 7 to AlmaLinux 8

Let’s get started. First, update the CentOS 7 system and reboot into the newest Kernel. You must update the server before trying to convert/migrate CentOS 7 to AlmaLinux 8

yum update -y && reboot

AlmaLinux provides a tool via yum to assist in the process of converting a CentOS 7 VPS to AlmaLinux 8. It automates most of the process. Before you continue. Using this tool will make changes to your Operating System. You must take a Snapshot or Backup of the VPS before continuing. Complete loss of data is possible.

Install AlmaLinux ELevate

yum install http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm -y

This migration from CentOS 7 to AlmaLinux 8 will rely on software called Leapp. Leapp is a utility created by Red Hat which facilitates the use of a community lead project which the conversion process will use. It’s also possible to convert your system to other RHEL derivatives by using this process but we will convert different ones in another post.

yum install leapp-upgrade leapp-data-almalinux -y

Preupgrade Check

Leapp provides a great utility that checks the CentOS 7 system is ready to be upgraded to AlmaLinux 8. This will flag any potential issues before they become an issue. It’s not a replacement for a Snapshot or Backup. You must have one of these or both as well. Run the system check.

leapp preupgrade

Running the above command will take a few minutes. After it’s complete you will see a report in the console. The upgrade will not be possible.

This is normal. Issue the below commands in the console.

sudo rmmod pata_acpi
echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config
sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

Now run the preupgrade check again. The CentOS 7 system should now pass the preflight checks and you can proceed to convert the system to AlmaLinux 8.

leapp preupgrade
migrate centos 7 to almalinux 8

If your instance has dual NICs the checks will fail. It’s still safe to proceed. You can also remove the second NIC from the Discovery control panel.

Start Conversion of CentOS 7 to AlmaLinux 8

It’s time to move away from CentOS. Start the process by issuing the command below. This will take a while and you can watch the process in the console. After the upgrade to AlmaLinux 8 is complete you will see the following in the console.

leapp upgrade

You now have an AlmaLinux 8 VPS. All that is left to do is to reboot the system. This reboot will take longer than usual. If you are using the internal consoles, Xterm or NoVNC you will notice the instance update most of the packages on the system.

Additional Resources

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button