How to make an in-place upgrade of a Plesk server from CentOS 7 to AlmaLinux 8?

Comments

27 comments

  • Avatar
    Thomas Schleicher

    You state ELevate does not support a further upgrade to AL9/RHEL9/RL9.

    https://wiki.almalinux.org/elevate/ELevate-quickstart-guide.html

    The ELevate website states differently. Will your Plesk script be supporting a further upgrade 8 to 9 or not?

    0
  • Avatar
    Permanently deleted user

    Hello,

    Thank you for your question. The direct upgrade path from CentOS 7 to Almalinux 9 is not supported. We will consider adding the possibility of adding the upgrade path CentOS 7 -> Almalinux 8 -> Almalinux 9 in the future. However, currently, we are fully concentrated on the CentOS7 -> Almalinux 8 upgrade scenario. 

    The article was updated with this information.

    0
  • Avatar
    Gilberto Greppi

    Hello,
    does this also work for upgrading RHEL 7.9 to RHEL 8.8?
    If it doesn't work, and I need to migrate Plesk from a RHEL 7.9 server to a new one RHEL 8.8  (or directly RHEL 9.2), is there a migrate-procedur?

    0
  • Avatar
    Permanently deleted user

    Hello Gilberto,

    Such an upgrade path is not supported for now. You may use Plesk Migrator extension to transfer all the data to a server with the newer OS instead: https://support.plesk.com/hc/en-us/articles/12377889325719.

    0
  • Avatar
    Mikhail Romashko

    no success with upgrade

    0
  • Avatar
    Mikhail Romashko

    I got unknown error during the process

    0
  • Avatar
    Roberto Biagiotti

    Thank you for providing the script for in-place upgrading a Plesk server from CentOS 7 to AlmaLinux 8. I am using CloudLinux 7.9 (Boris Yegorov) based on Plesk Obsidian v18.0.59_build1800240229.10 os_CentOS 7.

    I would like to know if this script is compatible with CloudLinux 7.9. If not, are there any plans to make it compatible in the future?

     

    0
  • Avatar
    Lukáš Švec

    How much extra space will it take to upgrade to a new OS?

    If I have about 7GB of free space, how much free space approximately will remain after the upgrade?

    0
  • Avatar
    Leonid Gukhman

    @Lukáš Švec 

    Hi, I got 1.5GB of disk space filled during the conversion on a test server. To be on a safe side, I would suggest at least 2GB, so you should be fine with 7GB.

    1
  • Avatar
    Ali Rezaye (Edited )

    Hi there,

    I am getting below error while trying to doing instructions (CentOS to AlmaLinux:

    //// error
    [root@symbiota2 ~]# clear
    [root@symbiota2 ~]# ls
    README.pdf  centos2alma  centos2alma-1.3.1.zip  parallels
    [root@symbiota2 ~]# chmod 7555 centos2alma
    [root@symbiota2 ~]# ./centos2alma
    Doing preparation checks...
    Preparation checks failed: Exception during checking of required pre-conversion condition 'checking if the last installed kernel is in use'
    Traceback (most recent call last):
      File "/root/centos2alma/pleskdistup/common/src/action.py", line 471, in make_checks
        if not check.do_check():
      File "/root/centos2alma/pleskdistup/common/src/action.py", line 443, in do_check
        return self._do_check()
      File "centos2almaconverter/actions/common_checks.py", line 88, in _do_check
        last_installed_kernel_version = self._get_last_installed_kernel_version()
      File "centos2almaconverter/actions/common_checks.py", line 85, in _get_last_installed_kernel_version
        return max(versions)
    ValueError: max() arg is an empty sequence

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "pleskdistup/main.py", line 107, in required_conditions_satisfied
        failed_checks = check_flow.make_checks()
      File "/root/centos2alma/pleskdistup/common/src/action.py", line 474, in make_checks
        raise RuntimeError(f"Exception during checking of required pre-conversion condition {check.name!r}") from e
    RuntimeError: Exception during checking of required pre-conversion condition 'checking if the last installed kernel is in use'

    Conversion can't be performed due to the problems noted above

    1
  • Avatar
    Daniel Neveloff (Edited )

    Hello,

    Getting the same error as above. Can confirm that I'm attempting an upgrade from Centos 7.9.2009. Do you have any input or additional insight on the error?

    Here are some commands and outputs that may assist.

    /usr/bin/rpm -q -a kernel kernel-plus kernel-rt-core

    kernel-3.10.0-693.el7.x86_64
    kernel-3.10.0-693.21.1.el7.x86_64
    kernel-3.10.0-693.2.2.el7.x86_64

    rpm -q -a kern*

    kernel-tools-3.10.0-693.21.1.el7.x86_64
    kernel-tools-libs-3.10.0-693.21.1.el7.x86_64
    kernel-headers-3.10.0-693.21.1.el7.x86_64
    kernel-3.10.0-693.el7.x86_64
    kernel-3.10.0-693.21.1.el7.x86_64
    kernel-3.10.0-693.2.2.el7.x86_64



    Thank you!

    0
  • Avatar
    Richard Fincher

    I have tried two production boxes so far, and both worked without incident, once I removed the no-longer-compatible versions of PHP/5.x and PHP/7.0.x

    I have more boxes still to do, which are more complex than the first two but I'm optimistic that the script will perform as intended

    0
  • Avatar
    Sean Bremner

    Would the Plesk team be able to assist me with this migration if I signed up for the Technical Support Subscription?

    1
  • Avatar
    Jorge Ceballos

    Thanks for the script; I have a couple of issues:

    Uninstalled PHP 7.0 using cli "plesk installer remove --components php7.0" and in the plesk installer page, php 7.0 is not shown - though php 7.4 does - 
    When running the script it returns:

    Not supported PHP versions were detected: PHP 7.0.
            Remove unsupported PHP packages via Plesk Installer to proceed with the conversion:
            You can do it by calling the following command:
            plesk installer remove --components php7.0

    Please advice,

    Thanks in advance

    0
  • Avatar
    Niels Deuter

    Required pre-conversion condition 'checking if grub is installed' not met:
            The /etc/default/grub file is missing. GRUB may not be installed.
            Make sure that GRUB is installed and try again.

    Required pre-conversion condition 'checking if the last installed kernel is in use' not met:
            The last installed kernel is not in use.
            The kernel version in use is '3.10.0'. The last installed kernel version is '3.10.0-1160.119.1.el7.tuxcare.els2.x86_64'.
            Reboot the system to use the last installed kernel.

    Required pre-conversion condition 'check if the system not in a container' not met:
            The system is running in a container-like environment (Virtuozzo container). The conversion is not supported for such systems.
    Conversion can't be performed due to the problems noted above

     

    And now I have no idea what to do ;-)

    0
  • Avatar
    Leonid Gukhman

    @Niels Deuter

    It seems that the main issue here is that the server is a container; conversion of such systems is not yet supported by the script.

    0
  • Avatar
    Rama Cesur (Edited )

    Linux xxxxx.ltd 4.19-ovh-xxxx-std-ipv6-64 #2766749 SMP Thu Apr 6 08:32:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

    [root@ns2 ~]# ./centos2alma
    Doing preparation checks...
    Required pre-conversion condition 'check if Plesk installer is in progress' not met:
            The conversion process cannot continue because Plesk Installer is working.
            Please wait until it finishes or call 'plesk installer stop' to abort it.

    Required pre-conversion condition 'checking if there is more than one NIC interface using kernel-name' not met:
            The system has one or more network interface cards (NICs) using kernel-names (ethX).
            Leapp cannot guarantee the interface names' stability during the conversion.
            Give those NICs persistent names (enpXsY) to proceed with the conversion.
            Intarfeces: eth1, eth0

    Required pre-conversion condition 'checking if the Red Hat kernel is installed' not met:
            No Red Hat signed kernel is installed.
            To proceed with the conversion, install a kernel by running:
            - 'yum install kernel kernel-tools kernel-tools-libs'
            After installing the kernel fix the grub configuration by calling:
            - `grub2-set-default 'CentOS Linux (newly_installed_kernel_version) 7 (Core)'`
            - `grub2-mkconfig -o /boot/grub2/grub.cfg`
            - `reboot`

    Required pre-conversion condition 'checking if the last installed kernel is in use' not met:
            There is no appropriate kernel package installed.
            To proceed with the conversion, install a kernel by running: 'yum install kernel kernel-tools kernel-tools-libs'

    Required pre-conversion condition 'checking if all packages are up to date' not met:
            There are packages which are not up to date. Call `yum update -y && reboot` to update the packages.

    Conversion can't be performed due to the problems noted above
    [root@ns2 ~]#

    this code below doesn't worked for me
    sudo vi /etc/default/grub
    GRUB_CMDLINE_LINUX="net.ifnames=1 biosdevname=0"
    sudo grub2-mkconfig -o /boot/grub2/grub.cfg
    sudo reboot
    0
  • Avatar
    Francesc Benavent

    It seems that the OS locale has to be set to english. If set to spanish the conversion fails with the error:
    UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 15: invalid continuation byte

    0
  • Avatar
    Victor (Edited )

    Hi, just tested the updated script on my Plesk Centos 7 server on AWS.

    The previous version gave a leapp error (something about a repo version mismatch).

    This update seemed to run well, until I got kicked out of my SSH session.

    Logged in again and saw the message below. Running both commands showed me: 

    Conversion process is not running.

    How to proceed from here? Minor detail, I'm not logged in as root user, and executed the conversion script with the sudo command.

    ===============================================================================
    Message from the Plesk dist-upgrader tool:
    The server is being converted to AlmaLinux 8. Please wait. During the conversion the
    server may reboot itself a few times.
    To see the current conversion status, run the '/home/centos/centos2alma --status' command.
    To monitor the conversion progress in real time, run the '/home/centos/centos2alma --monitor' command.
    ===============================================================================

     

    UPDATE

    I've checked the log, and found these errors:

    2024-09-27 11:01:58,050 - ERROR - Command ['/usr/bin/leapp', 'preupgrade'] failed with return code 1
    2024-09-27 11:01:58,050 - ERROR - Failed: doing the conversion. The reason: Command '['/usr/bin/leapp', 'preupgrade']' returned non-zero exit status 1.
    2024-09-27 11:01:58,145 - DEBUG - Going to write json '/usr/local/psa/var/centos2alma/actions.json' with new data

    And in the leapp report:

    Risk Factor: high (error)

    Title: Actor target_userspace_creator unexpectedly terminated with exit code: 1

    Summary: Traceback (most recent call last):

      File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run

        actor_instance.run(*args, **kwargs)

      File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run

        self.process(*args)

      File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/actor.py", line 58, in process

        userspacegen.perform()

      File "/usr/lib/python2.7/site-packages/leapp/utils/deprecation.py", line 42, in process_wrapper

        return target_item(*args, **kwargs)

      File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 857, in perform

        _create_target_userspace(context, indata.packages, indata.files, target_repoids)

      File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 825, in _create_target_userspace

        prepare_target_userspace(context, target_path, target_repoids, list(packages))

      File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 230, in prepare_target_userspace

        run(['rm', '-rf', userspace_dir])

      File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 192, in run

        result=result

    CalledProcessError: Command ['rm', '-rf', '/var/lib/leapp/el8userspace'] failed with exit code 1.

    0
  • Avatar
    Leonid Gukhman

    @Victor
    Please check the OS version, chances are the conversion has been completed. The SSH connection interruption is expected, since server is rebooted during the conversion, and is then proceeded with automatically.

    0
  • Avatar
    Victor

    Leonid Gukhman

    It's still on 7. I've updated my comment with error messages.

    0
  • Avatar
    Victor

    Leonid Gukhman

    The upgrade seems to be working now. I had to disable the postgresql.repo entries in /etc/leapp/files/vendor.d because this repo failed with a 404. I don't have postgresql installed (plesk installer), but rpm showed me postgresql 9.4 and 10 packages.

    0
  • Avatar
    ITS Inc

    @Leonid Gukhman

    https://www.plesk.com/kb/support/how-to-make-an-in-place-upgrade-of-a-plesk-server-from-centos-7-to-almalinux-8/ links to this page as the “full article.”  However that page starts a list of Requirements and Limitations that is cut off (with the link here).  This page does not list any of those.  Are those no longer limitations? Or, can the complete list be added to this article?

    0
  • Avatar
    Rama Cesur
    server is down after restart
    
    Doing preparation checks...
    ( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:23 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:24 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:25 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:26 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:27 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:28 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:29 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:30 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:31 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:32 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:33 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:34 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:35 / 31( stage Prepare configurations / action recreate awstat configuration files for domains ) 01:36 / 31****************************** WARNING ***********************************************
    The conversion is ready to begin. The server will be rebooted in 45 seconds.
    The conversion process will take approximately 25 minutes. If you wish to prevent the reboot, simply
    terminate the centos2alma process. Please note that Plesk functionality is currently unavailable.
    **************************************************************************************
    ( stage Pause before reboot / action pause before reboot ) 17:18 / 31:12
    **************************************************************************************
    The dist-upgrade process needs to reboot the server. It will be rebooted in several seconds.
    The process will resume automatically after the reboot.
    Current server time: 03:19:59.
    To monitor the disupgrade status use one of the following commands:
       /root/centos2alma --status
    or
       /root/centos2alma --monitor
    **************************************************************************************
    
    0
  • Avatar
    Rama Cesur
    2024-12-19 03:45:27,570 - ERROR - Command ['/usr/bin/yum', 'install', '--repo', 'alma-mariadb', '-y', 'MariaDB-client', 'MariaDB-server'] failed with return code 1
    2024-12-19 03:45:27,571 - ERROR - Failed: update modern mariadb. The reason: Command '['/usr/bin/yum', 'install', '--repo', 'alma-mariadb', '-y', 'MariaDB-client', 'MariaDB-server']' returned non-zero exit status 1.
    2024-12-19 03:45:28,089 - DEBUG - Error report: [centos2alma] (dist-upgrader 508dbf9ae8a1d4855b1cdfa1bc9ee89db4d73ef7, upgrader module Plesk::Centos2AlmaConverter 1.4.4-31bb147c) process has failed. Error: Failed: update modern mariadb. The reason: Command '['/usr/bin/yum', 'install', '--repo', 'alma-mariadb', '-y', 'MariaDB-client', 'MariaDB-server']' returned non-zero exit status 1.
    
    0

Please sign in to leave a comment.

Have more questions? Submit a request