Migrate ECS instances across zones

更新时间:
复制 MD 格式

Server Migration Center (SMC) lets you migrate Alibaba Cloud Elastic Compute Service (ECS) instances to a different zone within the same region and change the instance type (vCPU and memory) within the same instance family.

Scenarios

  • Resize an ECS instance

    If your current ECS instance does not meet your business requirements and the desired instance type is out of stock in the current zone, you can resize the instance while you migrate it to another zone. You can change the vCPU and memory specifications within the same instance family. For example, you can change an instance from ecs.g6e.large (2 vCPUs, 8 GiB) to ecs.g6e.xlarge (4 vCPUs, 16 GiB).

  • Change the zone of an ECS instance

    You can deploy application instances across different zones in the same region to ensure service continuity if a zone fails. This deployment method improves the high availability (HA) and stability of your services. For example, you can migrate an instance from Hangzhou Zone H to Hangzhou Zone K.

Important

Limits

  • Spot instances do not support cross-zone migration.

  • When you change an instance type, you can only resize within the same instance family (vCPU and memory). Cross-family changes are not supported. For more information about instance families, see Instance families.

    Note

    If you want to change the instance family, you must first complete the cross-zone migration and then change the instance type of the destination instance. For more information, see Change subscription instance types or Change pay-as-you-go instance types.

  • You can migrate a maximum of five instances at a time across zones in the ECS console. To migrate more than five instances, contact customer support.

  • The following instance families do not support cross-zone migration.

    • Heterogeneous computing

    • ECS Bare Metal Instance

    • Supercomputing Cluster

    • Universal instance family u2a

    • Some instance types of the economy instance family e. Only e-c1m1, e-c1m2, and e-c1m4 are supported.

    • x86 computing

      • Big data instance families

      • Local SSD instance families

      • Security-enhanced instance family

    • Some generation 8 instance families. Only hfr8i, hfc8i, hfg8i, r8ae, g8ae, c8ae, r8y, c8y, g8y, r8a, g8a, c8a, g8i, r8i, and c8i are supported.

    • Some generation 9 instance families. Only r9i, g9i, and c9i are supported.

Migration impact

Impact item

Description

Migration duration

It takes about 15 minutes from when the source ECS instance stops until the migrated instance starts.

Important

When the ECS instance starts successfully, compute and network resources have been migrated. Disk data migration continues after startup. Migrating 100 GiB of disk data typically takes about 4 hours. During this time, disk I/O performance may temporarily drop, and snapshot or disk-related operations are not supported.

Instance status changes

The migration process stops and restarts your ECS instance. Perform migration during off-peak business hours.

Software authorization code changes

After migration, software authorization codes might change.

If your application does not have a migration license plan, contact your software vendor or channel partner to submit a validation form and reauthorize.

Static public/private IP addresses

  • Static public IP remains unchanged.

    After migration, the system retains and assigns the original static public IP.

  • Private IP address changes.

    After migration, the destination virtual switch assigns a new private IP address to your ECS instance. You can change the private IP address after migration. For more information, see Change the primary private IPv4 address of the primary ENI on an existing instance.

Other

  • After migration, the ECS instance ID, elastic IP address (EIP), MAC address, security group, disk serial number, disk ID, username, and logon password remain unchanged.

  • If the source ECS instance was added to a Server Load Balancer (SLB) vServer group, the migrated instance is not automatically added. Add it manually. For more information, see Edit a vServer group.

Billing

  • Migration is free if you do not change the instance type.

  • If you change the instance type during the migration, the billing method changes based on the following rules:

    • If you downgrade a subscription instance, you may receive a refund. The refund amount is the price difference between the new configuration and the remaining prepaid amount of the original configuration. For more information, see Real-time downgrade and opt-out rules.

      Important

      The number of times that you can downgrade instances each month is limited based on your historical consumption. The specific quota is displayed on the console page. If you use up your monthly quota, you cannot perform more downgrades in the current month. The quota is automatically reset on the first day of the next month. For more information, see Opt-out rules.

    • If you upgrade a subscription instance, you must pay the price difference for the remaining subscription period. The specific amount is displayed in the console.

    • If you change the instance type of a pay-as-you-go instance, you are charged based on the new instance type after the migration is complete.

Preparations

  • Create snapshots for the disks of your ECS instance to back up data and prevent data loss during the migration. For more information, see Manually create a single snapshot.

  • Ensure that the source instance is in a virtual private cloud (VPC). If your ECS instance is in the classic network and you want to change its instance type across zones, you must first migrate the instance to a VPC. For more information, see Migrate ECS instances from the classic network to a VPC.

  • Ensure that no applications depend on the private IP address of the source instance. When you select a destination virtual switch, the system assigns a new private IP address to the destination ECS instance.

  • If your ECS instance runs security software, such as SafeDog, Hushen, or YunSuo, disable the software before you start the migration task. Re-enable the software after the task is complete. Otherwise, the virtualization driver may fail to be installed, which prevents the ECS instance from starting.

  • Ensure that the system disk has at least 500 MiB of free space. Otherwise, the virtualization driver may fail to be installed, which prevents the ECS instance from starting.

  • The source ECS instance must not be configured with IPv6, multiple elastic network interfaces (ENIs), a reverse proxy, high-availability (HA) IP addresses, Alibaba Cloud Global Accelerator (GA), or custom route tables.

