Change an instance type across availability zones

更新时间:
复制 MD 格式

This feature lets you migrate and reconfigure ECS instances to meet your business requirements.

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

How it works

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.

Procedure

Warning

This operation stops and restarts the instance. To minimize business impact, perform this operation during off-peak hours.

Step 1: Change instance type across zones

  1. Go to ECS console - Instances.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. Click the ID or name of the target instance to go to its details page. From the All Operations drop-down list, select Migrate Instance Across Zones.

    Note

    You can also perform batch operations on the Instances page. In the Configuration Change drop-down list, select Change Instance Type Across Zones. You can migrate up to five instances at a time.

  4. In the Cross-zone Migration dialog box, configure the parameters and click Create.

    The following table describes the parameters.

    Parameter

    Description

    Migration Task Type

    This parameter is set to ECS Instance Migration and cannot be changed.

    Current Region

    The region where the ECS instance to be migrated resides.

    Preferred Destination Zone

    Select a destination availability zone based on your requirements.

    Preferred Network Settings

    Select a destination vSwitch. After the migration, the instance is assigned a random private IP address from the vSwitch's CIDR block.

    You must create a VPC and a vSwitch in the destination availability zone in advance. For more information, see Create a VPC and a vSwitch.

    Important
    • The private IP address of the instance is not retained after the cross-availability zone migration. Make sure that no applications depend on the current private IP address.

    • You can modify the private IP address after the migration is complete. For more information, see Modify the primary private IPv4 address of an existing instance.

    Configuration-changed Instances to Be Migrated

    Displays the selected Instance ID/Name, Destination Zone, Target Specification, and Destination vSwitch.

    Note

    The system automatically displays a list of available instance types. If no instance types are available, the inventory in the current availability zone may be insufficient.

    Notes

    Select I have backed up data.

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

Step 2: Verify the migration result

Return to the ECS console to check the status of the instance.

The migration is complete when the instance status changes from Migrating to Running and its availability zone is updated to the destination zone. You can verify the new status and availability zone in the ECS console. Alternatively, you can monitor the progress in the SMC console:

  1. Log on to the SMC console.

  2. In the navigation pane on the left, choose Cloud Migration > Cross-zone Migration.

  3. View the migration progress in the Real-time Migration Status column. When the Real-time Migration Status is Completed, the instance type change is complete.

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.