Migrate ECS instances across or within accounts

Updated at:
Copy as MD

Use Server Migration Center (SMC) to migrate ECS instances between accounts or across regions within the same account for business migration, insufficient resources in a region, cost optimization, or disaster recovery.

Note

You can also use the ECS custom image copy and image sharing features to migrate ECS instances across accounts or within the same account.

Use cases

Supported migration scenarios:

  • Use case 1: Cross-account migration

    Migrate ECS instances between different Alibaba Cloud accounts, whether same-region or cross-region.

  • Use case 2: Same-account migration

    Migrate ECS instances within the same Alibaba Cloud account, whether cross-region or cross-zone.

    • If you do not have a destination ECS instance, convert the source server into a custom image, and then create a new ECS instance from the image.

    • If you have a destination ECS instance, you can migrate directly to it. The source and destination must have compatible storage, OS, and configurations.

  • Use case 3: Shrinking disks

    ECS does not support shrinking system disks or data disks. To shrink a disk during migration, create a custom image or migrate to a destination instance with a smaller disk. Shrink a disk.

    Important
    • For Linux servers, you can change the disk size during migration only when block replication is disabled.

    • For Windows servers, you must shrink the disk before migrating.

Limitations

You cannot migrate ECS instances created from Alibaba Cloud Marketplace images. You can contact us to be added to the allowlist.

Migration impacts

Review the following impacts before you migrate.

Item

Description

Migrated data directories

During the migration, SMC automatically generates a disk partition structure on the destination that closely matches the source server's structure. You can adjust the partition structure of the destination disk, including its partition size, order, transfer method, and LVM configurations.

By default, all disks are migrated:

  • If a data disk does not have a mount target, the disk is not migrated.

  • If you do not need to migrate specific partition directories, exclude them when you adjust the partition structure.

Adjust the disk partition structure as needed.

Intermediate instance

Do not interfere with the intermediate instance.

Do not stop, start, restart, or release the intermediate instance, or change its billing method during migration. The intermediate instance is automatically released after migration.

Note
  • For each migration, SMC creates a temporary, pay-as-you-go intermediate instance named No_Delete_SMC_Transition_Instance in your destination Alibaba Cloud account to assist with the migration.

  • If you migrate to a destination instance, that instance serves as the intermediate instance and is not automatically released.

How it works.

IP address

The IP address changes after the migration, potentially causing service interruptions. Perform the migration during off-peak hours. If your services involve IP address configurations, you must update the domain name resolution and ICP filing after the migration.

Underlying hardware

The underlying hardware changes after the migration. This may invalidate certain application licenses that are bound to specific hardware. Review your license agreements.

Performance impact

The migration process consumes server resources, including CPU, memory, disk I/O, and network bandwidth.

Data consistency

Data consistency issues after migration.

Impact on related web applications

After migrating a server to Alibaba Cloud ECS, several aspects of your environment change, including network topology, compute and storage resources, application security settings, cost, monitoring, compatibility, network latency and bandwidth, backup and recovery, and O&M processes. You must also consider the following:

Impact

Description

Network connectivity

After the server migration, the ECS instance uses a new Virtual Private Cloud (VPC). Its network location and other configurations change, preventing the instance from directly communicating with your original network or other ECS instances in the source VPC. To enable cross-account and cross-VPC communication, see VPC interconnection.

Security group

The migrated ECS instance uses new security group rules to control inbound and outbound traffic. Changes to access rules may affect your services. If the destination security group lacks the required rules, export the rules from the source security group and import them to the destination security group. For more information, see Import and export security group rules.

SSL certificate

If your website uses HTTPS, apply for and install an SSL certificate. You can apply for a free SSL certificate from Alibaba Cloud and deploy it to the ECS instance. For more information, see Purchase and deploy an SSL certificate to an ECS instance.

Data migration

To migrate data from other servers, use FTP, SCP, or manual backups to OSS. Transfer files to an ECS instance. Use ossutil to transfer data to an ECS instance.

Other configurations

Ensure that database connections, APIs, Server Load Balancer (SLB), and other settings point to the new domain name and ECS IP address.

