Migrate an ECS instance between DDHs

Updated at:

As your business grows, some Dedicated Hosts (DDHs) may run low on resources while others remain idle. You can migrate Elastic Compute Service (ECS) instances to balance resource allocation among DDHs. This improves resource utilization and ensures smooth business operations. This topic describes how to migrate an ECS instance between DDHs.

Prerequisites

  • You must stop the ECS instance that you want to migrate. Only offline migration is supported. For more information, see Stop an instance.

    Important

    Stopping an instance interrupts your business. Proceed with caution.

  • The destination DDH must meet the following conditions:

    • The destination DDH is under the same Alibaba Cloud account and in the same region and zone as the ECS instance that you want to migrate.

    • The destination DDH has sufficient resources to host the ECS instance. To view the available resources of a DDH, see View and export DDH information.

    • The required instance families are supported. For more information, see Specifications.

      Note
      • ECS instances of local instance types cannot be migrated to DDHs with local SSDs.

      • A DDH with a custom specification can be migrated only to another DDH with a custom specification.

    • The billing method must match that of the ECS instance to be migrated.

      A subscription DDH can host subscription or pay-as-you-go ECS instances. If you migrate a subscription ECS instance, the subscription of the instance cannot expire later than the subscription of the destination DDH.

Impacts

After all the ECS instances on the dedicated host are migrated to another dedicated host, the host ID and the metadata of the ECS instances remain unchanged. This metadata includes the instance ID, private IP address, and public IP address of each ECS instance. However, the machine ID of the dedicated host is changed.

Procedure

  1. Log on to the ECS console.

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

  3. You can migrate an ECS instance between DDHs from the Instance page or the Dedicated Hosts page.

    Instances page

    1. In the left-side navigation pane, choose Instances & Images > Instance.

    2. In the Actions column of the ECS instance that you want to migrate, click Instance Settings > Change Host.

    3. In the Change Host dialog box, configure the destination DDH.

      Parameter

      Description

      Target Host

      Select the destination DDH for the ECS instance from the list.

      Note

      If no DDHs that meet the migration conditions exist under your account, the destination DDH list is empty.

      Destination Instance Type

      You can change the instance configuration during migration. The supported instance configurations depend on the instance type of the destination DDH.

      • Custom type: For the destination instance type, you can drag the sliders to adjust the number of vCPUs and the memory size. The minimum adjustment unit for vCPUs is 1 vCPU. For values greater than 1 vCPU, only even numbers are supported, such as 2 vCPUs and 4 vCPUs. The minimum adjustment unit for memory is 1 GiB.

      • Other DDH types: The destination instance type list displays the instance types that support configuration changes.

      Associate with Host

      Select whether to permanently deploy the ECS instance on the destination DDH.

      • Yes: Permanently deploys the instance on the destination DDH. After the ECS instance is stopped and its resources are released, it must be started on this DDH. If the DDH has insufficient available resources, the instance fails to start.

      • No: Does not permanently deploy the instance on the destination DDH. After the ECS instance is stopped and its resources are released, it is preferentially started on this DDH. If the DDH has insufficient available resources, the system automatically selects another DDH that allows automatic deployment for the instance.

      Migration Method

      Only Stop and Migrate is supported. This requires the ECS instance to be in the Stopped state.

    4. Click OK.

      Refresh the Instances page and verify that the Host column displays the ID and name of the destination DDH.

    Dedicated Hosts page

    1. In the left-side navigation pane, choose Instances & Images > icon1 > Dedicated Hosts.

    2. On the Dedicated Hosts page, find the source DDH of the ECS instance and click Details in the Actions column.

      detail-info

    3. For the ECS instance that you want to migrate, click Change Host in the Actions column.

      modify-ddh

    4. In the Change Host dialog box, configure the destination DDH.

      Parameter

      Description

      Target Host

      Select the destination DDH for the ECS instance from the list.

      Note

      If no DDHs that meet the migration conditions exist under your account, the destination DDH list is empty.

      Destination Instance Type

      You can change the instance configuration during migration. The supported instance configurations depend on the instance type of the destination DDH.

      • Custom type: For the destination instance type, you can drag the sliders to adjust the number of vCPUs and the memory size. The minimum adjustment unit for vCPUs is 1 vCPU. For values greater than 1 vCPU, only even numbers are supported, such as 2 vCPUs and 4 vCPUs. The minimum adjustment unit for memory is 1 GiB.

      • Other DDH types: The destination instance type list displays the instance types that support configuration changes.

      Associate with Host

      Select whether to permanently deploy the ECS instance on the destination DDH.

      • Yes: Permanently deploys the instance on the destination DDH. After the ECS instance is stopped and its resources are released, it must be started on this DDH. If the DDH has insufficient available resources, the instance fails to start.

      • No: Does not permanently deploy the instance on the destination DDH. After the ECS instance is stopped and its resources are released, it is preferentially started on this DDH. If the DDH has insufficient available resources, the system automatically selects another DDH that allows automatic deployment for the instance.

      Migration Method

      Only Stop and Migrate is supported. This requires the ECS instance to be in the Stopped state.

    5. Click OK.

      After the migration is complete, the ECS instance automatically starts and enters the Running state. To confirm that the instance is running on the destination DDH, go to the DDH and view its instance list.