Jump to content

How to Upgrade CentOS 7 to AlmaLinux OS on your KVM

Recommended Posts

In this tutorial, you will learn on how to upgrade your operating system from CentOS 7 to AlmaLinux OS manually.

As always, before making any changes to your VPS, you should make a backup of your VPS - save all the essential data. It will be a wise option if anything goes wrong.


  1. First of all, you need to update all the system packages and repositories:

sudo yum update -y

  1. Then you need to reboot your VPS:

sudo reboot

You might be disconnected from your VPS, so you will need to connect to your VPS again.

  1. After that, you need to install the elevate-release package with this command:

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

After the installation is completed, the output should look something like this:

  1. The next step is to install leapp-data-almalinux package:

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

  1. Then, you need to initiate a pre-upgrade check. Down below provided command runs the checks to see if the upgrade will be successful or not and provides a report of possible remediations:

sudo leapp preupgrade

If due to some reason the test fails, all the reasons will be saved in a file that path is /var/log/leapp/answerfile.

  1. If pre-upgrade is successful, you will need to run these commands:

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

  1. Now, you can run the following command to migrate your OS from CentOS 7 to AlmaLinux:

sudo leapp upgrade

It might take up some time, so be patient.

Then reboot your VPS again:

sudo reboot

It might take up to 20-30 minutes; meanwhile, the server will not be accessible via SSH. Do not worry, you can try to access your VPS via Emergency Console and watch how the files are installing.

When the installation is completed, you will be asked to log in. So then you can try to connect to your VPS as root.

Once you log in to your VPS, you can run this command to check your OS version:

cat /etc/redhat-release

If AlmaLiux was installed, you should see a similar output:

And that's it, you have upgraded your OS successfully to AlmaLinux!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...