Prerequisites

  • Complete the pre-migration preparations for the server.

  • Read the migration guide to learn about the SMC client, how migration works, billing, the migration process, and feedback channels.

  • To prevent data loss, back up important data to an image, a snapshot, or an external storage device before migration.

  • If you need to migrate a server across international regions, migration can be slow due to unstable public networks. Estimate the migration time and test the transfer speed. We recommend that you connect the source server to an Alibaba Cloud VPC by using a service such as VPN Gateway, Express Connect, a leased line, or Smart Access Gateway to migrate over a private network.

  • If you can directly access a VPC in an Alibaba Cloud region from your on-premises data center, VM environment, or cloud host, we recommend using the SMC private network migration method. This method is faster and more stable than migrating over the public network.

  • If you need to migrate a source server to an existing Alibaba Cloud ECS instance, ensure the following:

    • If the source server runs Linux, the destination instance must also run a Linux distribution. If the source server runs Windows, the destination instance must also run Windows.

    • The number of data disks attached to the destination instance must be greater than or equal to that on the source server. If the destination instance does not have enough data disks, you must attach data disks.

    • The capacities of the system disk and data disks on the destination instance must be greater than or equal to those of the corresponding disks on the source server. If you plan to reduce the disk size of the source server, the capacity of the system disk and data disks on the destination instance must be greater than or equal to the used disk space on the source server. If a cloud disk on the destination instance has insufficient capacity, you must resize the cloud disks.

Migration

Step 1: Import migration source

Import a migration source from console

Cross-account

To migrate an ECS instance from source account A to destination account B, log on to the RAM console using source account A to create a role. Then, log on to the SMC console using destination account B.

Warning
  • In a cross-account migration, distinguish between the source account A and destination account B to prevent a reverse migration.

  • When you import a migration source, you must use a RAM user from destination account B.

Prerequisites
Before you begin
  • To perform a cross-account migration in the console, you must use a RAM user to import the migration source. First, log on to the primary destination account and grant the following permissions to the RAM user:

    If no RAM user exists in the primary account, create one first.
    • The AliyunSTSAssumeRoleAccess permission to call the STS service.

    • The AliyunSMCFullAccess permission to manage SMC.

    • The AliyunECSReadOnlyAccess permission for read-only access to ECS.

    • The AliyunECSAssistantFullAccess permission to manage Cloud Assistant.

    The following example shows how to grant the AliyunSTSAssumeRoleAccess permission.

    1. Log on to the RAM console using the primary account of the destination account.

    2. In the left-side navigation pane, choose Users and click the logon name of the target user.

    3. Choose Permissions > Grant Permission.

    4. In the Add Permissions panel, enter AliyunSTSAssumeRoleAccess, select the corresponding policy, and then click OK.image

  • Obtain the primary account IDs of the source and destination accounts.

    1. Log on to the Alibaba Cloud console by using the source account and the destination account.

    2. Hover over the profile icon in the upper-right corner to obtain the primary account ID.image

Procedure
  1. Log on to the RAM console using source account A (the account that owns the ECS instance to be migrated) to create and authorize a role.

    1. Choose Permissions > Policies. Click Create Policy. On the JSON Editor tab, add the policy, and then click OK. Specify a name for the policy, for example, policy-smc.

      {
          "Version": "1",
          "Statement": [
              {
                  "Action": [
                      "ecs:DescribeZones",
                      "ecs:DescribeInstances",
                      "ecs:DescribeSecurityGroupAttribute",
                      "ecs:DescribeSecurityGroups",
                      "ecs:DescribeSnapshots",
                      "ecs:DescribeImages",
                      "ecs:DescribeDisks",
                      "ecs:DescribeCloudAssistantStatus",
                      "ecs:RunCommand",
                      "ecs:DescribeInvocations"
                  ],
                  "Resource": "*",
                  "Effect": "Allow"
              }
          ]
      }
    2. Choose Identities > Roles and click Create Role. For Select Trusted Entity, select Cloud Account. For Trusted Alibaba Cloud Account, select Other Alibaba Cloud Account, and enter the primary account ID of destination account B. Specify a role name, for example, ram-role-smc, and then click OK.

    3. Click the role name ram-role-smc. On the role details page, choose Permissions > Input and Attach. Select Custom Policy, select the policy-smc policy that you created, and then click OK.

  2. As a RAM user of destination account B, navigate to the SMC console - Cross-account/Same-account Migration page.

  3. On the Cross-account/Same-account Migration page, click Import Migration Source.

  4. Configure the parameters as prompted and copy the activation code command. The following table describes the parameters.

    Parameter

    Description

    Migration Source Type

    ECS Instance.

    Import Method

    Select Import through Console

    SMC remotely connects to the source server via Cloud Assistant to import the migration source. Do not interrupt or exit the import process.

    Whether to migrate across Alibaba Cloud accounts

    Cross-account.

    The Alibaba Cloud account to which the source server belongs

    Enter the ID of the source account (Account A in this example).

    The role of the account to which the source server belongs

    Enter the role that you created and authorized in Step 1. In this example, the role is ram-role-smc.

    Region

    From the drop-down list, select the region where the source server is located.

    Instance

    Search for and select the source ECS instance in the specified region by its ID, name, or IP address. You can select multiple instances to import them at once.

  5. After configuring the parameters, click Import.

    SMC automatically starts the Cloud Assistant agent to perform the import, which takes 3 to 10 minutes to complete.

  6. On the Cross-account/Same-account Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.

    • If the status is Migration Source Online, the import is successful.

      Note

      During a cross-account ECS instance migration, the public IP address of the source instance may not display, the OS details may be incomplete, or the instance status may not be recognized. This does not affect the migration.

    • If the import fails (indicated by any other status), troubleshoot the issue by using the following methods and then re-import the migration source.

      • Troubleshoot the issue by checking the error message on the console or by viewing the SMC client log files. The default installation directories of the SMC client are:

        • Windows servers: C:\smc.

        • Linux servers: /smc.

      • SMC FAQ and Troubleshoot errors.

