This feature lets you migrate and reconfigure ECS instances to meet your business requirements.
Use cases
-
Change the instance type of an ECS instance
If the current configuration of your ECS instance does not meet your business needs and the required instance type is sold out in the current zone, you can migrate the instance to another zone while changing its vCPU and memory specifications within the same instance family. For example, you can change an
ecs.g6e.largeinstance with 2 vCPUs and 8 GiB of memory to anecs.g6e.xlargeinstance with 4 vCPUs and 16 GiB of memory. -
Change the zone of an ECS instance
Deploying application instances in different zones within the same region improves overall system availability and stability. If one zone fails, services can quickly fail over to another zone to continue running. For example, you can migrate an instance from Hangzhou Zone H to Hangzhou Zone K.
-
If you want to migrate an ECS instance to another region, consider the following methods:
-
Use the server migration feature to migrate an ECS instance from one region to another. For more information, see Migrate ECS instances across or within accounts.
-
Create a custom image from the current instance, copy the custom image to the destination region, and then use the image to create a new instance. For more information, see Create a custom image from an instance, Copy a custom image, and Create an instance from a custom image or a shared image.
-
How it works
Limitations
-
Preemptible instances do not support cross-zone migration.
-
When you change an instance type, you can only select a new type within the same instance family (vCPUs and memory). For more information about instance families, see Instance families.
NoteIf you want to change to an instance type in a different instance family, first migrate the instance across zones and then change the instance type. For more information, see Change the instance type of a subscription instance or Change the instance type of a pay-as-you-go instance.
-
You can migrate a maximum of 5 instances at a time in the ECS console. To increase this limit, contact technical support.
-
The following instance families do not support cross-zone migration:
-
Heterogeneous computing
-
ECS Bare Metal Instance
-
Super Computing Cluster (SCC)
-
General-purpose compute-optimized instance family u2a
-
Some burstable instance families e (only e-c1m1, e-c1m2, and e-c1m4 are supported)
-
x86-based computing
-
Big data
-
Local SSDs
-
Security-enhanced
-
-
Some 8th-generation instance families (only hfr8i, hfc8i, hfg8i, r8ae, g8ae, c8ae, r8y, c8y, g8y, r8a, g8a, c8a, g8i, r8i, and c8i are supported)
-
Some 9th-generation instance families (only r9i, g9i, and c9i are supported)
-
Migration impact
|
Item |
Description |
|
Migration duration |
The migration takes about 15 minutes, from stopping the source ECS instance to starting the destination ECS instance. Important
A successful instance startup indicates that the compute and network resources have been migrated. The system continues to migrate cloud disk data after the instance starts. It typically takes about 4 hours to migrate 100 GiB of cloud disk data. During this period, cloud disk I/O performance might be temporarily degraded, and you cannot perform snapshot or cloud disk-related operations. |
|
Instance status change |
The ECS instance is stopped and restarted during the migration. Perform the migration during off-peak hours. |
|
Software license |
The software license code might change after migration. If the application does not have a migration licensing plan, contact the software vendor or channel partner to submit a verification form and reauthorize the software. |
|
Public and private IP addresses |
|
|
Other |
|
Billing
-
No fees are incurred if you do not change the instance type during migration.
-
If you change the instance type during migration, the following billing rules apply:
-
Downgrading a subscription instance: Downgrading the instance type may result in a refund. The refund is the difference between the remaining value of the original configuration and the price of the new configuration. For more information, see Rules for unsubscribing from resources with a downgrade.
ImportantA monthly quota applies to instance type downgrades. Your historical spending determines this quota, and the page displays the specific amount. You cannot perform further downgrades after you exhaust your monthly quota. The quota is automatically reset on the first day of the next month. For more information, see Unsubscription rules.
-
Upgrading a subscription instance: You must pay the price difference for the remainder of the current billing cycle. The console displays the actual fee.
-
Changing a pay-as-you-go instance: After the migration, the instance is billed based on the new instance type.
-
Prerequisites
-
Create snapshots of the cloud disks attached to the ECS instance to ensure data security during the migration. For more information, see Create a snapshot for a disk.
-
Ensure that the instance is in a Virtual Private Cloud (VPC).
-
Ensure that no applications depend on the current private IP address of the instance. When you select a destination vSwitch, the system reassigns a private IP address to your ECS instance.
-
If security software such as Safedog, Huweishen, or Yunsuo is installed on the ECS instance, 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 install, 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 install, which prevents the ECS instance from starting.
-
Ensure that the ECS instance is not configured with the following items: IPv6, multiple elastic network interfaces (ENIs), reverse proxies, high-availability virtual IP addresses (HAVIPs), Alibaba Cloud Global Accelerator (GA), or route tables.
-
If the ECS instance has a pending instance type change that has not taken effect through a restart, restart the instance before you start the cross-zone migration.
-
Do not perform stop, restart, or release operations on the ECS instance either manually or through operations scripts while the migration task is running. Doing so may cause the task to fail.
Procedure
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
Go to ECS console - Instances.
In the upper-left corner of the page, select a region and resource group.
-
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.
NoteYou 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.
-
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.
NoteThe 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.
-
-
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:
-
Log on to the SMC console.
-
In the navigation pane on the left, choose .
-
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
Why do I see the message "The private IP address of the current instance has reverse dependencies or route dependencies, such as from services like Workbench or DTS. For Workbench, you can find and delete the dependency under Workbench > Instances > Private Network Link. For route dependencies, you can find and delete the route entry that depends on this instance in the VPC console > Route Tables" during a cross-zone migration?
If this issue occurs, perform the following troubleshooting steps:
-
Check for Workbench private network links.
Go to the Workbench console and choose to check whether a private network link exists for the ECS instance.
NoteWhen you log on to the Workbench console, open the Workbench menu.
-
If a link exists, click Release Link and proceed to the next step.
In the top menu bar, click Instances and select Private Network Link from the drop-down menu. On the Private Network Link page, you can find Release Link in the Actions column for the target instance.
-
If no link exists, proceed to the next step.
-
-
Check for custom route entries whose next hop is the ECS instance.
Go to the Route Tables console. Find the route table 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 left-side navigation pane of the VPC console, click Route Tables. Go to the details page of the target route table. On the Route Entries > Custom tab, identify the route entry whose Next hop is the ECS instance, and then click Delete in the Actions column.
-
If no such entry exists, proceed to the next step.
-
-
Check for Data Transmission Service (DTS) migration tasks whose source is a Self-managed Database on ECS.
Go to the Data Transmission Service (DTS) console and check whether a DTS migration task exists whose source is a Self-managed Database on ECS.
-
If such a task exists, delete it and proceed to the next step.
ImportantBefore you delete a DTS task, make sure that the data transfer is complete and the data is backed up.
-
If no such task exists, proceed to the next step.
-
-
Check for associated VPC resources.
Go to the VPC console and check for associated VPC resources, including a DHCP options set, network ACL, route table, or IPv4 gateway. 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, click Disassociate.