Updated on 2024-04-16 GMT+08:00

Replicating Images Across Regions

Scenarios

An image is a regional resource. If you want to use a private image in another region, you can replicate it to the target region.

Cross-region image replication is required for system HA typically when your system is deployed in multiple regions. In most cases, ECSs are deployed in multiple regions (including regions outside China). If you want to clone an ECS across regions, you can replicate its image across the regions and then use the image to create the identical ECSs in the target region.
Figure 1 Typical cross-region replication

Background

  • Cross-region replication is applicable to cross-region server deployment or data backup. It is often used together with image sharing for cross-region, cross-account image replication. The following table describes image replication in different scenarios.

    Scenario

    Description

    Procedure

    Cross-region replication under the same account

    After the replication is complete, a new image is generated in the target region. The new image has an ID that is different from the source image ID.

    See this section.

    Cross-region, cross-account replication

    Replicate the image to the target region and share it with other accounts.

    See this section and Sharing Specified Images.

    Cross-account replication in the same region

    After the replication is complete, the image is shared with the target tenant. The target tenant can use the image (with the same ID as the source image) but the image owner is still the tenant who shared it.

    See Sharing Specified Images.

  • When a full-ECS image is replicated across regions, the associated CSBS or CBR backups will also be replicated. Therefore, you will be charged for these backups in the target region.
  • The time required for replicating an image across regions depends on the network speed, image size, and the number of concurrent tasks.
  • You can select multiple images for cross-region replication at a time. However, you are not allowed to select an ISO image, encrypted image, full-ECS image, frozen image, or the image that is being created.
  • An agency is required for cross-region image replication. This agency has the permissions of IMS Administrator, allowing you to perform operations on the projects in the destination region.

    For example, if you want to replicate an image from region A to region B, the agency must have the permissions of IMS Administrator in region B. For how to create an agency, see Create an Agency.

Constraints

  • For details, see What Are the Regions That Support Cross-Region Replication of System and Data Disk Images?
    Figure 2 Regions that support cross-region replication of system and data disk images
    • indicates that cross-region replication of system and data disk images is supported.
    • × indicates that cross-region replication of system and data disk images is not supported. In this case, export the desired image and then import it to the target region.
    • - indicates that the source and destination regions are the same.
    • Region adjustment may affect cross-region image replication of users that are registered after the adjustment. In this case, whether the replication can be performed is subject to the management console display. The users that were registered before the adjustment are not affected.
    • For Latin America regions, you can only replicate images from LA-Santiago to LA-Mexico City1 or LA-Sao Paulo1.
    • Regions not listed in the figure above do not support cross-region replication of system or data disk images.
  • Cross-region replication of full-ECS images is also available in certain regions.

    If a full-ECS image cannot be replicated to a different region, you can use it to create an ECS, use the ECS to create a system disk image and a data disk image, and replicate the images to the destination region.

    A full-ECS image created using an ECS backup can be replicated from the region where they reside to another region, but the replicated full-ECS image cannot be replicated across regions again.

  • You can replicate only private images across regions. If you want to replicate an image of another type (for example, a public image) across regions, you can use the image to create an ECS, use the ECS to create a private image, and then replicate the private image across regions.

    A private image cannot be replicated across regions after it is published in the Marketplace.

  • To perform cross-region replication, IAM users must have the IAM ReadOnlyAccess permission and the IMS FullAccess permission in both the source and destination regions.
  • The size of each image to be replicated across regions cannot be larger than 128 GB.
  • You can replicate only five images across regions at a time.
  • ISO images and encrypted images cannot be replicated across regions.

Procedure

  1. Log in to the management console.
  2. Under Compute, click Image Management Service.

    The IMS console is displayed.

  3. Locate the row that contains the image to be replicated, click More in the Operation column, and select Replicate.
  4. In the displayed Replicate Image dialog box, set the following parameters:

    If the current region does not support cross-region replication, set the parameters by referring to Replicating Images Within a Region.

    Figure 3 Replicating an image across regions
    • Replication Mode: Select Across Regions.
    • Name: Enter a name that is easy to identify. The image name is in the following format: copy_Name of the source region where the image is located_Source image name.
    • Destination Region: Select the region where you want to use the image.
    • Destination Project: Select a project in the destination region. After you select the destination region, the system automatically displays available projects.
    • Target Server Backup Vault: This parameter is available only for full-ECS images created using CBR backups. Select a vault for storing backups.

      If no CBR backup vault is available in the destination region, click Create Server Backup Vault to create one. Ensure that you select Replication for Protection Type. For other parameters, see Purchasing a Server Backup Vault. After the vault is created, click to refresh the page and select the vault from the drop-down list box.

    • IAM Agency: Select an IAM agency.
    • Description: This parameter is optional. Enter description of the replication.
  5. Click OK.

    Switch to the destination region. If the image status becomes Normal, the image replication is successful.

    The time required for replicating an image across regions depends on the network speed, image size, and the number of concurrent tasks.

Create an Agency

  1. Log in to the management console.
  2. In the upper right corner of the page, click the username and select Identity and Access Management.
  3. In the navigation pane, choose Agencies.
  4. Click Create Agency.
  5. On the Create Agency page, set the following parameters:
    • Agency Name: Enter an agency name, such as ims_admin_agency.
      Figure 4 Creating an agency
    • Agency Type: Select Cloud service.
    • Cloud Service: This parameter is available only if you select Cloud service for Agency Type. Select Image Management Service (IMS) from the drop-down list.
    • Validity Period: Select Unlimited.
    • Description: This parameter is optional. You can enter Agency with IMS Administrator privileges.
  6. Click Next.
    • Select Region-specific projects for Scope and select one or more projects from the drop-down list.

      In cross-region image replication, the agency must have the IMS Administrator permissions in the destination region. For example, if you want to replicate an image from CN-Hong Kong to CN East-Shanghai2, the agency must have the IMS Administrator permissions in CN East-Shanghai2.

      Do not select All projects. Otherwise, the created agency will be invalid.

    • Select IMS Administrator for Permissions.
    Figure 5 Granting permissions to an agency
  7. Click OK.
    Figure 6 New agency
    Figure 7 Permissions of the new agency