Importing Details of Cloud Resources
You can import CSV-formatted resource details from Alibaba Cloud directly into MgC. You first need to export the resource details from Alibaba Cloud. After the import is complete, you can view the resource details on the MgC console. With the imported details, you can get recommendations for suitable Huawei Cloud resources.
Exporting Resource Details Using the Alibaba Cloud Console
The supported Alibaba Cloud resources are:
- Elastic Compute Service (ECS) instances and cloud disks
- Object Storage Service (OSS) buckets
- ApsaraDB RDS for MySQL instances
- ApsaraDB RDS for Redis instances
- Sign in to the Alibaba Cloud ECS console.
- On the Overview page, choose Export Data > Instances to export a list of all ECS instances.
- Choose Export Data > Disks to export a list of all cloud disks.
- Open the instance list and the disk list and adjust the resource information if needed. Ensure that the lists contain the necessary information.
List
Mandatory Fields
Instance list
Instance ID, OS, instance specifications, CPU, and memory
Disk list
Instance ID, disk ID, capacity (GiB), and disk attributes
- Sign in to the Alibaba Cloud ApsaraDB RDS for MySQL console.
- In the navigation pane on the left, choose Instances. Select a region in the upper part of the page.
- Filter all MySQL instances in the Database Engine column and click the
icon in the upper right corner of the list.
- In the displayed dialog box, select the information to be exported. Click OK. The system exports the instance information to a CSV file and automatically downloads the file.
- Modify the exported CSV file so MgC can parse the file content.
- Use a file editor to open the CSV file and search for PrivatePort(A network port,) in the table header.
- Delete the comma (,) from this field and save the file. The correct format is PrivatePort(A network port).
- Sign in to the Alibaba Cloud ApsaraDB for Redis console.
- In the navigation pane on the left, choose Instances. Select a region in the upper part of the page.
- In the lower left corner of the page, expand
and click Select All.
- Click the
icon in the upper right corner of the list. In the dialog box that is displayed, select the information to be exported.
- Click OK. The system exports the instance information to a CSV file and automatically downloads the file.
- Modify the exported CSV file so MgC can parse the file content.
Exporting Resource Details Using Alibaba Cloud Resource Management
You can export the details of all resources, server resources, or database resources.
- Sign in to the Alibaba Cloud Resource Management console.
- In the navigation pane on the left, choose Resource Center > Advanced Search.
- In the search box on the right of the page, enter SQL statements in the Temporary Query 1 box. Alternatively, click the plus sign (+) to open a new tab and write query statements. Use the following SQL statements for query:
SELECT resource_type, resource_id, resource_name, region_id, zone_id, create_time, resource_group_id, tags, ip_addresses, vpc_id, v_switch_id, properties FROM resources ORDER BY region_id, resource_type, resource_id
- Click Run.
- Click the Query Result tab to view the query results.
- Export the query results to a CSV file and save the file to the local PC. Click the download button on the right and set Format to Close on the Report Settings page.
- Sign in to the Alibaba Cloud Resource Management console.
- In the navigation pane on the left, choose Resource Center > Advanced Search.
- In the search box on the right of the page, enter SQL statements in the Temporary Query 1 box. Alternatively, click the plus sign (+) to open a new tab and write query statements. Use the following SQL statements for query:
SELECT resource_type, resource_id, resource_name, region_id, zone_id, create_time, resource_group_id, ip_addresses, tags, vpc_id, v_switch_id, properties ->> 'InstanceId' as instance_id, properties ->> 'CreditSpecification' as credit_specification, properties ->> 'OSName' as os_name, properties ->> 'HostName' as host_name, properties ->> 'Status' as status, properties ->> 'Description' as description, properties ->> 'InstanceType' as instance_type, properties ->> 'InstanceTypeFamily' as instance_type_family, properties ->> 'ImageId' as image_id, properties ->> 'Cpu' as cpu, properties ->> 'Memory' as memory, properties -> 'PublicIpAddress' ->> 'IpAddress' as public_ip_address, properties -> 'VpcAttributes' -> 'PrivateIpAddress' ->> 'IpAddress' as private_ip_address, properties -> 'EipAddress' ->> 'IpAddress' as eip_address_ip, properties -> 'EipAddress' ->> 'Bandwidth' as bandwidth, properties ->> 'ExpiredTime' as expired_time, properties -> 'SecurityGroupIds' ->> 'SecurityGroupId' as security_group_id, properties ->> 'Size' as disk_size, properties ->> 'DeleteWithInstance' as delete_with_instance, properties ->> 'DeleteAutoSnapshot' as delete_auto_snapshot, properties ->> 'Type' as disk_type, properties ->> 'Encrypted' as disk_encrypted, properties ->> 'DetachedTime' as disk_detached_time, properties ->> 'AutoSnapshotPolicyId' as auto_snapshot_policy_id, properties ->> 'IOPS' as iops, properties ->> 'IOPSRead' as iops_read, properties ->> 'IOPSWrite' as iops_write, properties ->> 'PerformanceLevel' as performance_level, properties ->> 'SourceSnapshotId' as disk_source_snapshot_id FROM resources WHERE resource_type = 'ACS::ECS::Instance' OR resource_type = 'ACS::ECS::Disk'
- Click Run.
- Click the Query Result tab to view the query results.
- Export the query results to a CSV file and save the file to the local PC. Click the download button on the right and set Format to Close on the Report Settings page.
- Sign in to the Alibaba Cloud Resource Management console.
- In the navigation pane on the left, choose Resource Center > Advanced Search.
- In the search box on the right of the page, enter SQL statements in the Temporary Query 1 box. Alternatively, click the plus sign (+) to open a new tab and write query statements. Use the following SQL statements for query:
SELECT resource_type, resource_id, resource_name, region_id, zone_id, create_time, resource_group_id, ip_addresses, tags, vpc_id, v_switch_id, properties ->> 'InstanceId' as instance_id, properties ->> 'DBInstanceDescription' as description, properties ->> 'DBInstanceType' as db_instance_type, properties ->> 'DBInstanceClass' as db_instance_class, properties ->> 'DBInstanceClassType' as db_instance_class_type, properties ->> 'Category' as category, properties ->> 'DBInstanceCPU' as db_instance_cpu, properties ->> 'DBInstanceMemory' as db_instance_memory, properties ->> 'MaxIOPS' as max_iops, properties ->> 'DBInstanceStorage' as db_instance_storage, properties ->> 'Engine' as engine, properties ->> 'EngineVersion' as engine_version, properties ->> 'InstanceNetworkType' as instance_network_type, properties ->> 'PayType' as pay_type, properties ->> 'ExpireTime' as expire_time, properties ->> 'MaxConnections' as max_connections FROM resources WHERE resource_type = 'ACS::RDS::DBInstance'
- Click Run.
- Click the Query Result tab to view the query results.
- Export the query results to a CSV file and save the file to the local PC. Click the download button on the right and set Format to Close on the Report Settings page.
Importing Details of Cloud Resources
You can import data exported from Resource Management or cloud services.
- Sign in to the MgC console. In the navigation pane, under Project, select an application migration project from the drop-down list.
- In the navigation pane, choose Source Resources.
- Click the Import tab. Then click the Import card.
Figure 1 Import
- Click the Cloud resources option, select the source cloud platform, choose the resource type to be imported from the Resource Category drop-down list, and upload the corresponding resource list.
Figure 2 Selecting a resource type
Only CSV files encoded in UTF-8 format with English table headers can be imported. The size of a single file cannot exceed 50 MB. For details about how to convert the encoding format of a CSV file to UTF-8, see How Do I Convert the Encoding Format of a CSV File to UTF-8?
Resource Type
Procedure
All
Click Add under Resource List and select the exported resource list.
Server
Click Add under Resource List and select the exported server list.
Database
Click Add under Resource List and select the exported database list.
- Click Confirm. The Task Center page is displayed. After the resource list is uploaded, return to the Source Resources page and view the imported resources on the corresponding tab.
- Sign in to the MgC console. In the navigation pane, under Project, select an application migration project from the drop-down list.
- In the navigation pane, choose Source Resources.
- Click the Import tab. Then click the Import card.
Figure 3 Import
- Click the Cloud resources option, select the source cloud platform, choose the resource type to be imported from the Resource Category drop-down list, and upload the corresponding resource list.
Figure 4 Selecting a resource type
Only CSV files encoded in UTF-8 format with English table headers can be imported. The size of a single file cannot exceed 50 MB. For details about how to convert the encoding format of a CSV file to UTF-8, see How Do I Convert the Encoding Format of a CSV File to UTF-8?
Resource Type
Procedure
Server
- Click Add under Resource List and select the exported ECS list.
- Click Add under Cloud Disk List and select the exported disk list.
Redis
Click Add under Resource List and select the exported Redis instance list.
Object storage
Click Add under Resource List and select the exported OSS bucket list.
Database
Click Add under Resource List and select the exported RDS for MySQL instance list.
- Click Confirm. The Task Center page is displayed. After the resource list is uploaded, return to the Source Resources page and view the imported resources on the corresponding tab.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot