All Products
Search
Document Center

Server Migration Center:Migrate ECS instances across accounts from the console

Last Updated:Jun 24, 2026

Server Migration Center (SMC) supports cross-account ECS instance migration across availability zones and regions. Migrate instances from other accounts into your current account as new ECS instances or images, with incremental transfer and zero source-instance downtime.

Prerequisites

Preparation

  • Cross-account console migration requires a RAM user to import the migration source. Log on to the destination's main account and grant the following permissions to the RAM user:

    If the main account does not have a RAM user, create one.
    • The AliyunSTSAssumeRoleAccess permission for calling STS.

    • The AliyunSMCFullAccess permission for managing SMC.

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

    • The AliyunECSAssistantFullAccess permission for managing Cloud Assistant.

    Example: Grant the AliyunSTSAssumeRoleAccess permission.

    1. Log on to the RAM console with the destination's main account.

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

    3. Choose Permissions > Grant Permission.

    4. On the Add Authorization page, enter AliyunSTSAssumeRoleAccess, select the policy, and then click OK.image

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

    1. Log on to the Alibaba Cloud console with the source and destination accounts separately.

    2. Hover over the user icon in the upper-right corner to view the account ID.image

Step 1: Grant source account permissions

Log on to the RAM Console with the source account (must have RAM administrative permissions). Create a role and grant it permissions.

  1. Create a policy

    1. In the navigation pane on the left, choose Permissions > Policies, then click Create Policy.image

    2. Click the JSON Editor tab, replace the existing content with the following policy, then click OK.

      {
          "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"
              }
          ]
      }
    3. In the Create Policy dialog box, enter policy-smc for the policy name, then click OK.image

  2. Create a role

    1. In the navigation pane on the left, choose Identities > Roles, then click Create Role.image

    2. For Trusted Entity Type, select Cloud Account. For Trusted Entity, select Other Account. In the text box, enter the Alibaba Cloud account ID of the destination account.image

    3. Click OK. Enter a role name, such as ram-role-smc.image

  3. Grant permissions to the role

    1. On the Roles page, click the name of the role you created to open its details page.image

    2. Click the Permissions tab, then click Precise Permission.image

    3. In the Grant Permission panel, select Custom Policy, search for and select the policy-smc policy, then click OK.image

Step 2: Import the migration source

  1. Log on to the SMC console as a RAM user of the target account. In the left-side navigation pane, choose Cross-account/Same-account Migration.

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

  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 through Console.

    Cloud Assistant remotely connects to the source server to import the migration source. Do not interrupt this process.

    Cross-Account

    Cross-account.

    The Alibaba Cloud account to which the source server belongs

    Enter the ID of the source server's Alibaba Cloud account.

    Source Account RAM Role

    Enter the role name created in Step 1, for example, ram-role-smc.

    Region

    Select the region of the source server.

    Instance

    Search by instance ID, name, or IP address and select the ECS instances to migrate. You can select multiple instances for batch import.

  4. After you configure the parameters, click Import.

    SMC uses Cloud Assistant to import the migration source. This takes 3 to 10 minutes.

  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 cross-account ECS migration, the source instance's public IP, full OS name, or instance status may not display. This is expected and does not affect migration.

    • Any other status indicates a failed import. Troubleshoot using the following solutions, then retry.

      • Check the error message in the console or SMC client logs. Default installation directories:

        • Windows servers: C:\smc.

        • Linux servers: /smc.

      • Common issues and solutions: SMC FAQ and Troubleshooting.

Step 3: Configure migration for the target account

  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. (Conditionally required) To configure parameters like network mode, private IP address, or transfer speed limit, click Advanced Settings.

      Note

      We recommend that you set Network Type to VPC. This method provides faster, more stable data transmission than public network transfer and 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 the migration drill, SMC runs the drill first. Data transfer duration depends on data volume and network bandwidth. Wait for the task to complete.

    image

    Note
    • Speed: Uncompressed data transferred per second. If Compression Ratio is greater than 0, the displayed speed exceeds the actual network transfer speed.

    • Remaining Sync Time: Remaining Sync Time = (Total Data Volume - Transferred Data Volume) / Speed.

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

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

    • Subscribe to SMC migration task error events in CloudMonitor to receive email alerts on migration failures.

    • While the migration task is in the Synchronizing state, you can:

      • To edit the migration task, click Modify Migration Job in the Actions column. You can change parameters such as Transfer Speed Limit, Compression Level, and Checksum Verification.

      • To pause the 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

  • The migration is successful when the Real-time Migration Status is Finished.

    • 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.