All Products
Search
Document Center

Cloud Migration Hub:Survey resources

Last Updated:Jan 17, 2025

This topic describes how to use Cloud Migration Hub (CMH) to perform different types of resource surveys.

Survey Alibaba Cloud resources in online mode

Video tutorial

Important

In the latest version of the online resource survey feature, you do not need to confirm resources before the resources can be imported to CMH. The system automatically confirms the resources and imports them to the resource list.

Start a survey

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the Online Collection tab of the Resource Collection page, click Start in the Import From Alibaba Cloud section. In the Import From Alibaba Cloud dialog box, select the regions and zones from which you want to collect resource information and the types of resources whose information you want to collect. Then, CMH calls the API operations of Cloud Config in the background to survey resources and collect resource information.

Configure parameters based on survey types

1. Regional Resources Survey: Select the regions from which you want to collect resource information and the types of resources whose information you want to collect. Then, click Yes.

image

2. Resource Survey of Available Zones: Select the regions and zones from which you want to collect resource information and the types of resources whose information you want to collect. Then, click Yes.

image

If you use CMH to survey Alibaba Cloud resources for the first time, the service-linked role for CMH is automatically created. If you have not activated Cloud Config, the system prompts you to activate the service first. You can click the link in the message to go to the Cloud Config console. After Cloud Config is activated, you can use CMH to survey Alibaba Cloud resources.

image

View survey results

After the progress of your survey task reaches 100%, you can click the task ID to go to the details page of the task and view the survey results. You can also export relevant results for analysis on your on-premises device.

image

image

Note

The surveyed resources are classified into two types based on the types of Alibaba Cloud service instances: zone-specific resources and region-specific resources. Configurations of region-specific instances may be related to zone-specific resources. Therefore, the corresponding region-specific resources are displayed in the survey results. If you want to view only the instances in zones, click the Zone Resources tab.

Survey third-party cloud resources in online mode

Video tutorial

Permission preparations

1. To use CMH to survey all your resources on Amazon Web Services (AWS) in online mode, you must provide an AWS account that is granted the read permissions on all the resources. AWS provides a system policy that allows read-only access to AWS resources. You can use this policy to grant read-only permissions to your AWS account:

arn:aws:iam::aws:policy/ReadOnlyAccess

For more information about the resource types supported for online AWS resource survey and API references, see Fields collected from AWS. If you need a policy that covers the permissions on fewer resources, you can create a custom policy based on the ReadOnlyAccess policy of AWS.

2. To use CMH to survey all your resources on Tencent Cloud in online mode, you must provide a Tencent Cloud account that is granted the read permissions on all the resources. You can log on to the Tencent Cloud console and use Cloud Access Management (CAM) to configure authorization policies for your account.

3. To use CMH to survey all your resources on Huawei Cloud in online mode, you must provide a Huawei Cloud account that is granted the read permissions on all the resources. You can log on to the Huawei Cloud console and use Identity and Access Management (IAM) to configure authorization policies for your account.

4. To use CMH to survey all your resources on Azure in online mode, you must provide an Azure account that is granted the read permissions on all the resources. You can log on to the Azure console and use identity and access management (IAM) to configure access permissions on corresponding subscriptions or resource groups.

Procedure

Start a survey

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the Online Collection tab of the Resource Collection page, click Start in the Third-party Cloud Service section. In the Third-party Cloud Service dialog box, configure the required parameters and click Yes. Then, CMH starts to collect resource information in the background.

  • If you want to collect the information about the resources of AWS, Tencent Cloud, or Huawei Cloud, specify the Task Name, AccessKey, and SecretKey parameters, select the regions from which you want to collect resource information and the types of resources whose information you want to collect, and then click Yes.

image

  • If you want to collect the information about the resources of Azure, specify the TaskName, TenantId, SubscriptionId, ClientId, and SecretKeyparameters, select the types of resources whose information you want to collect, and then click Yes.

image

Confirm resources

After your survey task is complete, you can click the task ID to view the surveyed resources.

image

You can also export relevant results for analysis on your on-premises device.

image

Survey Linux-based resources in data centers in offline mode

Video tutorial

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

