All Products
Search
Document Center

Cloud Migration Hub:Survey Linux-based resources in data centers in offline mode

Last Updated:Jan 03, 2024

This topic describes how to use the idc-scanner tool provided by Cloud Migration Hub (CMH) to survey Linux-based resources in your data centers.

Preparations

Important

The idc-scanner tool can survey only resources of servers that run UNIX-like operating systems. For more information, see Supported source types and migration tools.

Prepare a runtime environment

Tool server selection

The idc-scanner tool must be installed and run on a tool server that can communicate with the servers under survey over SSH. The best tool server is a jump server in traditional O&M systems.

Tool server specifications and OS requirements

The tool server requires at least 2 CPU cores and 4 GB of memory and must run a mainstream Linux distribution. We recommend that you use CentOS 7.

Software dependencies

If you have not configured SSH mutual trust between your tool server and servers under survey, you are prompted to enter a password when you log on to the servers under survey. In this case, you must install sshpass before you run the idc-scanner tool.

Note

We recommend that you download the sshpass installation package from Yellowdog Updater, Modified (YUM) repositories or over the Internet.

YUM-based installation

If YUM is configured on your tool server, you can use YUM to install sshpass by running the following command: yum install sshpass.

Manual installation

If you want to install sshpass by using the source code, you can download the sshpass distribution from the official website. After you download the package, you can run the following commands to manually install sshpass:

tar -zxvf sshpass-1.06.tar.gz
cd sshpass-1.06
./configure
make
make install

Configure logon users

If you use the idc-scanner tool to survey physical servers, you need to only configure a logon user for each server under survey. You do not need to grant the logon users additional permissions on files on the servers under survey.

Download an installation package of the idc-scanner tool

Download an installation package of the idc-scanner tool based on your OS. Then, upload the installation package to the tool server and decompress the installation package.

OS

Method to obtain an installation package

Linux (x86)

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the Offline Collection tab of the Resource Collection page, click Download Tool in the IDC section, and then click Download Linux.

Windows (x86)

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the Offline Collection tab of the Resource Collection page, click Download Tool in the IDC section, and then click Download Windows.

Linux (ARM)

Submit a ticket to obtain an installation package for this OS.

Windows (ARM)

Submit a ticket to obtain an installation package for this OS.

To decompress the installation package, run the tar zxvf idc-scanner.tar.gz command.

Configure a parameter file

Before you run the idc-scanner tool, you must obtain the IP addresses of the servers under survey and the usernames, passwords, and SSH ports that are used to log on to the servers. Write the obtained information in a list text file in the working directory in the following format:

Format:

username1:password1:ip1:ssh_port
username2:password2:ip2:ssh_port
...

Example:

>> cat list
userA:XXXX:39.105.XXX.23:22
userA:XXXX:123.56.XXX.29:22
userA:XXXX:47.94.XXX.252:22

If you have configured SSH mutual trust between your tool server and servers under survey, you do not need to write the passwords that are used to log on to the servers under survey in the parameter file. Example:

>> cat list
userA::39.105.XXX.23:9922
userA::123.56.XXX.29:9922
userA::47.94.XXX.252:9922

Configure a working directory

You must configure the following working directory for the idc-scanner tool. In the working directory, the output directory is used to store the output files, and the export directory is used to store the raw machine information that is exported.

|-idc-scanner/
             |-idc-scanner
             |-list
             |-output/
             |-export/

Run the tool

After you prepare the environment, you can run the idc-scanner tool to survey resources in your data centers. The following section describes the commands and the corresponding output:

# Command 1: Run the following command if the tool server connects to the servers to be surveyed by using regular accounts and passwords:
./idc-scanner
# Command 2: Run the following command if you have configured SSH mutual trust between the tool server and the servers to be surveyed:
./idc-scanner sshkey

# Expected output:
thread0 begin to export from39.xx.xx.23
thread1 begin to export from39.xx.xx.23
thread2 begin to export from39.xx.xx.23
...
thread9 begin to export from123.xx.xx.29
thread7 begin to export from123.xx.xx.29
thread8 begin to export from123.xx.xx.29
...
thread7 begin to export from47.xx.xx.252
thread1 begin to export from47.xx.xx.252
...
begin to output:123.xx.xx.29
begin to output:39.xx.xx.23
begin to output:47.xx.xx.252

Analyze data on the tool server

After you run the idc-scanner tool, the following files are generated in the output directory:

topo.html           # The file that contains the network topology. 
index.html          # The homepage of the survey information. 
iconfont.css        # The style file.
iconfont.ttf        # The style file.    
10.xx.xx. 106.html   # The survey details page.         
10.xx.xx. 139.html   # The survey details page.         
10.xx.xx. 101.html   # The survey details page.         
10.xx.xx. 108.html   # The survey details page.         
machines.json       # The JSON file to be uploaded.

You can open the HTML files to view and analyze data on the tool server.Resource specificationsResource topology

Upload resource information

After you verify that the data is correct on the tool server, you can upload the JSON file to CMH.

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the Offline Collection tab of the Resource Collection page, click Upload in the IDC section. In the IDC dialog box, upload the JSON file.

image.png

image

After the JSON file is uploaded, you can view the upload task in the Collection Tasks section. Click the task ID to view the uploaded resource information. The resources will be imported to CMH automatically and will be displayed on the Resource List page.