Same-account
Important
  1. Navigate to the SMC console - Cross-account/Same-account Migration page.

  2. On the Cross-account/Same-account Migration page, click Import Migration Source.

  3. Configure the parameters as prompted and copy the activation code command. The following table describes the parameters.

    Parameter

    Description

    Migration Source Type

    ECS Instance.

    Import Method

    Select Import from Console.

    SMC remotely connects to the source server via Cloud Assistant to import the migration source. Do not interrupt or exit the import process.

    Whether to migrate across Alibaba Cloud accounts

    Same Account.

    Region

    From the drop-down list, select the region where the source server is located.

    Instance

    Search for and select the source ECS instance in the specified region by its ID, name, or IP address. You can select multiple instances to import them at once.

  4. After configuring the parameters, click Import.

    SMC automatically starts the Cloud Assistant agent to perform the import, which takes 3 to 10 minutes to complete.

  5. On the Cross-account/Same-account Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.

    • If the status is Migration Source Online, the import is successful.

      Note

      During a same-account ECS instance migration, the public IP address of the source instance may not be displayed, the operating system details may be incomplete, or the instance status may not be recognized. This is expected and does not affect the migration.

    • If the import fails (indicated by any other status), troubleshoot the issue by using the following methods and then re-import the migration source.

      • Troubleshoot the issue by checking the error message on the console or by viewing the SMC client log files. The default installation directories of the SMC client are:

        • Windows servers: C:\smc.

        • Linux servers: /smc.

      • SMC FAQ and Troubleshoot errors.

Import migration source via CLI (Recommended)

Important
  • The source server must have public network access. If the source server is behind a firewall, find the SMC domain names and ports in What are the SMC service domain names? and add them to the firewall's allowlist.

  • If your source server cannot access the public network or you want to use private network transfer for improved migration efficiency, refer to the private network transfer documentation.

  1. Generate the activation code command.

    1. Depending on the migration scenario, use the appropriate Alibaba Cloud account to navigate to the SMC console - Cross-account/Intra-account Migration page.

      • Intra-account migration: Log on to the SMC console with the Alibaba Cloud account that owns the source ECS instance.

      • Cross-account migration (migrate an ECS instance from source account A to destination account B): Log on to the SMC console with destination account B.

        Warning
        • In a cross-account migration scenario, make sure to distinguish between source account A and destination account B to avoid migrating in the wrong direction.

        • When you import a migration source, you must enter the activation code or AccessKey of destination account B.

    2. On the Cross-account/Same-account Migration page, click Import Migration Source.

    3. Configure the parameters as prompted and copy the activation code command. The following table describes the parameters.

      Parameter

      Description

      Migration Source Type

      ECS Instance.

      Import Method

      Select Use CLI to Import Server.

      Migration Source Quota

      The number of migration sources that can be activated by the activation code. Valid values: 1 to 1,000. Default value: 200.

      Validity Period

      The validity period of the activation code, in days. Valid values: 1 to 90. Default value: 90.

      Activation Code

      Generate the activation code and copy the command.

      1. Click Generate.

      2. Based on the operating system of the source server, click the Linux Shell or Windows PowerShell tab.

      3. Click Copy to copy the activation code command.

  2. Log on to the source server and run the copied command with administrator privileges to import it.

    Linux source server
    1. Log on to the Linux source server.

    2. Paste and run the copied command with administrator privileges to import the migration source.

      image.png

      If a message similar to Import Source Server [s-bp18x8751kgz2oyh****] Successfully! is displayed, it indicates a successful import.

    Windows source server
    1. Log on to the Windows source server.

    2. Open Windows PowerShell with administrator privileges.

    3. Paste and run the copied command to import the migration source.

      image.png

      If a message similar to Import Source Server [s-bp19rlidl3mwuptc****] Successfully! is displayed, it indicates a successful import.

      If the command fails to run, see What do I do if a command fails to run when I import a Windows migration source by using the command line?.
  3. On the Cross-account/Same-account Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.

    • A status of Online indicates that the migration source has been successfully imported.

      Note

      During a cross-account ECS instance migration, the public IP address of the migration source instance may not be displayed, the operating system information may be incomplete, or the instance status may not be recognized. This does not affect the migration.

    • If the status is anything other than Online, the import failed. In this case, you must troubleshoot the issue and import the migration source again.

      • You can identify and troubleshoot the issue by using the error message in the console or by viewing the SMC client logs. The default installation directories of the SMC client are:

        • Windows servers: C:\smc

        • Linux servers: /smc

      • SMC FAQ and Troubleshoot errors.