Migration procedure

  1. Go to the Cross-Availability Zone Migration page in the SMC console.

  2. Click Start Migration or Migrate Now.

  3. In the Cross-zone Migration dialog box, select a region, select the ECS instances that you want to migrate, and then click Configure Parameters.

  4. In the dialog box that appears, configure the parameters and click Create.

    The following table describes the parameters.

    Parameter

    Description

    Migration Job Type

    By default, ECS Instance Migration is selected and cannot be changed.

    Current Region

    The region where the ECS instance to migrate resides.

    Preferred Destination Zone

    Select a destination zone based on your needs.

    Preferred Network Settings

    Specify a destination vSwitch. After migration, the instance receives a random private IP address from the vSwitch CIDR block.

    Create a VPC and vSwitch in the destination zone beforehand. For more information, see Create a VPC and vSwitch.

    Important

    Instance Type

    Select whether to change the instance type based on your needs.

    • Use Current Instance Type: Keep the current instance type.

    • Change Instance Type: For supported instance types and limits, see Limits.

      Important

      Currently, you can only resize within the same instance family.

    Preferred New Instance Type

    Select a destination instance type.

    Note
    • This parameter appears only if you select Change Instance Type.

    • The system displays a list of supported instance types. If no types appear, the current zone might be out of stock.

    Instance to Be Migrated

    Shows the selected Instance ID/Name, Destination Zone, Destination type, and Destination vSwitch.

    Note

    Select I have backed up my data.

  5. In the dialog box that appears, click Pay and follow the on-screen instructions to complete the payment.

Verify migration results

  • If the Real-time Migration Status is Completed, the migration is successful.

    After the cross-zone migration is complete, verify that the zone and instance type are changed:

    1. In the Actions column of the migration source, click View Destination Instance.

    2. On the Instance Details tab, check the values of Zone and Instance Specifications.

  • If the Real-time Migration Status is InError, the migration task has failed.

    Troubleshoot the issue and retry the migration:

    1. In the Actions column, click Troubleshoot Errors. Use the error code and error message to resolve the issue. For more information, see SMC FAQ and Troubleshooting.

    2. After resolving the issue, click Retry Migration Job in the Actions column. The migration resumes from where it left off.

FAQ

During a cross-zone migration, the following message appears: The current instance private IP has reverse dependencies or routing dependencies, such as Workbench or DTS. Find and delete Workbench links under Workbench > Instances > Private Network Links. Find routing dependencies in the VPC console under Route Tables and delete route entries that depend on this instance.

If this issue occurs, perform the following steps to troubleshoot:

  1. Check whether a private network link is configured in Workbench.

    In the Workbench console, choose Instance > Private Links and check whether a private network link is configured for the ECS instance.

    Note

    When you log on to the Workbench console, click to enable the Workbench menu bar.

    • If a link exists, click Release Link and then continue to the next step.

      In the top menu bar, click Instances and select Private Network Links. On the page that appears, find the target instance and click Release link in the Actions column.

    • If it does not exist, continue to the next step.

  2. Check whether a custom route entry exists that uses the ECS instance as the next hop.

    In the Route Tables console, find the route table that is used by the ECS instance based on its VPC. Check whether a custom route entry exists whose next hop is the ECS instance.

    • If a custom route entry exists, delete it and proceed to the next step.

      In the navigation pane on the left of the VPC console, click Route Tables. On the page that appears, find the destination route table and go to its details page. Click the Route Entries > Custom Route Entries tab. Find the route entry whose Next Hop is the ECS instance and click Delete in the Actions column.

    • If it does not exist, continue to the next step.

  3. Check whether a DTS migration task exists whose source database is a Self-managed Database on ECS.

    In the DTS console, check whether a DTS migration task exists whose source database is a Self-managed Database on ECS.

    • If the migration task exists, delete it and proceed to the next step.

      Important

      Before you delete a DTS task, make sure that data transmission is complete and your data is backed up.

    • If no such migration task exists, proceed to the next step.

  4. Check for resources that are associated with the VPC.

    In the VPC console, check for resources that are associated with the VPC, such as DHCP options sets, network ACLs, route tables, and IPv4 gateways. If any of these resources exist, delete them before you proceed.

    For more information, see DHCP options sets and DNS hostnames, Delete a network ACL, Delete a custom route table, and Delete an IPv4 gateway.

    On the Basic Information tab of the target VPC, check the DHCP Options Set field. If a DHCP options set is associated with the VPC, click Dissociate to unbind it.