Select a tool server

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

Tool server specifications and operating system 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.

Install 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 source code of sshpass from its official website. After you download the source code, 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 operating system. Then, upload the installation package to the tool server and decompress the installation package.

Operating system

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.

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:

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

Run the tool

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

You can use the -p parameter to specify the total duration to monitor the performance and network status, and use the -i parameter to specify the resource collection interval measured in seconds.

# Command 1: Run the following command if the tool server connects to the servers under survey 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 under survey:
./idc-scanner --sshkey
# Command 3: Run the following command to specify the total status monitoring duration and resource collection interval:
./idc-scanner -p 3600 -i 30

# Optional parameter description:
# optional arguments:
#   -s, --sshkey       The SSH key is used.
#   -p, --period       The monitoring period. Valid values: [60, 36000]. Default value: 600.
#   -i, --interval     The monitoring interval. Valid values: [30,60]. Default value: 30.

# Expected output:
Scanning and exporting ...
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
...
Scanning finished!
Parser finish machine:39.xx.xx.23
...
Start monitor ... period: 3600s, interval: 30s
monitoring... single round time 8.761 s, 1 / 121
monitoring... single round time 8.824 s, 2 / 121
...
monitoring... single round time 9.306 s, 120 / 121
monitoring... single round time 9.299 s, 121 / 121
Main finish and build output : output.tar.gz
Main finish and build export : export.tar.gz

View survey results 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 font 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.规格线下拓扑线下

Upload and analyze survey results

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 survey task in the Collection Tasks section. Click the task ID to view the uploaded resource information. The surveyed resources are automatically imported to CMH and are displayed in the resource list.

Survey Windows-based resources in data centers in offline mode

Preparations

Important

The win-scanner tool can survey resources of servers that run the mainstream Windows operating systems. For more information, see Supported source types and migration tools.

Prepare a runtime environment

The win-scanner tool must be installed and run on a tool server. The optimal tool server is a jump server in traditional O&M systems. The tool server must be in the same network domain as the servers under survey.

The tool server must run a mainstream Windows Server distribution.

Prepare the servers under survey

If you use the win-scanner tool to survey physical servers, the servers under survey must meet the following requirements:

  1. The name and password of a domain user in the Administrators group of each server under survey are provided. The password cannot be empty.

  2. The Distributed Component Object Model (DCOM) of each server under survey is configured to enable access to Windows Management Instrumentation (WMI). The members of the Administrators group are allowed to remotely connect to the server. Port 135 is enabled.

Download the installation package of the win-scanner tool

Download the WinScanner.zip installation package of the win-scanner tool. Then, upload the installation package to the tool server and decompress the installation package.

Operating system

Method to obtain an installation package

Mainstream Windows Server distribution

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.

Configure a parameter file

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

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

Example:

39.105.XXX.23:userA:XXXX
123.56.XXX.29:userB:XXXX
47.94.XXX.252:userC:XXXX
Configure a working directory

You must configure the following working directory for the win-scanner tool. In the working directory, the list.txt file is used to store information such as the IP addresses of the servers and the usernames and passwords that are used to log on to the servers. The CMHScannerOutput directory is used to store the output files. You do not need to create the directories, but you must make sure that no directories with the same names exist in the runtime environment.

.
└── win-scanner/
               ├── WinScanner.exe
               ├── list.txt
               └── CMHScannerOutput/

Run the tool

After you prepare the environment, you can run the win-scanner tool to survey resources in your data centers. The following result is returned:

[01][192.168.x.xx1] Connecting to 192.168.x.xx1...
[02][192.168.x.xx2] Connecting to 192.168.x.xx2...
[03][192.168.x.xx3] Connecting to 192.168.x.xx3...
...
[01][192.168.x.xx1] Connected successfully!
[01][192.168.x.xx1] Scanning...
[02][192.168.x.xx2] Connected successfully!
[02][192.168.x.xx2] Scanning...
[03][192.168.x.xx3] Connected successfully!
[03][192.168.x.xx3] Scanning...
...
[01][192.168.x.xx1] Monitoring...
[02][192.168.x.xx2] Monitoring...
[03][192.168.x.xx3] Monitoring...
...
[01][192.168.x.xx1] Finished!
[02][192.168.x.xx2] Finished!
[03][192.168.x.xx3] Finished!
...
[Finish] Output Files Finished!
[Finish] Please press any key to exit ...
[Finish] Press any key to exit...

