x2openEuler User Guide
About this Document
Introduction
This document describes how to obtain the x2openEuler installation package, how to install and use the tool, and the UI and features of x2openEuler.
Intended Audience
This document is intended for:
- openEuler OS users
- Software developers
Symbol Conventions
The symbols that may be found in this guide are defined as follows:
Command Format Conventions
Change History
Disclaimer
NOTICE: This tool escalates the privileges of the following commands for the hardware assessment and configuration analysis purposes:
- /bin/cat /boot/grub2/grub.cfg
- /usr/sbin/lspci -nvvv
- /usr/sbin/lspci -xxx
- /bin/netstat -npl
- /usr/sbin/sysctl -a
- /usr/sbin/dmidecode -t bios -t system -t baseboard -t chassis -t processor -t memory -t cache -t connector -t slot
- /usr/sbin/dmidecode -s system-product-name
- /bin/cat /boot/efi/EFI/centos/grub.cfg
This tool analyzes the system information and collect system configurations from the following files for the configuration analysis purpose:
- /boot/grub2/grub.cfg
- /etc/default/grub
- /usr/include/asm/unistd_64.h
- /etc/fstab
- /etc/profile
- /etc/sysctl.conf
- /boot/conifg-*
- To prevent impact on services in the production environment, it is recommended that you use this tool in a non-production environment.
- Before uploading the source code or software package, ensure that you are the owner of the source code or software package or have obtained full authorization and consent from the owner of the source code or software package.
- No individual or organization shall use the source code for any purpose without the authorization of the source code owner.
- No individual or organization shall spread the source code or software package without the authorization of the owner of the source code or software package.
- The assessment reports are for reference only and do not have legal effect or constitute specific guidelines or legal suggestions of any kind.
- You shall bear all risks arising from your use of the assessment suggestions and related content.
- The source code or software package will be uploaded to the working directory of the current server for compatibility assessment. This tool does not use the source code or software package for any other purposes. Users who log in to the same server using other user names do not have the permission to view the files in your working directory.
- If the software package contain JAR packages, this tool decompiles the JAR packages for compatibility assessment and analysis. This tool does not use the JAR packages for any other purposes.
Overview
The x2openEuler migration assessment tool is a lightweight end-to-end tool provided for developers based on Visual Studio Code to perform software migration analysis for openEuler. It supports software assessment, configuration collection and assessment, and hardware assessment. The x2openEuler plug-in functions as a client to invoke the server tool to scan and analyze the software to be migrated. It provides professional code migration guidance to greatly simplify the process of migrating applications from CentOS to openEuler. Before migrating software from CentOS to openEuler, you can use this tool to analyze the software portability and estimate migration workload. It addresses the problems of heavy workload, low accuracy, and poor overall efficiency in manual analysis.
The x2openEuler tool has the following features:
Software assessment
Scans and assesses rpm, tar, zip, gzip, jar, py, pyc, sh, and bin packages by identifying the list of software packages on which the applications depend, and generates an assessment report in the HTML format.
Environment configuration collection and assessment
Collects user environment data and generates JSON files. Collects information about hardware configurations, configuration interfaces, kernel option configuration parameters, system configuration parameters (sysctl, proc, and sys), environment variables, services, processes, ports, command interfaces, system call items, and device driver interfaces. Analyzes and assesses the configuration information.
Hardware assessment
Checks whether the entire system (x86/AArch64) and plug-in cards (RAID/NIC/FC/IB/GPU/SSD/TPM) in the running environment are in the openEuler compatibility list.
Installation
Installing x2openEuler
Environment Requirements
NOTE This tool applies only to development and testing environments.
Physical Machine Specifications
x2openEuler can be installed and run on physical machines. Table 1 lists the requirements for physical machines.
Table 1 Hardware requirements
| |
Virtual Machine Specifications
x2openEuler can be installed on a VM. Table 2 lists the VM requirements.
Table 2 VM requirements
Source OS Requirements
Table 3 lists the OS requirements of the running environment.
Table 3 Source OS requirements
x86_64: CentOS-6.8-x86_64-bin-DVD1.iso | ||
x86_64: CentOS-8.2.2004-x86_64-dvd1.iso | ||
NOTE If the server cannot access the network or the Yum source of the OS has been modified, an OS image file is required for installing dependency packages during the tool installation. For details about the required OS image file, see Table 3. Obtain the image file of the corresponding OS version.
Target OS Requirements
Table 4 lists the requirements for the target OS.
Table 4 Target OS requirements
Dependencies
Table 5 lists the dependencies that will be installed during the x2openEuler installation.
Table 5 Dependencies
Portable library for accessing the PCI bus configuration register. | ||
Obtaining the Software Package
Table 6 lists the software packages used for the installation.
Table 6 Tool installation packages
NOTE x.x-x in the software package name indicates the version.
Performing the Installation
Prerequisites
- An x86 server or a Kunpeng server powered by 916 or 920 processors is available.
- The OS has been installed. For details about the OS version requirements, see Table 3.
- An SSH remote login tool, such as Xshell, MobaXterm, and PuTTY, is installed.
Procedure
NOTICE
- Before installing x2openEuler, ensure that the network connection is normal. If the OS cannot access the network, configure the Yum source by referring to Configuring the Yum Source for the OS.
- Before reinstalling x2openEuler, uninstall x2openEuler of other versions.
This section uses CentOS (x86_64) as an example to describe how to install the x2openEuler tool using the following methods:
Manually Downloading and Installing x2openEuler on the Server
Use an SSH tool to remotely log in to the CentOS CLI as a common user.
Run the following command to switch to the root user.
su - root
Use an SSH remote login tool to copy the x2openEuler installation package obtained in Obtaining the Software Package to any path.
Run the following command to go to the directory where the x2openEuler installation package is stored:
cd PATH
Run the following command to install x2openEuler. In the command, x2openEuler-x.x-x.x86_64.rpm indicates the name of the x2openEuler installation package. Replace it with the actual name.
NOTICE x2openEuler can be used only by the x2openEuler user. Therefore, the x2openEuler user is automatically created during the x2openEuler installation. If the x2openEuler user already exists in the system, ensure that the x2openEuler user has the permissions to use x2openEuler before installing the tool. Otherwise, the tool may fail to run properly.
yum install x2openEuler-x.x-x.x86_64.rpm
After the installation is complete, the user-related directories are as follows:
/var/log/x2openEuler # Directory for storing tool log files /var/log/aparser # Directory for storing the log files of the configuration collector. /opt/x2openEuler/output # Default report output directory /opt/x2openEuler/update # Configuration file update directory (used to store update packages and corresponding license files) /etc/x2openEuler/config # Directory for storing static configuration files /etc/x2openEuler/sqlite # Directory for storing database files /usr/local/x2openEuler # Directory for storing program files /opt/x2openEuler/source # Directory for storing compatibility data files
NOTE During the installation, if the message error: Failed dependencies: is displayed, the dependency packages are missing. Rectify the fault by referring to Installation Fails Due to Missing Dependency Packages.
Set the password for the x2openEuler user.
passwd x2openEuler
NOTE: Password for logging in as the user. The password must meet the following complexity requirements:
- Contains 8 to 32 characters.
- Contains at least two types of the following characters: uppercase letters, lowercase letters, digits, and special characters (`~!@#$%^&*()-_=+\|[{}];:'",<.>/?).
- Cannot contain any space.
- Cannot be the same as the user name.
Run the following command to switch to the x2openEuler user and the home directory /home/x2openEuler of the x2openEuler user:
NOTICE The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user and change the working directory to the home directory of the x2openEuler user.
su - x2openEuler
Using the x2openEuler Extension for One-click Installation
After Installing the x2openEuler Extension Click . Read and accept the disclaimer. The Configuration Guide page of the x2openEuler extension is displayed. Choose Deploying x2openEuler. The tool deployment page is displayed.
On the tool deployment page, configure tool deployment parameters to install x2openEuler. For details about the parameters, see Table 7.
Table 7 Deployment parameters
After you click Deploy, the Preparing for Installation page is displayed. Set the password for the x2openEuler user. If the target server is not connected to the Internet, upload the x2openEuler installation package. Click Next to deploy the tool.
Figure 3 Preparing for installation
NOTE: The password must meet the following complexity requirements:
- Contains 8 to 32 characters.
- Contains at least two types of the following characters: uppercase letters, lowercase letters, digits, and special characters (`~!@#$%^&*()-_=+\|[{}];:'",<.>/?).
- Cannot contain any space.
- Cannot be the same as the user name.
After the tool is installed, the message x2openEuler is deployed successfully is displayed. Click Configure Remote Server and configure the server by referring to Configuring the Remote Server. If the tool fails to be deployed, deploy the tool again by referring to the information in the output at the bottom of VS Code.
Verification
Verifying the Installation Through Extension
Log in to the x2openEuler extension page by referring to Using x2openeuler Through the Extension. If the login is successful, x2openEuler is installed.
Verifying the Installation Through CLI
Use an SSH tool to remotely log in to the CentOS CLI.
Run the following command to switch to the x2openEuler user:
su - x2openEuler
Run the following command to check the tool version:
x2openEuler -v
If the following information is displayed, the installation is successful. In the command output, x.x.x indicates the version.
x2openEuler x.x.x
Uninstallation
Prerequisites
No tasks are running.
Procedure
Use an SSH tool to remotely log in to the CLI as the root user.
Run the following command to uninstall the x2openEuler tool:
rpm -e x2openEuler
NOTE
- If a task is running, you need to stop the task or wait until the task is complete. Otherwise, the tasks that are running will be stopped.
- After the uninstallation is complete, delete the x2openEuler user to ensure system security.
Installing the x2openEuler Extension
Environment Requirements
The current version has been verified on the following OSs:
- Windows 10
- macOS 10.0 x86
- macOS 10.0 ARM
Installation Methods
NOTE: This extension is compatible with the latest VS Code.
Installing the Extension from Visual Studio Code Marketplace
In the Extensions menu of Visual Studio Code, search for x2openEuler and click Install.
After the installation is complete, choose from the primary side bar to open the x2openEuler extension.
Feature Guide
NOTICE:
- If a user is idle for a long time after logging in to the server, security risks may exist. You are advised to perform the steps in Configuring the Timeout Interval on the server to improve system security.
- You are not advised to use multiple clients to operate the x2openEuler tool on the same remote server at the same time.
- When different clients upload files with the same name to the same remote server, the older file is overwritten.
Using x2openeuler Through the Extension
Configuring the Remote Server
Prerequisites
The x2openEuler tool and x2openEuler extension have been installed.
Procedure
Click in the primary side bar of VS Code to open the x2openEuler extension.
In the primary side bar, click Configure Remote Server. The page shown in Figure 1 is displayed. Table 8 describes the parameters.
Figure 4 Configuring the remote server
Table 8 Parameters for configuring the remote server
Set the parameters based on the site requirements and click Start Configuration.
After the configuration is successful, the x2openEuler Wizard page is displayed, as shown in Figure 5. In x2openEuler Wizard, you can create an assessment task immediately.
Remote Server Management
Prerequisites
- The x2openEuler extension has been installed.
- The remote server has been configured.
Procedure
In the primary side bar of VS Code, select Remote Server Management. You can click for Configuring the Remote Server.
In the primary side bar of VS Code, select Remote Server Management. You can click to clear the saved servers. In the dialog box that is displayed in the lower right corner, click OK to clear the saved servers.
In the primary side bar of VS Code, select Remote Server Management. You can click to expand the saved server list. Select a saved server record, click to clear the saved server, or click to edit the server.
Software Assessment
Description
Software migration assessment helps users assess the migrating from CentOS 6.8, 7.6, and 8.2 to openEuler 20.03 LTS SP1.
Execution
Prerequisites
The x2openEuler extension has been installed and the remote server has been configured.
The x2openEuler tool has been installed.
Procedure
In the primary side bar, select Software Assessment and click to create a task.
In the analysis task creation area, select Single Application or Multiple Applications and set the following parameters:
NOTE: Single Application and Multiple Applications are mutually exclusive. Select either of them based on the site requirements.
Figure 8 Creating a software assessment task
Table 9 Parameters for creating a software assessment task
Click Start Assessment to generate an assessment report.
After the assessment is complete, the assessment report details page is displayed, as shown in Figure 9. For details about the parameters, see Table 10.
NOTE:
- During the task execution, you can click Cancel Assessment to cancel the assessment task.
- In the analysis report list, you can click the report name of a specified analysis task to view the analysis report.
- The name of the analysis report consists of the name of the scanned software package and the time when the report is generated.
Figure 9 Software assessment report
Table 10 Parameters in the software assessment report
On the Create Task page, you can download or delete the software assessment reports from the Historical Reports area on the right.
NOTE: The assessment reports are stored in the /opt/x2openEuler/output/ directory in the running environment. If you delete an assessment report from the historical reports on the page, the assessment report will not be completely deleted. To completely delete an assessment report, delete the file in the running environment.
Configuration Collection and Assessment
Description
The configuration collection and assessment function helps users automatically identify the current server environment architecture and collects configuration information from the user environment for assessment and analysis.
Execution
Prerequisites
The x2openEuler extension has been installed and the remote server has been configured.
The x2openEuler tool has been installed.
Procedure
In the primary side bar, choose Configuration Collection and Assessment and click to create a task.
In the assessment task creation area, select Assessment or Collection and set the following parameters:
NOTE:
- Assessment and Collection are mutually exclusive. Select either of them as required.
- The Assessment function can be used to assess the configuration information of the current server environment or analyze the environment of other servers using Externally imported.
Figure 10 Creating a configuration collection and assessment task
Table 11 Parameters for creating a configuration collection and assessment task
Click Start Assessment to generate an assessment report.
After the assessment is complete, the assessment report details page is displayed, as shown in Figure 11. For details about the parameters, see Table 12.
NOTE:
- During the task execution, you can click Cancel Assessment to cancel the assessment task.
- In the analysis report list, you can click the report name of a specified analysis task to view the analysis report.
Figure 11 Configuration collection and assessment report
Table 12 Parameters in the configuration collection and assessment report
On the Create Task page, you can download or delete the configuration assessment reports from the Historical Reports area on the right.
NOTE: The assessment reports are stored in the /opt/x2openEuler/output/ directory in the running environment. If you delete an assessment report from the historical reports on the page, the assessment report will not be completely deleted. To completely delete an assessment report, delete the file in the running environment.
Hardware Assessment
Description
The hardware assessment function allows you to analyze and assess hardware information in the user environment.
NOTE: Hardware assessment tasks can be performed only on physical machines.
Execution
Prerequisites
The x2openEuler extension has been installed and the remote server has been configured.
The x2openEuler tool has been installed.
Procedure
In the primary side bar, choose Hardware Assessment and click to create a task.
In the analysis task creation area, select Local or Externally Imported and set the following parameters:
NOTE:
- Local and Externally Imported are mutually exclusive. Select either of them as required.
- It is recommended that hardware assessment tasks be performed on physical machines.
Figure 12 Creating a hardware assessment task
Table 13 Parameters for creating a hardware assessment task
- Local: Scans and collects hardware information about the current server environment.
- Externally Imported: Allows you to upload the information collected using Hardware Assessment in the tar.gz format.
Click Start Assessment to generate an assessment report.
After the assessment is complete, the assessment report details page is displayed, as shown in Figure 13. For details about the parameters, see Table 14.
NOTE:
- During the task execution, you can click Cancel Assessment to cancel the assessment task.
- In the analysis report list, you can click the report name of a specified analysis task to view the analysis report.
Figure 13 Hardware assessment report
Table 14 Parameters in the hardware assessment report
On the Create Task page, you can download or delete the hardware assessment reports from the Historical Reports area on the right.
NOTE: The assessment reports are stored in the /opt/x2openEuler/output/ directory in the running environment. If you delete an assessment report from the historical reports on the page, the assessment report will not be completely deleted. To completely delete an assessment report, delete the file in the running environment.
Using x2openEuler through CLI
Software Assessment
Description
Software migration assessment helps users assess the migrating from CentOS 6.8, 7.6, and 8.2 to openEuler 20.03 LTS SP1.
Execution
Scanning Application Packages Using CLI
Prerequisites
NOTE:
The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user and change the working directory to the home directory of the x2openEuler user.
Use an SSH remote login tool to log in as the x2openEuler user.
Description
Scans and analyzes a single application or multiple applications to assess the feasibility of migrating applications from the source OS to the target OS.
Format
x2openEuler scan [-arch ARCH] [-os_name OS_NAME] [-target_os_name TARGET_OS_NAME] {filename | directoryname}
x2openEuler scan -batch [-arch ARCH] [-os_name OS_NAME] [-target_os_name TARGET_OS_NAME] directoryname
Parameter Description Table 15 Parameter description
Example
The following describes how to assess the wpa_supplicant-2.6-1.el7.x86_64.rpm application package and generate the software assessment report. Select the required parameters and replace the package name with the software package or directory to be scanned based on the site requirements.
x2openEuler scan wpa_supplicant-2.6-1.el7.x86_64.rpm
The command output is as follows:
2021-11-30 09:12:01,222 - INFO - x2openEuler scan /home/x2openEuler/wpa_supplicant-2.6-12.el7.x86_64.rpm -os_name centos7.6 -target_os_name openEuler20.03-LTS-SP1 -arch x86_64
2021-11-30 09:12:01,224 - INFO - Start unpacking package wpa_supplicant-2.6-12.el7.x86_64.rpm
2021-11-30 09:12:01,768 - INFO - Decompression completed
2021-11-30 09:12:01,768 - INFO - Start scanning so...
2021-11-30 09:12:06,046 - INFO - Start scanning dependencies...
2021-11-30 09:12:09,089 - INFO - Start scanning C/C++ interfaces...
2021-11-30 09:12:26,422 - INFO - Start scanning Jar interfaces...
2021-11-30 09:12:26,423 - WARNING - No jars found
2021-11-30 09:12:27,851 - INFO - Start scanning Python imcenport's package...
2021-11-30 09:12:35,942 - INFO - Start generating HTML report...
2021-11-30 09:12:35,960 - INFO - Generate Success! The results are saved: /opt/x2openEuler/output/wpa_supplicant-2.6-12.el7.x86_64-20211130091235.html
In the command output, /opt/x2openEuler/output/wpa_supplicant-2.6-12.el7.x86_64-20211130091235.html is the assessment report file.
NOTE: Software compatibility assessment report displays dependency package compatibility, C/C++ interface compatibility, JDK interface compatibility, and Java interface compatibility.
- Dependency package compatibility: shows the direct dependency of a software package. If the result is not 100%, the software package cannot be directly installed.
- Interface compatibility: shows the changes of the invocation of other software packages, dynamic libraries, and system interfaces by a software. If the result is not 100%, exception may occur when a function is invoked. You are advised to manually review the results. The suggested priority is: openEuler packages > packages recompiled on openEuler> CentOS packages.
Environment Configuration Collection and Assessment
Description
The configuration collection and assessment function helps users automatically identify the current server environment architecture and collects configuration information from the user environment for assessment and analysis.
Execution
Collecting Configuration and Hardware Information Using CLI Commands
Prerequisites
NOTICE
- The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user and change the working directory to the home directory of the x2openEuler user.
- You need to enter the password of the x2openEuler user for multiple times when using this function.
Use an SSH remote login tool to log in as the x2openEuler user.
Description
Collects the configuration and hardware information of the current environment.
Format
x2openEuler conf-collect
Example
The following uses the collection of the current environment configuration information as an example. No additional parameters are set. Determine whether to collect environment configuration information based on the site requirements.
x2openEuler conf-collect
The command output is as follows:
2021-11-30 09:13:39,172 - INFO - x2openEuler conf-collect
2021-11-30 09:13:39,173 INFO manager/get_param_config/179: Parameter configuration file loaded.
2021-11-30 09:13:39,197 INFO manager/get_regex_config/218: Regex pattern compiled.
2021-11-30 09:13:39,197 INFO manager/load_parsers/233: All builtin parsers loaded.
2021-11-30 09:13:39,198 INFO manager/load_parsers/236: All custom parsers loaded.
2021-11-30 09:13:39,622 INFO time_utils/wrapper/21: 0.42s taken for running function [get_data]
2021-11-30 09:13:39,644 WARNING list/parse_content/47: no data in ls_usr_bin
2021-11-30 09:13:39,646 WARNING list/parse_content/47: no data in ls_usr_sbin
2021-11-30 09:13:39,720 INFO time_utils/wrapper/21: 0.10s taken for running function [get_parsed_content]
2021-11-30 09:13:39,720 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/kernel_startup_param.json.
2021-11-30 09:13:39,721 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/syscall_interface.json.
2021-11-30 09:13:39,721 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/path.json.
2021-11-30 09:13:39,722 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/port.json.
2021-11-30 09:13:39,722 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/device_interface.json.
2021-11-30 09:13:39,722 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/linux_command.json.
2021-11-30 09:13:39,730 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/hardware_configure.json.
2021-11-30 09:13:39,732 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/proc.json.
2021-11-30 09:13:39,734 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/system_configure.json.
2021-11-30 09:13:39,736 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/system_service.json.
2021-11-30 09:13:39,746 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_6glzc3gv_/run/c0132d4a-517a-11ec-af45-000c296b94c0/sysconf/kernel_configure.json.
2021-11-30 09:13:39,784 - INFO - The system configs are saved: /opt/x2openEuler/output/sysconf-20211130091339.tar.gz
In the command output, /opt/x2openEuler/output/sysconf-20211130091339.tar.gz is the collected information package. The JSON files in the information package are described as follows:
- kernel_startup_param.json: configuration interfaces and kernel startup parameters
- syscall_interface.json: system call interfaces
- path.json: PATH environment variable information
- port.json: port information, which is dynamic
- device_interface.json: device driver interfaces to provided device interfaces in user mode
- linux_command.json: Linux command interfaces
- hardware_configure.json: hardware configuration information of the x86 or AArch64 devices
- proc.json: process information, which is dynamic
- system_configure.json: system configuration parameters (sysctl, proc, and sys), which is dynamic
- system_service.json: system service
- kernel_configure.json: kernel option configuration parameter information, which is static
Analyzing Configuration Information Using CLI Commands
Prerequisites
NOTICE
- The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user and change the working directory to the home directory of the x2openEuler user.
- You need to enter the password of the x2openEuler user for multiple times when using this function.
Use an SSH remote login tool to log in as the x2openEuler user.
Description
Analyzes and assesses the configuration information scanned locally or imported externally.
Format
x2openEuler conf-analyse [-os_name OS_NAME][-target_os_name TARGET_OS_NAME] [-local | -load LOAD [-arch ARCH]]
Parameter Description
Table 16 Parameter description
Example
The following uses the sysconf-20211130091339.tar.gz configuration information file imported from an external system as an example. Select the required parameters based on the site requirements and replace the file name with the imported file to be assessed.
x2openEuler conf-analyse -load /opt/x2openEuler/output/sysconf-20211130091339.tar.gz
The command output is as follows:
2021-11-30 09:24:13,191 - INFO - x2openEuler conf-analyse -load /opt/x2openEuler/output/sysconf-20211130091339.tar.gz -os_name centos7.6 -target_os_name openEuler20.03-LTS-SP1 -arch x86_64
2021-11-30 09:24:14,052 - INFO - Producing report...
2021-11-30 09:24:14,053 - INFO - Generate Success! The results are saved: /opt/x2openEuler/output/conf_info_report-20211130092414.html
In the command output, /opt/x2openEuler/output/conf_info_report-20211130092414.html is the assessment report file.
Hardware assessment
Description
NOTICE
- It is recommended that hardware assessment tasks be performed on physical machines. If hardware information analysis is performed on VMs, no analysis report can be generated.
- You need to enter the password of the x2openEuler user for multiple times when using this function.
The hardware assessment function allows you to analyze and assess hardware information in the user environment.
Execution
Analyzing Hardware Information Using CLI Commands
Prerequisites
NOTICE The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user and change the working directory to the home directory of the x2openEuler user.
Use an SSH remote login tool to log in as the x2openEuler user.
Description
Assesses the compatibility of hardware resources scanned locally or imported externally.
Format
x2openEuler hardware-analyse [-local | -load LOAD]
Parameter Description
Table 17 Parameter description
Example
The following uses local hardware resource information as an example. You can choose to analyze local hardware resource information or import external hardware information based on the site requirements.
x2openEuler hardware-analyse
The command output is as follows:
2021-11-30 09:41:20,865 - INFO - Log save directory: /var/log/x2openEuler
2021-11-30 09:41:20,887 - INFO - x2openEuler hardware-analyse
2021-11-30 09:41:20,888 INFO manager/get_param_config/179: Parameter configuration file loaded.
2021-11-30 09:41:20,905 INFO manager/get_regex_config/218: Regex pattern compiled.
2021-11-30 09:41:20,905 INFO manager/load_parsers/233: All builtin parsers loaded.
2021-11-30 09:41:20,905 INFO manager/load_parsers/236: All custom parsers loaded.
2021-11-30 09:41:21,254 INFO time_utils/wrapper/21: 0.35s taken for running function [get_data]
2021-11-30 09:41:21,269 WARNING list/parse_content/47: no data in ls_dev
2021-11-30 09:41:21,377 INFO time_utils/wrapper/21: 0.12s taken for running function [get_parsed_content]
2021-11-30 09:41:21,377 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/kernel_startup_param.json.
2021-11-30 09:41:21,378 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/syscall_interface.json.
2021-11-30 09:41:21,378 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/path.json.
2021-11-30 09:41:21,379 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/port.json.
2021-11-30 09:41:21,379 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/device_interface.json.
2021-11-30 09:41:21,380 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/linux_command.json.
2021-11-30 09:41:21,387 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/hardware_configure.json.
2021-11-30 09:41:21,396 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/proc.json.
2021-11-30 09:41:21,404 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/system_configure.json.
2021-11-30 09:41:21,408 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/system_service.json.
2021-11-30 09:41:21,412 INFO manager/write_res/135: write to /opt/x2openEuler/_tmp_18ambppj_/run/9e81f536-517e-11ec-ae65-a01c8dfeddfa/sysconf/kernel_configure.json.
2021-11-30 09:41:21,426 - INFO - Producing report...
2021-11-30 09:41:21,427 - INFO - Generate Success! The results are saved: /opt/x2openEuler/output/hw_compat_report-20211130094121.html
In the command output, /opt/x2openEuler/output/hw_compat_report-20211130094121.html is the assessment report file.
Common Operations
Viewing Command Parameter Description
NOTICE Currently, The x2openEuler tool can be used only by the x2openEuler user. Before using the tool, switch to the x2openEuler user.
Prerequisites
The x2openEuler user has been created.
The x2openEuler tool has been installed.
Procedure
Use an SSH remote connection tool to log in to the server as the x2openEuler user.
Run the following command to query the parameter description of all commands:
x2openEuler -h
The following description information is displayed:
usage: x2openEuler [-h] [-v] {scan,conf-collect,conf-analyse,hardware-analyse,update} ... x2openEuler tool chain optional arguments: -h, --help show this help message and exit -v, --version Display version subcommands: subcommand parser {scan,conf-collect,conf-analyse,hardware-analyse,update} scan migration assessment tool conf-collect aparser tool conf-analyse analyse system configures and generate report hardware-analyse analyse system hardware and generate report update update data init init config libraries and environment check redis-db Redis database configuration initialization and update
Viewing the x2openEuler Version Information Using CLI Commands
Description
Checks the version of the installed x2openEuler tool.
Format
x2openEuler -v
NOTE: Replace /opt/x2openEuler with the actual tool installation directory.
Example
Check the version of the installed x2openEuler by running the following command:
x2openEuler -v
In the command output, x.x.x indicates the version.
x2openEuler x.x.x
Viewing the Assessment Report Using CLI Commands
Prerequisites
The assessment has been completed and the assessment report has been generated.
Procedure
Use an SSH remote connection tool to log in to the server as the x2openEuler user.
Run the following command to go to the assessment report directory:
cd /opt/x2openEuler/output
Use a file transfer tool to download the assessment report to the local PC and view the report in a browser.
The name formats of the assessment reports are as follows:
- yyy-xxx: software assessment report, where yyy indicates the name of the software assessed and xxx indicates the assessment time.
- **conf_info_report-**xxx: configuration assessment report, where xxx indicates the assessment time.
- **hw_compat_report-**xxx: hardware assessment report, where xxx indicates the assessment time.
NOTE: Internet Explorer may fail to display the assessment report properly. You are advised to use Chrome to view the downloaded HTML assessment report.
Configuring the Yum Source for the OS
NOTICE If the OS environment can access the Internet and the default Yum source of the OS is available, skip this section.
The following describes how to configure the Yum source on CentOS 7.6. The procedure for configuring the Yum source on other OSs is the same.
Download the CentOS image file CentOS-7-x86_64-Everything-1810.iso from the CentOS official website.
Use an SSH remote login tool to upload the CentOS 7.6 image to the /root directory.
Use an SSH remote login tool to log in to the CentOS CLI.
Run the following command to mount the CentOS 7.6 ISO image to a local directory:
mount /root/CentOS-7-x86_64-Everything-1810.iso /media -o loop
NOTICE After the OS is rebooted, mount the file again.
Back up the original Yum source. In the
mv
command, replace path with the actual backup directory.cd /etc/yum.repos.d/ // Go to the Yum source configuration directory. mv ./* path // Back up the original Yum source configuration.
Configure the Yum source.
Open the media.repo file.
vi /etc/yum.repos.d/media.repo
Press I to enter the insert mode and add the following information to the media.repo file:
[InstallMedia] name=CentOS7.6 metadata_expire=-1 gpgcheck=0 cost=500 baseurl=file:///media enabled=1
Press Esc, type :wq, and press Enter to save the change and exit.
Run the following commands to update the local cache information of the Yum source:
yum clean all yum makecache
Querying OS Version Information
Run the uname -a
command to query the CPU hardware architecture. The tool supports only x86 servers or servers powered by Kunpeng 916 or 920 processors.
Query the OS version information.
If you do not know the OS type, try the following commands one by one to check the OS version:
NOTE: According to Table 18, the commands for version information on the compatible OSs are:
- cat /etc/os-release
- cat /etc/issue
- cat /etc/redhat-release
- nkvers
If you are sure about the OS type, you can run the corresponding command listed in Table 18 to query the release version.
Table 18 Commands for querying the OS versions
Configuring the Timeout Interval
Prerequisites
- The x2openEuler tool and x2openEuler extension have been installed.
Procedure
Use an SSH tool to remotely log in to the CentOS CLI as a common user.
Run the following command to switch to the root user.
su - root
Open the SSH configuration file /etc/ssh/sshd_config.
vi /etc/ssh/sshd_config
Set the following parameters:
TCPKeepAlive yes ClientAliveInterval 60 ClientAliveCountMax 5
After the modification is complete, Press Esc, type :wq, and press Enter to save the change and exit.
Restart the SSH service.
Feedback
If you have any suggestions on the x2openEuler tool and extension, submit an issue at https://gitee.com/openeuler/oec-application/issues.
FAQ
Page Not Properly Displayed When Viewing Assessment Reports
Symptom
When you view the downloaded HTML assessment report, the page is not displayed properly.
Possible Cause
Internet Explorer is incompatible with the assessment report page. As a result, the assessment report is not properly displayed.
Solution
You are advised to use Chrome to view the downloaded HTML assessment report.
Installation Fails Due to Missing Dependency Packages
Symptom
During the installation of x2openEuler, some dependency packages may be missing. As a result, the installation is interrupted and fails. If the following information is displayed, one or more dependency packages are missing:
Figure 14 Command output when dependency packages are missing
Possible Cause
The software package required for installing x2openEuler is not installed in the OS.
Solution
Determine the names of the dependency packages required, for example, bzip2 and bzip2-devel, based on the error information displayed during installation.
Configure the Yum source by referring to Configuring the Yum Source for the OS.
Run the following command to install the dependency packages:
yum install -y bzip2 bzip2-devel
Appendixes
Running Environment Data Usage Description
Precautions
The data usage scenarios of x2openEuler is listed in Table 19. Take measures to protect your data accordingly.
Running Environment Data Usage Scenarios
Table 19 Data Usage Description
Related Links
Table 20 Related links
https://mirrors.huaweicloud.com/repository/conf/CentOS-AltArch-7.repo |