Import a migration source using the SMC client

Use the SMC client.

Important
  • The SMC client must run on the source server and uses public network access by default. If a firewall restricts traffic on the source server, obtain the SMC domain names and ports from What are the SMC service domain names? and add them to the firewall's allowlist.

  • If your source server cannot access the public network or you want to use a private network for faster migration, see Private network transfer.

  1. Depending on your migration scenario, use the appropriate Alibaba Cloud account to go to the SMC console - Cross-account/Same-account Migration page.

    • Same-account migration: Log on to the SMC console with the source ECS instance's Alibaba Cloud account.

    • Cross-account migration (from source account A to destination account B): Log on to the SMC console with destination account B.

      Warning
      • In a cross-account migration scenario, clearly distinguish between source account A and destination account B to prevent reverse migration.

      • When importing the migration source, you must enter the activation code or AccessKey for destination account B.

  2. On the Cross-account/Same-account Migration page, click Import Migration Source.

  3. On the Import Migration Source page, configure the following parameters.

    Parameter

    Description

    Migration Source Type

    ECS Instance.

    Import Method

    Use Client to Import Server.

    Description

    1. In the Description section, follow the prompts to download, install, and activate the SMC client that matches your source server's operating system (Linux or Windows) and architecture (32-bit or 64-bit).

    2. Click Generate and copy the activation code.

      You will need this code when you install the client.
  4. Import the migration source.

    Important

    Keep the SMC client open throughout the migration. Closing the client will disconnect the migration source from the SMC console and cause the migration to fail.

    Windows source server

    1. Use a remote connection tool that supports file transfer, such as WinSCP, to upload the SMC client to the Windows source server.

    2. On the Windows source server, use the built-in decompression tool or a third-party tool to decompress the SMC client package.

    3. In the SMC client folder for your source server's architecture, double-click the go2aliyun_client.exe application.

      When you run the application, you are prompted for administrator permissions. Click OK.
    4. Obtain an activation code or AccessKey.

      • (Recommended) Obtain an activation code: In the Description section of the SMC console, click Generate and copy the activation code.

      • Obtain an AccessKey: An AccessKey for an Alibaba Cloud account includes an AccessKey ID and an AccessKey secret. If you have not created an AccessKey, create one first.

    5. As prompted, enter the values for access_access_token_id and access_token_code, and press Enter.

      A message similar to Import Source Server [s-bp18x8751kgz2oyh****] Successfully! indicates that the migration source was imported successfully.

    Linux source server

    1. Use a remote connection tool that supports file transfer, such as WinSCP, to upload the SMC client to the Linux source server.

    2. Remotely connect to the Linux source server and decompress the SMC client package.

      This example uses the Linux 64-bit Universal version. If you use a different version of the SMC client, replace the package name in the command with its actual filename.

      tar -zxvf go2aliyun_client.tar.gz
      Note

      The Linux 64-bit ARM version supports the g6r general-purpose and c6r compute-optimized instance families. Enterprise-level ARM-based compute instance families.

    3. (Optional) Filter and exclude files or directories that you do not want to migrate.

    4. Obtain an activation code or AccessKey.

      • (Recommended) Obtain an activation code: In the Description section of the SMC console, click Generate and copy the activation code.

      • Obtain an AccessKey: An AccessKey for an Alibaba Cloud account includes an AccessKey ID and an AccessKey secret. If you have not created an AccessKey, create one first.

    5. In the SMC client folder, run the following commands to start the SMC client.

      cd go2aliyun_client_linux_x86_64
      sudo chmod +x go2aliyun_client
      sudo ./go2aliyun_client
    6. As prompted, enter the activation code or AccessKey. This example uses an activation code:adad

      After you enter the activation code or AccessKey, the following prompts may appear:

      • If the snapshot driver is not installed on the source system, the SMC client displays a prompt.

        To shrink disks during a Linux server migration, you must disable block replication. In this case, enter no.

        Important

        If the snapshot driver fails to install, you must disable block replication when you create the migration task to prevent the migration from failing.

        123

      • Most mainstream source systems have rsync installed by default. If rsync is not installed, the SMC client prompts you to install it. Enter yes to confirm.Install rsync

      • If SELinux is enabled on the source system, the SMC client prompts you to disable it. Enter yes to confirm.Disable SELinux

      A message similar to Import Source Server [s-bp11npxndknsycqj****] Successfully! indicates that the migration source was imported successfully.

      Note

      If the migration source fails to import, use the error message to troubleshoot. Run the following commands in sequence to stop and restart the import. SMC FAQ and Troubleshooting.

      sudo ./go2aliyun_client --abort
      sudo ./go2aliyun_client
  5. On the Cross-account/Same-account Migration page of the SMC console, check the status of the migration source in the Real-time Migration Status column.

    • A status of Migration Source Online indicates a successful import.

    • If the status is any other value, the import has failed. You must resolve the issue before re-importing the source.

      • Troubleshoot the issue based on the error message in the console or by checking the SMC client log files. The default installation directories of the SMC client are:

        • Windows source server: C:\smc.

        • Linux source server: /smc.

      • SMC FAQ and Troubleshooting.

