Updated on 2024-07-30 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

  • Cross-region replication of full-ECS images is only available for certain regions. You can see on the console if it is available for a given region.

    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 KooGallery.

  • 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 2 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.
    • 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.

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

    • Select IMS Administrator for Permissions.
  7. Click OK.