Fix the "failed to leapp preupgrade" error
Resolve the "failed to leapp preupgrade" error that occurs during Linux OS migration with SMC.
Problem description
The "failed to leapp preupgrade" error occurs during Linux OS migration with SMC.
Cause
Possible causes:
-
Invalid package dependencies.
-
Failed to access Yellowdog Updater Modified (YUM) repositories.
-
Invalid mount configurations in the /etc/fstab file.
-
Invalid FTP configurations in the /etc/vsftpd/vsftpd.conf file.
-
Invalid file or path names in the / root directory.
-
Failed to create the specified user space.
Solution
Invalid package dependencies
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

Run the following command to view the error details:
cat /var/log/leapp/leapp-preupgrade.log
The dnf_transaction_check actor found invalid dependencies during package updates. A required package may be missing from the repository, or dependencies may conflict. In this example, the
anolis-indexhtmlpackage required by lynx is not found in the repository. -
Identify the problematic package from the error log and uninstall it. For example, uninstall lynx:
yum remove lynx-2.8.8-0.3.dev15.1.al7.x86_64 -
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.
Failed to access YUM repositories
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

Run the following command:
cat /var/log/leapp/leapp-preupgrade.logThe following error message is reported:
Errors during downloading metadata for repository 'docker-ce-stable-migrate': - Curl error (28): Timeout was reached for https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/stable/repodata/repomd.xml [Connection timed out after 30000 milliseconds] Error: Failed to download metadata for repo 'docker-ce-stable-migrate': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried Errors during downloading metadata for repository 'zabbix-migrate': - Curl error (28): Timeout was reached for http://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/repodata/repomd.xml [Connection timed out after 30000 milliseconds] Error: Failed to download metadata for repo 'zabbix-migrate': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were triedThis error indicates that repositories in
/etc/leapp/files/leapp_upgrade_repositories.repoare unreachable. The failing repositories include nodejs, zabbix, and docker-ce public endpoints.Some ECS instances cannot access these public endpoints.
-
Fix the error based on your ECS instance network access:
-
Your ECS instance cannot access the Internet
In /etc/leapp/files/leapp_upgrade_repositories.repo, replace the public endpoint
http://mirrors.aliyun.com/with the VPC endpointhttp://mirrors.cloud.aliyuncs.com/, or setenabled=0for Internet-only repositories. -
Your ECS instance cannot access VPC
The source server must access the VPC endpoint
http://mirrors.cloud.aliyuncs.com/during migration. Verify that the server is not limited to classic network and that/etc/resolv.confis correctly configured.
-
-
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.
Invalid mount configurations in the /etc/fstab file
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

-
Verify the mount configurations in
/etc/fstab:-
Each file system entry must be on a single line.
-
All file systems must be mountable. Run
mount -ato verify. -
The file must not contain Chinese characters.
-
-
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.
Invalid FTP configurations in the /etc/vsftpd/vsftpd.conf file
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

This error indicates the vsftpd_config_read actor failed. Check
/etc/vsftpd/vsftpd.conffor issues. The following figure shows sample content.
-
Remove Chinese characters from
/etc/vsftpd/vsftpd.conf. Chinese characters are not supported in this file. -
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.
Invalid file or path names in the / root directory
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

This error indicates the root_scanner actor failed. Check the / root directory for invalid characters. The following figure shows sample content.

-
Remove unparseable UTF-8 special characters from file and path names in the / root directory.
-
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.
Failed to create the specified user space
-
Connect to the source server. (Connect to an instance).
-
Check the SMC client error logs.
Locate the log directory (View the SMC client). Sample command:
cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.logReplace 2.7.6 with your actual SMC client version.

Run the following command to view the error details:
cat /var/log/leapp/leapp-preupgrade.log
This error indicates a mount failure caused by an outdated system kernel and software packages. The overlay driver is not loaded.
-
Update the system to CentOS 7.9 to get the latest kernel and packages:
yum update -
Restart the source server and verify that the overlay driver is loaded:
lsmod |grep overlay -
After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.