Step 2: Configure migration

  1. In the Actions column of the migration source that you want to manage, click Start Migration.

  2. Configure the parameters and click Start Migration.

    1. Configure basic parameters.

      Parameter

      Description

      Destination Type (Required)

      Select a destination type based on your migration scenario:

      ECS Image

      Converts the source server into a custom image. You can then use this custom image to create an ECS instance and complete the migration.

      The following parameters are available:

      • Destination Region: The Alibaba Cloud region where the custom image will be created. This parameter is required. Regions and zones.

      • Image name prefix: The prefix of the custom image name that SMC generates for the migration source.

      ECS Instance

      Migrates the source server to an existing ECS instance. The source server's storage, operating system, and other configurations must be compatible with the destination instance.

      Important

      When you migrate to a destination instance, SMC first replaces the operating system of the destination instance. Automatic snapshots of the system disk are deleted and cannot be restored. To retain automatic snapshots, disable their release with the disk before migration. Configure automatic snapshots to be released with disks.

      The following parameters are available:

      • Destination Region: The Alibaba Cloud region where the destination ECS instance is located. This parameter is required. Regions and zones.

      • Destination Instance: Select an ECS instance to be the destination.

      Migration Test

      The migration drill feature assesses the job's feasibility and risks before you start. It provides data volume, migration speed, and total time estimates, and suggests fixes to reduce potential migration issues. You are charged for pay-as-you-go resources used during the migration drill. By default, Migration Test is enabled.

      Warning

      If the target type is an ECS Instance, a migration drill creates snapshots of all disks on the target ECS instance. The snapshots are automatically rolled back after the drill is complete if an exception occurs during the drill or if the execution mode is set to Test Only. The target ECS instance is unavailable during the migration drill, and its data will be lost. Ensure that the target ECS instance does not contain important data.

      Configure a migration drill.

      Execution Method

      Select an execution method based on whether Migration Test is enabled:

      With migration test

      • Test Only: Creates only a migration drill job. After the drill is complete, you must manually start the server migration job if you want to migrate the server.

      • Test and Migrate: After the migration drill is complete, the system automatically starts the server migration job if no drill items have a status of Critical. By default, Test and Migrate is selected.

      Without migration test

      • Migrate Now: Starts the migration immediately after you create the migration job. By default, Migrate Now is selected.

      • Migrate Later: Schedules the migration job to start automatically at a specified time.

        Note

        The earliest you can schedule the job is 10 minutes from the current time.

      • Create Only: Creates the migration job but does not start it. You must manually start it later by clicking Start Migration Job in the Actions column.

      Automatic Incremental Synchronization

      Enables automatic, incremental data synchronization from the source server to Alibaba Cloud. By default, this feature is disabled.

      • If you enable this switch, you must configure the following parameters:

        • Synchronization Interval: The interval at which the incremental migration job automatically runs.

        • Maximum Reserved Images: The maximum number of images that the incremental migration job retains.

        The migration job runs periodically to synchronize incremental data to Alibaba Cloud. Incremental server migration.

      • If you disable this switch, the migration job runs only once.

      Enable a migration template

      This parameter appears only when Destination Type is set to ECS Image.

      A migration template presets parameters for a migration job. When you start the migration, the template parameters are automatically filled in. Set up a migration template.

      Network Type

      Select the network for transferring migration data to the intermediate instance. By default, data is transferred over the public network. The intermediate instance is created in the selected Virtual Private Cloud (VPC) and vSwitch and is assigned a public IP address.

      Public Network (Default)

      Migration data is transferred to the intermediate instance over the public network. This mode requires the source server to have public internet access. You can choose whether to specify a Virtual Private Cloud (VPC) and vSwitch.

      • Specify a VPC and vSwitch: The migration job creates an intermediate instance in the VPC and vSwitch that you specify.

      • Do not specify a VPC and vSwitch: The migration job creates an intermediate instance in a new VPC and vSwitch that are automatically created by the system.

      VPC

      Migration data is transferred to the intermediate instance over a private connection within a VPC. This mode requires you to connect the source server to the Alibaba Cloud VPC and specify a VPC and vSwitch.

      Note

      If you can directly access a VPC in an Alibaba Cloud region from an on-premises data center (IDC), virtual machine (VM) environment, or cloud host, we recommend that you use this method. Private network transfer is faster and more stable than public network transfer, improving migration efficiency. You can connect the source server to the cloud VPC by using a VPN gateway, an Express Connect circuit, or a Smart Access Gateway. For more information, see Connect a VPC to a data center or another cloud.

      The private IPv4 address of the destination instance

      If you need to change the private IP address of the destination instance, you can manually specify a private IP address. This parameter appears only when Destination Type is set to ECS Instance.

      • Remain unchanged.: The private IP address of the Destination Instance remains unchanged.

      • Manual: Allows you to enter an IP address from the available CIDR block of the vSwitch to which the Destination Instance belongs. If the source IP address is within the vSwitch's CIDR block, you can change the destination instance's IP address to match the source IP address.

        • If the destination instance and the migration source are in the same CIDR block, enter the private IP address of the migration source.

        • If the destination instance and the migration source are in different CIDR blocks, you must first change the VPC of the destination instance to match the CIDR block of the migration source, and then enter the private IP address of the migration source.

    2. You can also adjust the disk partition structure. Parameters are described in the following table.

      Parameter

      Description

      Modify Disk Partition

      Select whether to adjust the disk partition structure based on your requirements. Only SMC client versions 2.8.0 and later support this feature. SMC Client User Guide.

      • Disabled: The disk information of the source instance is not shown. SMC automatically reads the source disk information and generates a disk layout. After migration, the destination disk partition structure matches the automatically generated layout by default.

      • Enabled: The disk information of the source instance is displayed. SMC automatically reads the source disk information to generate a disk layout. You can adjust the destination disk partition structure, including the partition size and order, transfer method, and whether to enable LVM.

        The disk partition parameters are as follows:

        Configure disks

        • System Disk: The size of the destination system disk, in GiB. Valid values: 20 to 2,048.

          The destination system disk size must exceed the used space on the source system disk. For example, if the source system disk is 400 GiB and 100 GiB of space is used, the destination system disk size must be greater than 100 GiB.

          Note

          The default value is the size of the source system disk. Unless you need to reduce the system disk size, we recommend that you do not specify a value smaller than the default.

        • Data Disk<N>: The size of the destination data disk after migration, in GiB. Valid values: 1 to 32,768.

          • The <N> variable represents the data disk number. If you are migrating to a destination instance, N is the data disk ID.

          • The destination data disk size must exceed the used space on the source data disk. For example, if the source data disk is 500 GiB and 100 GiB of space is used, the destination data disk size must be greater than 100 GiB.

          • If a Data Disk has no mount target, or if all its mount targets are set to not be migrated, the data disk is not migrated.

        • LVM: Logical Volume Manager (LVM) is a disk partition management system for Linux. LVM offers more flexibility than standard disk partitions and allows for dynamic resizing of disk space.

          You can enable LVM based on your requirements. If enabled, the destination disk is automatically rebuilt with an LVM structure.

          Example:

          For each destination disk with LVM enabled, the system creates one physical volume (PV) and its corresponding volume group (VG). Within this VG, it creates one logical volume (LV) for each mount target. The VG is named vgX by default (where X is the disk sequence number), and the LVs are named lvX by default (where X is the LV sequence number), as shown in the following example:

          image

          Important

          LVM cannot be enabled in the following cases:

          • The source server runs Windows.

          • The system disk does not have a boot partition.

          If you enable LVM, the feature does not take effect in the following scenarios:

          • The source server does not support lvm2, or the lvm2 package is not installed.

          • The source server runs a Debian system with a kernel version of 3.x or earlier and has a disk with an XFS file system mounted.

        Configure mount targets

        • Migrate: Specifies whether to migrate the mount target based on your business requirements.

        • Enable Block Replication: This option is visible only for SMC client versions before 3.2.0. Block replication improves the stability of the transfer speed and ensures that the destination partition structure is identical to the source, but you cannot modify the partition size. SMC determines whether to support block replication based on the status of the source disk partitions.

          • If the source partition does not support Block Replication, this option cannot be enabled. File-level replication is used by default, which allows the partition size to be modified.

          • If the source partition supports Block Replication, this option is enabled by default to perform a partition-level disk migration.

          Note
          • If the source server runs a Windows operating system, block replication is enabled by default and cannot be disabled.

          • If LVM is enabled for the disk and the partition size is not a multiple of 4 MiB, block replication does not take effect. File-level replication is used instead.

        • Set Partition Size: If block replication is disabled, you can set the partition size. The sum of partition sizes cannot exceed the total size of the disk.

          • Windows operating systems: You cannot adjust the partition size.

          • Linux operating systems: You can set the partition size based on your requirements, but the sum of partition sizes cannot exceed the disk size.

            For SMC client versions earlier than 3.2.0, ensure that block replication is disabled.
        Note

        If the disk sizes of the destination instance do not match the source disks, you cannot create the job. In this case, the system automatically adjusts the mount target locations to meet the disk size requirements. If the requirements are still not met after the adjustment, resolve the issue as prompted on the UI.

        You can also manually drag and drop mount targets to meet the disk size requirements. However, you cannot move boot or system partitions. To do this, perform the following steps:

        1. Hover the pointer over the image icon next to the mount target.

        2. Drag the mount target to another disk.

    3. (Optional) To configure parameters such as network mode, private IP address, or transfer throttling, click Advanced Settings. Parameters are described in the following table.

      Note

      We recommend that you set Network Type to VPC. Data transfer over a VPC provides faster and more stable data transmission than over the public network, which improves migration efficiency.

      Parameter

      Description

      Migration Job Name

      The name of the migration task.

      Job Description

      Enter a description for the migration task.

      Transmission Speed Limit

      Limits the data transfer speed, in Mbit/s. If Compression Ratio is set to a value greater than 0, the actual network transfer speed for the compressed data is lower than the speed displayed in Real-time Migration Status.

      Compression Ratio

      Sets the data compression level for migration.

      • In environments with limited bandwidth, a higher compression ratio can increase data transfer speed.

      • In environments with high bandwidth, we recommend that you do not compress data to reduce CPU usage on the source server.

      Valid values: 0 to 10. The default value is 7. A value of 0 indicates that data is not compressed.

      Checksum Verification

      This feature is disabled by default. Enabling it enhances data consistency checks but may decrease transfer speed.

      SSL Encrypted Transmission

      The default value is Auto-Select. SSL encryption for data transfer improves security and data integrity.

      License Type

      Select a license type.

      • Alibaba Cloud (Default): Only Microsoft Windows Server licenses are supported. After migration, you are charged a license fee when you create an ECS instance from the image in the China (Hong Kong) region or other regions outside the Chinese mainland. The instance is automatically activated. The actual fee is displayed when you create the instance.

      • BYOL: BYOL is supported for operating systems such as Microsoft Windows, Red Hat Enterprise Linux, and SUSE Linux Enterprise Server. After migration, no license fee is charged when you create an ECS instance from the image. You must activate the instance by using your own license.

        Note

        If you have an existing ECS instance, you can purchase software licenses, such as for Red Hat Enterprise Linux and SUSE Linux Enterprise Server, for the instance. Purchase software licenses for an ECS instance.

      Image Check

      The image check feature verifies whether an image is valid and can be used to create a fully functional ECS instance. You can use this feature when you create server migration and agentless VMware migration jobs.

      The image check feature helps you quickly identify potential issues with the image or instance after migration and provides solutions to ensure compliance with Alibaba Cloud standards, which increases the instance startup success rate.

      Configure an image check.

      Tag

      Add tags (key-value pairs) to the migration job for easier searching and management. Use tags to manage migration sources and jobs. Implement fine-grained permission management by using tags.

      Note

      You can add a maximum of 20 tags to a single migration job.

      Intermediate Instance Type

      Select an instance type for the intermediate instance based on your requirements. This parameter appears only when Destination Type is set to ECS Image.

      • If you specify this parameter, the system uses the selected instance type to create the intermediate instance. If the specified instance type is out of stock, the migration job fails to be created.

      • If you do not specify an instance type, the system attempts to create the intermediate instance by using a default sequence of instance types.

      Important

      To prevent migration errors, do not stop, start, restart, or release the intermediate instance during the migration. After the migration is complete, the instance is automatically released.

      Report diagnostic logs

      Automatically uploads SMC client logs to the SMC server for diagnostic analysis. This helps troubleshoot issues if a migration error occurs. This feature is enabled by default.

      SMC client logs are typically stored in the /smc/go2aliyun_client*/Logs directory within the installation path.

  3. In the dialog box that appears, read the notes and click Got It.

  4. On the Cross-account/Same-account Migration page, view the real-time migration status.

    If you enabled migration rehearsal, SMC performs the rehearsal first. Data transfer duration depends on factors such as data volume and network bandwidth. Wait for the migration task to complete.

    image

    Note
    • Speed: The amount of migration data transferred per second before compression. If the Compression Ratio is set to a value greater than 0, the displayed speed exceeds the actual network transfer speed because data is compressed during transfer.

    • Remaining sync time: Remaining sync time = (Total data volume - Transferred data volume) / Speed.

    • If the transfer speed is too low, temporarily increase the fixed bandwidth of the source and destination servers. Estimate migration time and test transfer speed.

    Subscribe to migration error events, modify a migration, or pause a migration

    • To prevent the migration process from being blocked by task errors, you can subscribe to SMC migration task error event notifications in CloudMonitor to receive timely email notifications.

    • While the migration task is in the Synchronizing state, you can perform the following operations on the task based on your business requirements:

      • Edit a migration task: In the Actions column, click Modify Migration Job to change parameters such as bandwidth throttling, compression ratio, and checksum verification.

      • To pause a migration task, click Pause Migration Job in the Actions column.

  5. (Optional) View migration details.

    To view details, click a migration source ID in the Migration Source ID/Name column.

