Migrating ECSs Across Accounts and Regions Through Image Replication
Scenarios
If you want to migrate ECSs between Huawei Cloud accounts in different regions, you are advised to use IMS to implement the migration.
For details about common scenarios and methods of server migration, see Migration Knowledge.
For details about migrating ECSs across accounts and regions, see Cross-Account, Cross-Region ECS Migration.
Migration Knowledge
Common server migration scenarios include migration from physical servers to cloud servers, from virtualization platforms, such as VMware, to Huawei Cloud ECSs, between Huawei Cloud ECSs across accounts or regions, from cloud servers on a third-party cloud platform to Huawei Cloud ECSs, and installation disk imaging. For details about the recommended migration methods, see Table 1.
Scenario |
Condition |
Recommended Solution |
Remarks |
---|---|---|---|
From x86 physical servers to Huawei Cloud ECSs For example, P2V |
The servers can access the Internet. |
Server Migration Service |
- |
From virtualization platforms, such as VMware, to Huawei Cloud ECSs |
The VMs can access the Internet. |
Server Migration Service |
- |
The VMs cannot access the Internet. |
|
If the image file format is not vhd, vmdk, qcow2, raw, vhdx, qcow, vdi, qed, zvhd, or zvhd2, convert the file format. |
|
Between Huawei Cloud ECSs across accounts or regions For example, the ECSs of account A in the CN North-Beijing4 region are to be migrated to account B in the CN East-Shanghai1 region. |
The ECSs can access the Internet. |
Server Migration Service |
- |
The ECSs cannot access the Internet. |
Recommended
|
Only the full-ECS images created using CBR can be shared. The size of images to be replicated across regions cannot be greater than 128 GB. |
|
From a third-party cloud platform to Huawei Cloud For example, from Alibaba Cloud or Tencent Cloud to Huawei Cloud |
The cloud servers can access the Internet. |
Server Migration Service |
- |
The cloud servers cannot access the Internet. |
|
If the image file format is not vhd, vmdk, qcow2, raw, vhdx, qcow, vdi, qed, zvhd, or zvhd2, convert the file format. |
|
Installation disk imaging For example, create an image file offline and import it to Huawei Cloud. |
The ISO installation disk image of the required OS is available. |
Creating a Windows Image Using VirtualBox and an ISO File Introduction or |
- |
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 website access address 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 Compute > Elastic Cloud Server.
The Elastic Cloud Server page is displayed.
- Locate the row that contains the ECS with the website deployed (for example, ecs-fe9e), and choose More > Manage Image/Disk/Backup > Create Image in the Operation column.
The Create Image page is displayed.
- Set parameters.
Figure 2 Creating a private image
- Type: Full-ECS image
Data disks contain service data. You can use an ECS with data disks attached to it to create a full-ECS image.
- Source: Select ECS and select ecs-fe9e from the list.
- Specify Server Backup Vault to store backups. If the ECS has been associated with a vault, the system selects the associated vault by default.
The created full-ECS image and backup are stored in the server backup vault.
If no server backup vault is available, click Create Server Backup Vault to create one. Ensure that you select Backup for Protection Type.
- Name: Enter a name for the image, for example, migrate_test.
- Enterprise Project: Select default.
- Type: Full-ECS image
- 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.
- Agency Name: Enter an agency name, for example, ims_administrator_agency.
- Click Next and select a policy for the agency.
- Select IMS Administrator.
Figure 5 Selecting a policy
- Click Next and select an authorized region.
- In the Project [Region] column, select cn-north-4 [CN North-Beijing4] and cn-east-3 [CN East-Shanghai1], and click OK.
Figure 6 Selecting a region
Do not select All projects in the Project [Region] column. Otherwise, the created agency will be invalid.
- Click Finish. You can view the created agency on the Basic Information tab.
Figure 7 Viewing agencies
- Under Service List, choose Compute > Image Management Service. Then, click the Private Images tab.
The Private Images page is displayed.
- Locate the row that contains the migrate_test image, and choose More > Replicate in the Operation.
The Replicate Image dialog box is displayed.
- Set parameters.
Figure 8 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.
- Target Server Backup Vault: Select vault-2398.
- 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 9 Viewing private images
Step 3: Share the Image with the Target Account
In the CN East-Shanghai1 region, share the image with account B. On the API Credentials page, obtain the project ID of account B in the CN East-Shanghai1 region.
- In the CN East-Shanghai1 region, choose Service List > Compute > 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 project ID of account B, and click OK.
Figure 11 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 (account B) and switch to the CN East-Shanghai1 region.
- Under Service List, choose Compute > 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 12 Accepting a shared image
After the image is accepted, it is displayed in the shared image list.
Figure 13 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 14 Selecting an image
- Wait for several minutes and check whether the new ECS is displayed in the ECS list.
- Access the website to check whether the website is available on the new ECS.
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