Migrating ECSs Across Accounts and Regions
Context
You can migrate an ECS by deploying the services on a new ECS, using Server Migration Service (SMS), or using Image Management Service (IMS). If you want to migrate ECSs between HUAWEI CLOUD accounts in different regions, you are advised to use IMS to implement the migration.
| Migration Method | Description | Characteristics | Constraints |
|---|---|---|---|
| Deploying services on a new ECS | Purchase a new ECS to deploy the services. In this way, you need to upload files, install software, create file directories, and assign file permissions again. | Service migration is not required but data on the data disk needs to be migrated. | Services need to be deployed and configured on the new ECS, which consumes manpower, materials, and time. |
| The SMS supports physical to virtual (P2V) and virtual to virtual (V2V) migrations, enabling you to migrate x86 physical servers or VMs in private or public clouds to HUAWEI CLOUD. |
| The ECS to be migrated must be able to access the public network. | |
| Migrate an ECS from an on-premises IDC, private cloud, or other public clouds to HUAWEI CLOUD, or migrate an ECS between HUAWEI CLOUD accounts in different regions by importing private images, replicating images cross regions, and sharing images. |
| Local storage space is occupied and only image files no larger than 1 TB can be used. |
Cross-Account, Cross-Region ECS Migration
To migrate an ECS to a different account in another region, use the ECS to create an image, replicate the image to the destination region under the same account, and then share the image with the desired account.
For example, if a website is set up on an ECS in the CN North-Beijing4 region and you want to migrate the ECS to another account in the CN East-Shanghai1 region, the process is as follows:
Step 1: Create a Private Image
Use the ECS with the website deployed to create an image in the CN North-Beijing4 region. Assume that the web access address of the ECS is http://121.36.xxx.xxx/index.html.

- Log in to the management console and switch to the CN North-Beijing4 region.
- Under Service List, choose Computing > Elastic Cloud Server.
The Elastic Cloud Server page is displayed.
- Locate the row that contains the ECS with the website deployed (for example, ecs-373896-centos), and choose More > Manage Image/Disk > Create Image in the Operation column.
The Create Image page is displayed.
- Set parameters. Figure 2 Creating a private image
- Type: Select System disk image.
- Source: Select ECS and select ecs-373896-centos from the list.
- Name: Enter a name for the image, for example, migrate_test.
- Enterprise Project: Select default.
- Click Next.
- Confirm the settings, read and agree to the agreement, and click Submit.
- The system redirects to the private image list. Wait for several minutes and check whether the private image is successfully created. Figure 3 Viewing private images
Step 2: Replicate the Image to the Destination Region
Replicate the private image created in Step 1: Create a Private Image to the CN East-Shanghai1 region. Before performing the replication, create an IAM agency.
- Create an IAM agency.
- In the upper right corner of the page, click the username and select Identity and Access Management.
- In the navigation pane, choose Agencies.
- Click Create Agency.
- On the Create Agency page, set the following parameters:
- Agency Name: Enter an agency name, for example, ims_administrator_agency. Figure 4 Creating an agency
- Agency Type: Select Cloud service.
- Cloud Service: This parameter is available if you select Cloud service for Agency Type. Click Select. In the displayed Select Cloud Service dialog box, select Image Management Service (IMS) and click OK.
- Validity Period: Select Unlimited.
- Description: This parameter is optional. You can enter Agency with IMS Administrator privileges.
- Permissions: Click Assign Permissions. By default, Policy View is displayed. Enter IMS Administrator in the search box, select the IMS Administrator check box, select CN North-Beijing4 and CN East-Shanghai1 in the Project [Region] column, and click OK.
Do not select All projects in the Project [Region] column. Otherwise, the created agency will be invalid.
Figure 5 Configuring permissions
- Agency Name: Enter an agency name, for example, ims_administrator_agency.
- Click OK. Figure 6 Viewing agencies
- Under Service List, choose Computing > Image Management Service. Then, click the Private Images tab.
The Private Images page is displayed.
- Locate the row that contains the migrate_test image, anc choose More > Replicate in the Operation.
The Replicate Image dialog box is displayed.
- Set parameters. Figure 7 Replicating an image
- Name: Retain the default value copy_cn-north-4_migrate_test.
- Destination Region: Select CN East-Shanghai1.
- Destination Project: Select cn-east-3.
- IAM Agency: Select ims_administrator_agency created in 1.
- Click OK.
- Switch to the CN East-Shanghai1 region. Wait for several minutes and check whether the image is successfully replicated. Figure 8 Viewing private images
Step 3: Share the Image with the Desired Account
In the CN East-Shanghai1 region, share the image with the desired account. Before the image sharing, obtain the desired account name. If it is an account of a DeC or multi-project user, you also need to obtain its project name. (You can obtain the project name from My Credentials. For details, see Figure 9.)
- In the CN East-Shanghai1 region, choose Service List > Computing > Image Management Service and click the Private Images tab.
The Private Images page is displayed.
- Locate the row that contains the copy_cn-north-4_migrate_test private image. Choose More > Share in the Operation column.
The Share Image dialog box is displayed.
- Click the Shared Images tab, enter the desired account name, and click Add. Figure 10 Sharing an image
- Click OK.
Step 4: Accept the Shared Image
Accept the shared image in the CN East-Shanghai1 region.
- Log in to the management console using the account the image is shared with and switch to the CN East-Shanghai1 region.
- Under Service List, choose Computing > Image Management Service. Then, click the Images Shared with Me tab.
- In the displayed dialog box, select copy_cn-north-4_migrate_test and click Accept. Figure 11 Accepting a shared image
After the image is accepted, it is displayed in the shared image list.
Figure 12 Viewing shared images
Step 5: Use the Shared Image to Create an ECS
Use the shared image to create an ECS and verify that the website is available on the ECS.
- Locate the row that contains the shared image copy_cn-north-4_migrate_test, and click Apply for Server in the Operation column.
The page for purchasing ECSs is displayed.
- Set the billing mode, AZ, specifications, and network as needed to create an ECS. Retain the default value for Image. Figure 13 Selecting an image
- Wait for several minutes and check whether the new ECS is displayed in the ECS list. Figure 14 Viewing ECSs
- Access the website to check whether the website is available on the new ECS.
Last Article: Configuring an ISO File as a Local Image Source
Next Article: Change History


Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.