All Products
Search
Document Center

Server Migration Center:What do I do if the "failed to leapp upgrade" error message appears?

Last Updated:May 13, 2024

This topic describes the cause of the "failed to leapp upgrade" error message that is reported when you use Server Migration Center (SMC) to migrate a Linux operating system. This topic also describes how to resolve the error.

Problem description

The "failed to leapp upgrade" error message is reported when a Linux operating system is migrated to Anolis OS by using SMC.

Cause

This error may occur due to the following causes:

  • Failed to download software packages.

  • Invalid mount configurations in the /etc/fstab file.

Solution

Failed to download software packages

  1. Connect to the source server. For more information, see Connect to an instance.

  2. View the error logs in the log directory of the SMC client.

    For more information about the directories of the SMC client, see View the SMC client. Sample command:

    cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.log

    In the preceding command, 2.7.6 is the version number of the SMC client. Replace the version number with the actual value.

    image

    Run the following command. The error message in the following figure is reported.

    cat /var/log/leapp/leapp-preupgrade.log

    image

    The preceding error information indicates that invalid dependencies are found by the dnf_transaction_check actor during the update of software packages. This may occur if a required software package does not exist in the specified repository or software packages on which the current software package depends conflict with each other. For example, the preceding error information indicates that the anolis-indexhtml package on which the lynx package depends is not found in the specified repository during the update of the lynx package.

  3. Analyze the dependencies that are mentioned in the error information and uninstall the software package that causes the error. For example, to resolve the preceding error, run the following command to uninstall lynx:

    yum remove lynx-2.8.8-0.3.dev15.1.al7.x86_64
  4. After the error is resolved, run the SMC client and retry the migration job. For more information, see Run the SMC client.

Invalid mount configurations in the /etc/fstab file

  1. Connect to the source server. For more information, see Connect to an instance.

  2. View the error logs in the log directory of the SMC client.

    For more information about the directories of the SMC client, see View the SMC client. Sample command:

    cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.log

    In the preceding command, 2.7.6 is the version number of the SMC client. Replace the version number with the actual value.

    image

  3. Check the mount configurations in the /etc/fstab file based on the error information.

    • Make sure that the entry for each file system is written in one line. Do not write an entry in multiple lines due to too many parameters.

    • Make sure that all file systems can be mounted. You can run the mount -a command to check whether a file system can be mounted.

    • Make sure that the configuration file does not contain Chinese characters.

  4. After the error is resolved, run the SMC client and retry the migration job. For more information, see Run the SMC client.