Verify the migration result

  • A Real-time Migration Status of Finished indicates a successful migration.

    • If you set Destination Type to ECS Image:

      After a successful migration, Alibaba Cloud creates a custom image. You can scroll to the right and click View Report in the Migration Deliverables column to view image detection results. View image detection results.

      image

      Manual verification (Recommended)

      In the Actions column, click Create Instance. You are redirected to the instance creation page in the ECS console, where the custom image is preselected. For more information about how to create an ECS instance, see Create an instance from a custom image or shared image.

      image

      Automatic verification

      Note

      To use this feature, the instance must have Cloud Assistant installed, and its operating system must support the agent. For more information, see Install Cloud Assistant Agent.

      This feature uses the OOS template ACS-SMC-CreateAndVerifyInstance provided by Alibaba Cloud to automatically verify that the image generated by the migration job can be used to successfully create and start an ECS instance.

      1. In the Actions column, click Verify Migration Result.

        image

      2. In the dialog box that appears, review the verification process and click Verify Now.

        You can also click Customize Verification Parameters to manually configure verification parameters.

      3. In the Verify Migration Result column, view the verification result.

        • Verified: The migration was successful. You can click View Report to view the verification results.

        • Not Verified: The verification failed. You can click View Cause to view the error details and troubleshoot the issue.

        You can also click the ... icon in the Actions column and then click View Verification Records in OOS Console to view the execution history of the OOS template.

    • If you set Destination Type to ECS Instance, you can click View Destination Instance in the Actions column to view the destination ECS instance.

    After the server is migrated, perform the following steps to ensure that your services run correctly:

  • If Error is displayed in the Real-time Migration Status column, the migration failed.

    In this case, you need to perform the following operations:

    1. Click Troubleshoot Errors in the Actions column and fix the failure based on the error code and error message. For more information, see FAQ and Errors occurred during a server migration.

    2. In the migration source list, click Retry Migration Job.

      The migration job resumes from the point where it was suspended.

      Important

      If the intermediate instance is released, you must create another migration job. For more information, see the I accidentally released the intermediate instance. What should I do? section of the "FAQ" topic.

  • If the Real-time Migration Status is InError, the migration job 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.

      Important

      If the intermediate instance has been released, start the migration again. What do I do if I accidentally release the intermediate instance?.

