This topic describes how to create resources in Cloud Migration Hub (CMH).
Feature overview
The procedures for creating and migrating resources vary based on migration plans. You do not need to create or migrate some types of resources. The following table describes whether resource creation is required for different types of resources. Create resources based on your resource types.
Resource type | Alibaba Cloud cross-zone migration plan | AWS migration plan |
Elastic Compute Service (ECS) instance | Created during resource migration | N/A |
ApsaraDB RDS instance | Resource creation not required | N/A |
Tair (Redis OSS-compatible) instance | Resource creation not required | N/A |
Server Load Balancer (SLB) instance | Resource creation required | N/A |
vSwitch | Resource creation required | N/A |
AWS EC2 | N/A | Resource creation required |
AWS RDS | N/A | Resource creation required |
Procedure
On the details panel of a migration plan, click Go to Create Resources for a resource to go to the Create resource details page. Alternatively, choose Preparation > Create resources
in the left-side navigation pane of the CMH console. On the Create resources page, find the resource plan of the migration plan and click its name. After you select the required resources and submit the request for creating multiple resources at a time, CMH initiates an automated task in the Infrastructure as Code (IaC) Service console and uses Terraform to create cloud resources for you. The migration process takes several minutes. You can view the migration progress based on the task status, click the link next to Code link to view the Terraform code of the automated task in the IaC Service console, or click the link next to Task link to track the progress of the automated task in the IaC Service console.
Manage permissions
If you use a Resource Access Management (RAM) user or RAM role, your account must have the permissions on IaC Service and the resources to be created. Make sure that the required permissions are granted to your account before you create resources.
For more information about how to manage permissions, see Manage permissions for CMH. The following table describes the permissions that are required for Alibaba Cloud cross-zone migration.
Policy | Scenario | Remarks |
AliyunAPDSFullAccess | Use the CMH console. | The full permissions on CMH. |
AliyunIaCServiceFullAccess | Migrate data across zones on Alibaba Cloud or from AWS to Alibaba Cloud. | The full permissions on IaC Service. |
AliyunVPCFullAccess | Migrate resources across zones on Alibaba Cloud | The full permissions on Virtual Private Cloud (VPC). |
AliyunSLBFullAccess | Migrate resources across zones on Alibaba Cloud | The full permissions on SLB. |
Create vSwitches
You need to create vSwitches only for an Alibaba Cloud cross-zone migration plan.
1. Log on to the CMH console. In the left-side navigation pane, choose Preparation > Migration plan. On the Migration plan page, find the migration plan that you want to manage and click its name. In the Plan details section of the Migration plan details panel, find the Create vSwitch step and click Go to Create Resources in the Actions column.
2. Select the source vSwitches for which you want to create destination vSwitches and click Parameter modification in the Actions column or click Batch configuration. The Modify configuration panel appears.
Note: You cannot select different types of resources at the same time. For example, you cannot select a vSwitch and an SLB instance at the same time.
3. Enter the CIDR blocks of the destination vSwitches and click Yes.
Each destination vSwitch is created in the same VPC as the source vSwitch. After you configure the CIDR block of each destination vSwitch, select all the mappings of the source and destination vSwitches and submit the request for creating multiple resources at a time. CMH automatically creates the destination vSwitches.
After the modification, the CIDR blocks of destination vSwitches are displayed.
4. Initiate the task for creating vSwitches.
You cannot select different types of resources at the same time. Select the source vSwitches for which you want to create destination vSwitches and click Batch create resources.
5. View the task status.
After you submit the request for creating multiple resources at a time, the value of the Task status field changes to Exporting resources in the Resource creation details section.
You can view the task details when the task is running. For more information, see the View the task details section of this topic.
Wait until the task is complete and refresh the page. The destination vSwitches are created. The ID and status of each destination vSwitch are updated on the page. You can click the ID of a destination vSwitch to go to the details page of the vSwitch.
Note: Resources that have been created cannot be created again.
Create SLB instances
You need to create SLB instances only for an Alibaba Cloud cross-zone migration plan.
1. Log on to the CMH console. In the left-side navigation pane, choose Preparation > Migration plan. On the Migration plan page, find the migration plan that you want to manage and click its name. In the Plan details section, find the Create SLB step and click Go to Create Resources in the Actions column.
2. Select the source SLB instances for which you want to create destination SLB instances and click Parameter modification in the Actions column or click Batch configuration. The Modify configuration panel appears. Select a VPC and a vSwitch for each destination SLB instance and click Yes.
Note: You cannot select different types of resources at the same time. For example, you cannot select a vSwitch and an SLB instance at the same time.
3. Initiate the task for creating SLB instances. You cannot select different types of resources at the same time.
Select the source SLB instances for which you want to create destination SLB instances and click Batch create resources. In the message that appears, click Submission. After the SLB instances are created, a message appears in the upper part of the page.
4. View the task status.
After you submit the request for creating multiple resources at a time, the value of the Task status field changes to Exporting resources in the Resource creation details section.
You can view the task details when the task is running. For more information, see the View the task details section of this topic.
Wait until the task is complete and refresh the page. The destination SLB instances are created. The ID and status of each destination SLB instance are updated on the page. You can click the ID of a destination SLB instance to go to the details page of the SLB instance.
Create ECS instances
You need to create ECS instances for an AWS migration plan or a data center migration plan.
1. Log on to the CMH console. In the left-side navigation pane, choose Preparation > Migration plan. On the Migration plan page, find the migration plan that you want to manage and click its name. In the Plan details section, find the Create ECS step and click Go to Create Resources in the Actions column.
2. Select the AWS EC2 instances for which you want to create destination ECS instances and click Parameter modification in the Actions column or click Batch configuration. The Modify configuration panel appears. If you modify the configurations for multiple ECS instances at a time, only the selected parameters are submitted. The following note describes the parameters that you must modify.
vpc, Security Group, and Switch: If no option is available for a parameter, the corresponding resource is not created in the destination region or zone. Go to the VPC console to create a VPC and a vSwitch. Go to the ECS console to create a security group.
Instance type: The system automatically selects an instance type based on the mapped instance type of the AWS EC2 instance. If the recommended instance type does not meet your requirements or the inventory is insufficient, you can change the instance type.
Payment Method: We recommend that you use the pay-as-you-go billing method. In this case, you are charged on an hourly basis. Make sure that your account balance is greater than or equal to CNY 100. If you select the subscription billing method, the instance fee for the specified subscription duration is deducted in a one-off manner.
System disk type, System disk size, and image: The system disk capacity affects the price of the instance.
Data disk type, Data disk performance, and Data disk size: Configure these parameters based on your business requirements.
Maximum public network outbound bandwidth: If this parameter is set to 0, Internet access is disabled for the instance. If this parameter is not set to 0, Internet access is enabled, and a network fee is charged.
In the Advanced Options section, configure the Resource Group, Deployment Set, and Login Credentials parameters.
Modify the parameters and click Yes. The system checks the inventory based on the specified configurations. If an instance cannot be created, the system displays the parameter for which the inventory is insufficient. You can modify the parameter and submit the modification again.
3. Select the source EC2 instances for which you want to create destination ECS instances and click Batch create resources.
In the message that appears, the Terraform code for creating the configured resources is displayed. Verify that the configurations are correct and click Submission.
4. View the task status.
After you submit the request for creating multiple resources at a time, the value of the Task status field changes to Exporting resources in the Resource creation details section.
You can view the task details when the task is running. For more information, see the View the task details section of this topic.
Wait until the task is complete and refresh the page. The destination ECS instances are created. The ID and status of each destination ECS instance are updated on the page. You can click the ID of a destination ECS instance to go to the details page of the ECS instance.
Create ApsaraDB RDS instances
You need to create ApsaraDB RDS instances for an AWS migration plan or a data center migration plan.
1. Log on to the CMH console. In the left-side navigation pane, choose Preparation > Migration plan. On the Migration plan page, find the migration plan that you want to manage and click its name. In the Plan details section, find the Create RDS step and click Go to Create Resources in the Actions column.
2. Select the AWS RDS instances for which you want to create destination ApsaraDB RDS instances and click Parameter modification in the Actions column or click Batch configuration. The Modify configuration panel appears. If you modify the configurations for multiple ApsaraDB RDS instances at a time, only the selected parameters are submitted. The following note describes the parameters that you must modify.
vpc and Switch: If no option is available for a parameter, the corresponding resource is not created in the destination region or zone. Go to the VPC console to create a VPC and a vSwitch.
Type of payment: We recommend that you use the pay-as-you-go billing method. In this case, you are charged on an hourly basis. Make sure that your account balance is greater than or equal to CNY 100. If you select the subscription billing method, the instance fee for the specified subscription duration is deducted in a one-off manner.
Type and Type version: Select the type and version of the database engine.
Series: If you select High availability version, you must also modify the Standby node zone and Standby node switch parameters.
Storage type, Instance type, and Storage space: The instance type and storage capacity affect the price of the instance.
Modify the parameters and click Yes. The system checks the inventory based on the specified configurations. If an instance cannot be created, the system displays the parameter for which the inventory is insufficient. You can modify the parameter and submit the modification again.
If you create an ApsaraDB RDS for PostgreSQL instance for the first time, you must use your Alibaba Cloud account or a RAM user that has the required permissions to perform service-linked role authorization. This way, the ApsaraDB RDS for PostgreSQL instance can access the Elastic Network Interface (ENI) service and create managed ENIs. For more information about the service-linked role, see Service-linked roles. For more information about how to attach the service-linked role to ApsaraDB RDS for PostgreSQL, see Create the AliyunServiceRoleForRdsPgsqlOnEcs service-linked role.
3. Select the source AWS RDS instances for which you want to create destination ApsaraDB RDS instances and click Batch create resources. In the message that appears, the Terraform code for creating the configured resources is displayed. Verify that the configurations are correct and click Submission.
4. View the task status.
After you submit the request for creating multiple resources at a time, the value of the Task status field changes to Exporting resources in the Resource creation details section.
You can view the task details when the task is running. For more information, see the View the task details section of this topic.
Wait until the task is complete and refresh the page. The destination ApsaraDB RDS instances are created. The ID and status of each destination ApsaraDB RDS instance are updated on the page. You can click the ID of a destination ApsaraDB RDS instance to go to the details page of the ApsaraDB RDS instance.
View the task details
When the task is running, you can click Jump to automation service desk in the Resource creation details section to view the task details in the IaC Service console.
Click View Details to view the task logs. If an error is reported, troubleshoot the error based on the logs.
Map multiple source resources to destination resources at a time
If you have created destination resources within the current account, you do not need to create destination resources again on the Create resource details page. Instead, you can use the batch mapping feature to map the source resources to the destination resources that have been created. Select source resources of the same type that you want to map and click Batch mapping target end.
In the panel that appears, click Select mapping in the Actions column of each source resource.
In the dialog box that appears, the resources that support mapping are displayed. Select a resource and click OK.
View the progress of a cross-region migration task
For cross-region migration plans, after you initiate a resource creation task on the Create resource details page, you can click the View Task Progress icon in the upper-right corner of the Mapping details section to view the task progress.
In the View Task Progress panel, you can view the process and progress of the CloudOps Orchestration Service (OOS) task, Object Storage Service (OSS) task, and Terraform resource creation task. If the task fails, click Re-run to run the task again.