View survey results on the jump server

After you run the win-scanner tool, the following files are generated in the CMHScannerOutput 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 font file.    
192.168.x.xx1.html  # The survey details page.         
192.168.x.xx3.html  # The survey details page.         
192.168.x.xx4.html  # The survey details page.         
machines.json       # The JSON file to be uploaded.

The tool collects information about the system. You can open the HTML files to view and analyze data on the tool server.

imageimage

Upload and analyze survey results

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.

20240723105127.jpg

image

After the JSON file is uploaded, you can view the survey task in the CMH console. You can click the task ID to view the surveyed resources. The surveyed resources are automatically imported to CMH and are displayed in the resource list.

Survey AWS resources in offline mode

Preparations

Grant permissions to an account

To use the aws-scanner tool to survey all your resources on AWS in offline mode, you must provide an AWS account that is granted the read permissions on all the resources. AWS provides a system policy that allows read-only access to AWS resources. You can use this policy to grant read-only permissions to your AWS account:

arn:aws:iam::aws:policy/ReadOnlyAccess

If you need a policy that covers the permissions on fewer resources, you can create a custom policy based on the ReadOnlyAccess policy of AWS.

Prepare a runtime environment

  1. Tool server selection: The aws-scanner tool must be installed and run on a tool server that can access AWS endpoints over an external network.

  2. Tool server specifications and operating system requirements: The tool server requires at least 2 CPU cores and 4 GB of memory. No special requirement exists for the operating system of the tool server.

  3. Environment dependencies: The tool server on which you run the aws-scanner tool must use a Java 8 runtime environment. You can run the java -version command to view the Java version of the tool server.

Download an installation package of the aws-scanner tool

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

Operating system

Method to obtain an installation package

Linux (x86) or 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 AWS section.

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

Configure a working directory

You must configure an empty directory as the working directory of the aws-scanner tool. In this example, the following directory is used:

|-aws-scanner/
            |-aws-scanner-x.x.jar

Run the tool

You can run the following command on the CLI to conduct a survey. Then, you can view the survey results on the tool server. java -jar aws-scanner.jar ak sk region_id result_path product_code

# Command parameters 
# 1. ak: the access key ID of your AWS account. 
# 2. sk: the secret access key of your AWS account.
# 3. region_id: the region ID of your AWS account.
# 4. result_path: the path to which the survey results are exported.
# 5. product_code: the code of the AWS service that you want to survey. If you want to survey all AWS services, set the parameter to all. For more information about supported AWS services, see the following topic: 
 
Supported items 


#e.g. "java -jar aws-scanner.jar  akxxxx  skxxx cn-north-1 ./ all"

After the command is run, the following output is displayed on the CLI:

java -jar aws-scanner.jar  akxxx  skxxx cn-north-1 ./ all
AK :akxxx;
SK :skxxx;
Region :cn-north-1;
path :./;
type :all;
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_ec2
The number of obtained resource data entries: 473
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_nat
The number of obtained resource data entries: 3
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_security_group
The number of obtained resource data entries: 71
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_vpc
The number of obtained resource data entries: 4
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_avaliability_zone
The number of obtained resource data entries: 3
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_elb
The number of obtained resource data entries: 70
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_rds
The number of obtained resource data entries: 25
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType:aws_elasticcache
The number of obtained resource data entries: 37
Call the SDK to obtain resource data, ak:akxxx,sk:skxxx,region:cn-north-1,resourceType::aws_s3
The number of obtained resource data entries: 17
A JSON file is generated. Go to the following path to view the generated file: ./

View survey results on the tool server

After the tool is run, several files are generated in the output directory. The following figure shows the generated files.image

You can open the xxxindex.html file to view the overview data of all surveyed AWS resources. You can view resources on the overview page. If a large number of resources exist, you can click more to view all resources on the details page.image