Clean up resources

Migrate to an image

During the migration, SMC creates a temporary pay-as-you-go intermediate instance named No_Delete_SMC_Transition_Instance in your destination Alibaba Cloud account to facilitate the migration. The migration result determines whether you need to manually release the instance:

  • Successful migration: SMC automatically releases the intermediate instance. No manual cleanup is required.

  • Migration error: The intermediate instance is not released and continues to incur charges. To avoid unnecessary charges, you can release the instance in one of the following ways:

    • If you no longer need the migration task, click the migration source ID. In the Actions column for the migration task, click Cancel Migration Job to delete the migration task and automatically clean up the intermediate instance.

    • Manually release the intermediate instance.

Migrate to a destination instance

During the migration, SMC creates a temporary pay-as-you-go intermediate disk named SMC_Temp_Disk and attaches it to the destination instance to facilitate the migration. The migration result determines whether you need to manually release the intermediate disk:

  • Successful migration: SMC automatically releases the intermediate disk. No manual cleanup is required.

  • Migration error: The intermediate disk is not released and continues to incur charges. To avoid unnecessary charges, you can release the disk in one of the following ways:

    • If you no longer need the migration task, click the migration source ID. In the Actions column for the migration task, click Cancel Migration Job to delete the migration task and automatically clean up the intermediate disk.

    • Manually release the intermediate disk.

References

  • To migrate incremental data repeatedly, run incremental migrations at custom intervals after the initial full migration is complete. This process synchronizes incremental data from the source server to Alibaba Cloud, reducing business downtime and the final cutover time. For more information, see Incremental server migration.

  • FAQ. Troubleshooting.