Upload and analyze survey results

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 AWS section. In the dialog box that appears, upload the JSON file.

image.png

After the JSON file is uploaded, you can view the survey task in the CMH console. You can click the task ID to view the surveyed resources. The surveyed resources are automatically imported to CMH and are displayed in the resource list.

image.png

Survey VMware resources in offline mode

Preparations

Prepare a runtime environment

Select a tool server

The vmware-scanner tool must be installed and run on a tool server that connects to vCenter Server over TCP port 443. This way, the vmware-scanner tool can collect configuration and performance metadata.

Tool server specifications and operating system 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.

Limits

To use the vmware-scanner tool to scan resources such as VMs, data centers, hosts, and clusters in a VMware environment, make sure that the version of vCenter Server is 6.5 or later.

Configure a logon user to access vCenter Server

In the VMware vSphere Web Client, perform the following operations to configure a read-only account to access vCenter Server:

  • Log on to the VMware vSphere Web Client with an account that has admin privileges. From the Home menu, select Administration.

  • In the left-side navigation pane, choose Single Sign-On > Users and Groups.

  • On the Users tab, click the New User icon.

  • Specify the account details, and then click OK.

  • In the left-side navigation pane, choose Access Control > Global Permissions.

  • Select the created account, and then select Read-only to assign the role to the account. Click OK.

  • To be able to start discovery of installed applications and agentless dependency analysis, perform the following steps: In the left-side navigation pane, choose Access Control > Roles. In the Roles pane, select Read-only under Roles. Under Privileges, select Guest operations. To propagate the privileges to all objects in the vCenter Server instance, select Propagate to children.

Download an installation package of the vmware-scanner tool

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

Operating system

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 VMWare acquisition section.

Windows (x86)

Not supported.

Linux (ARM)

Not supported.

Windows (ARM)

Not supported.

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

Configure a working directory

You must configure the following working directory for the vmware-scanner tool. In the working directory, the output directory is used to store the output files.

|-vmware-scanner/
             |-vmware-scanner
             |-output/
                       |-VMware_scanner_index.html
                       |-VMware_scanner_index.json

Run the tool

Before you run the vmware-scanner tool, you need to obtain the IP address, username, and password that are used to access vCenter Server. The proxy address of vCenter Server is also required if necessary.

You can use the following command syntax to run the vmware-scanner tool:

Command syntax: ./vmware-scanner -s SERVER -u USERNAME -p PASSWORD [--proxy PROXY]
Example:
# Access vCenter Server without a proxy.
./vmware-scanner -s 39.105.XXX.23 -u username -p 123****
# Use the proxy to access vCenter Server.
./vmware-scanner -s 39.105.XXX.23 -u username -p 123****  --proxy 100.**.***.132:50702 

View survey results on the jump server

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

VMware_scanner_index.html        # The HTML file that contains survey resources.           
VMware_scanner_index.json       # The JSON file that is to be uploaded.

You can open the HTML file to view and analyze data on the tool server.

Dingtalk_20221010144149

Upload and analyze survey results

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. Click the Offline Collection tab. In the VMware acquisition section, click Upload. In the dialog box that appears, upload the JSON file.

image.png

After the JSON file is uploaded, you can view the survey task in the CMH console. You can click the task ID to view the surveyed resources. The surveyed resources are automatically imported to CMH and are displayed in the resource list.

image.png

image

Manually import resource information

Download a template

CMH provides a variety of templates to help you manually survey your on-premises resources. You can perform the following steps to obtain these templates:

Log on to the CMH console. In the left-side navigation pane, choose Assessment > Resource Collection. On the page that appears, click the Offline Collection tab. On the Offline Collection tab, click Import in the Manual Import section. In the Manual Import dialog box, download the templates.

image.png

Import resource information

Fill in and upload a template

After you fill in the template that you download, you can upload the template in the Manual Import dialog box. After you upload the template, CMH starts a background task to identify your resources.

image

View resource information

After the background task is complete, click the Offline Collection tab or the Online Collection tab. You can click the ID of the task in the Collection Tasks section to view the resource information. The surveyed resources are automatically imported to CMH and are displayed in the resource list.

image.png

image