Server Migration Center (SMC) allows you to migrate servers that run various versions of Windows or Linux operating systems to Alibaba Cloud. Servers can be deployed in data centers, on-premises virtual machines (VMs), or on other cloud platforms. This topic describes the preparations and procedure of migrating servers to Alibaba Cloud by using SMC.

Background information

SMC allows you to migrate data from servers in data centers, on-premises VMs, and third-party cloud platforms to Alibaba Cloud. Supported VMs include VMware, Xen, KVM, and Hyper-V. Third-party cloud platforms can be Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), HUAWEI CLOUD, and Tencent Cloud. Before you migrate a server, complete the following preparations on the server based on its operating system: After you complete the preparations, you can start the migration. For more information, see Migrate a server to Alibaba Cloud.

In addition, you can use SMC to migrate data between Alibaba Cloud Elastic Compute Service (ECS) instances. For more information, see Migrate data between Alibaba Cloud VMs.

Prepare for the migration of a Windows-based server to Alibaba Cloud

Before you migrate a Windows-based server, perform the following operations on the server:
  • Create snapshots to back up data.
  • Make sure that the system time of the server is the same as the standard time of the region where the server resides.
  • Make sure that the server has access to the following URLs and ports:
    • SMC endpoint: https://smc.aliyuncs.com:443.
    • Ports 8080 and 8703 that are required to connect to the intermediate instance during the migration process.
      Note During the migration, SMC creates, starts, stops, and releases the intermediate instance No_Delete_SMC_Transition_Instance. The default security group of the intermediate instance allows access to ports 8080 and 8703. Both ports are the migration service ports of the intermediate instance.
  • Make sure that the Volume Shadow Copy Service (VSS) is enabled.
  • Check whether the QEMU Guest Agent is installed. If the QEMU Guest Agent is installed, you must uninstall it. For more information, see What can I do if Windows server migration stops in the "Prepare For Rsync Disk 0" stage?
  • Check the validity of your application licenses. After you migrate the server to Alibaba Cloud, the application licenses that are associated with the underlying hardware may become invalid.
  • Perform a more detailed check on the server based on its type.
    • If you migrate data from a physical server, check its virtualized applications. Elastic Compute Service (ECS) instances of Alibaba Cloud do not support built-in virtualized applications. After the migration, software such as VMware Workstation Pro, VirtualBox, and Hyper-V is not supported because such software can be used only on a physical server.
    • If you migrate a server from AWS, Azure, or GCP, you need to check the network environment.
      • For information about how to perform migration across regions outside mainland China, see Migrate a server to Alibaba Cloud across regions outside mainland China.
      • If a virtual private cloud (VPC) is available, we recommend that you perform migration over the VPC. Compared with migration over the Internet, migration over a VPC is more efficient and stable.
    • If you migrate data from a HUAWEI CLOUD Windows Elastic Cloud Server (ECS), check whether the QEMU Guest Agent VSS Provider service is installed.

      If the QEMU Guest Agent VSS Provider service is installed, find the uninstall.bat script in the C:\Program Files (x86)\virtio\monitor directory and run the script to uninstall the service.

Prepare for the migration of a Linux-based server to Alibaba Cloud

Before you migrate a Linux-based server, perform the following operations on the server:
  • Create snapshots to back up data.
  • Make sure that the system time of the server is the same as the standard time of the region where the server resides.
  • Make sure that the server has access to the following URLs and ports:
    • SMC endpoint: https://smc.aliyuncs.com:443.
    • Ports 8080 and 8703 that are required to connect to the intermediate instance during the migration process.
      Note During the migration, SMC creates, starts, stops, and releases the intermediate instance No_Delete_SMC_Transition_Instance. The default security group of the intermediate instance allows access to ports 8080 and 8703. Both ports are the migration service ports of the intermediate instance.
  • Check Security-Enhanced Linux (SELinux). You need to check whether SELinux is disabled on the Community Enterprise Operating System (CentOS) and Red Hat operating systems. If SELinux is enabled, you can disable it by using one of the following methods:
    • Run the setenforce 0 command to disable SELinux temporarily.
    • Modify the /etc/selinux/config file to set SELINUX to disabled to disable SELinux permanently. For more information, see Enable or disable SELinux.
  • Check the version of GRand Unified Bootloader (GRUB). You must use GRUB V2.02 or later for earlier versions of operating systems such as CentOS 5, Red Hat 5, Debian 7, Amazon Linux, and Oracle Linux. For more information, see Install GRUB on a Linux server.
  • Check the validity of your application licenses. After you migrate the server to Alibaba Cloud, the application licenses that are associated with the underlying hardware may become invalid.
  • Perform a more detailed check on the server based on its type.
    • If you migrate data from a physical server, check its virtualized applications. Elastic Compute Service (ECS) instances of Alibaba Cloud do not support built-in virtualized applications. After the migration, software such as VMware Workstation Pro, VirtualBox, and Hyper-V is not supported because such software can be used only on a physical server.
    • If you migrate a server from AWS, Azure, or GCP, you need to check the network environment.
    • If you migrate data from an Amazon EC2 Linux instance, check cloud-init configurations.

      Cloud-init is developed to initialize cloud instances across platforms. However, the cloud-init service configurations of AWS and Alibaba Cloud are not cross-compatible. Instances that are migrated from AWS to Alibaba Cloud may fail to start and the network may fail to connect. We recommend that you use the cloud-init configurations of Alibaba Cloud on the Amazon EC2 instance. For more information, see Install cloud-init. You can also uninstall cloud-init from the Amazon EC2 instance.

    • If you migrate data from a Linux-based Google Cloud VM, make sure that cloud-init is installed. For more information, see Install cloud-init.
    • If you migrate data from a HUAWEI CLOUD Linux ECS, make sure that rsync is installed. For more information, see How do I install Rsync?
    • If you migrate data from a Linux-based UCloud VM, check whether the Linux kernel is customized by UCloud.

      If the Linux kernel is customized by UCloud, the Linux instance may fail to be started or stopped in the ECS console after the migration. This is because some Linux kernels are incompatible with Alibaba Cloud. You can change the Linux kernel. For example, if your server runs CentOS, you can click here to change the kernel to an official one. For technical support, see Contact us.

Migrate a server to Alibaba Cloud across regions outside mainland China

To migrate an Amazon EC2 instance, Azure VM, or Google Cloud VM to Alibaba Cloud and create ECS instances based on a custom image, perform the following steps:

  1. Migrate a server to Alibaba Cloud across regions outside mainland China. Select ECS Image as the destination image type. For more information, see Migrate a server to Alibaba Cloud.
    If an AWS EC2 instance resides in the United States, you can migrate the instance to an Alibaba Cloud region in the United States. For information about regions and region IDs, see Regions and zones.
  2. After the migration is complete, copy the custom image to the destination Alibaba Cloud region. For more information, see Copy custom images.
  3. Create ECS instances by using the custom image. For more information, see Create an ECS instance by using a custom image.
    By default, root logon by using Secure Shell (SSH) is disabled in Amazon EC2 Linux instances. You can log on to Alibaba Cloud ECS instances by using an AWS account and SSH key.

Migrate a server to Alibaba Cloud

Before you start the migration, create an Alibaba Cloud account. For more information, see Before you begin.

  1. Download and decompress the SMC client package.
    1. Download the SMC client package.
      If the migration source has access to the Internet, you can also download the SMC client package to the migration source.
      Note You can log on to the SMC console. In the upper-right corner of the page, click Download Latest SMC Client to download the latest version of the SMC client.
    2. Upload the SMC client package to the migration source.
    3. Decompress the SMC client package.
      The SMC client is available for different operating systems and architectures. Select an SMC client version that is compatible with the migration source.
      The following figure shows the decompressed client folders for Windows.
      Note For Linux systems, run the unzip <name of the SMC client package> command to decompress the SMC client package. Make sure that the unzip utility is installed on the source server. For example, you can run the yum -y install unzip command to install the unzip utility in CentOS 7.
      553
      Table 1. SMC client packages
      Client package Architecture Operating system Bits Supported destination image types
      go2aliyun_client2.5.8_linux_arm64.zip ARM Linux 64
      • ECS image
      • ECS instance
      go2aliyun_client2.5.8_linux_i386.zip x86 Linux 32
      • ECS image
      • ECS instance
      • Container image
      go2aliyun_client2.5.8_linux_x86_64.zip x86 Linux 64
      go2aliyun_client2.5.8_windows_i386.zip x86 Windows 32
      • ECS image
      • ECS instance
      go2aliyun_client2.5.8_windows_x86_64.zip x86 Windows 64
      Note
      • The version number 2.5.8 in the name of the client package is for reference only. The actual version number shall prevail.
      • SMC allows you to migrate Linux servers of the ARM64 architecture to ECS instances of the g6r or c6r instance family. For more information, see Instance families.
    4. Decompress the client package that is compatible with the operating system of your source server.
      The following figure shows the directories and files in the decompressed folder. Home directory of the client
      Table 2. SMC client folders and files
      Folder or file Description
      go2aliyun_client.exe The Windows CLI executable file.
      go2aliyun_gui.exe The Windows GUI executable file. For more information about the GUI version, see Use the Windows GUI version of an SMC client.
      go2aliyun_client The Linux CLI executable file.
      user_config.json The configuration file of the migration source and destination.
      Excludes The folder in which to add directories to exclude from migration.
      client_data The migration data file. This includes the intermediate instance information and migration progress.
  2. Optional:Optional. Exclude files or directories from migration. If you do not need some files or directories after migration, you can exclude them from migration. For more information, see How do I exclude files or directories from a migration task?.
    Note If you enable the block replication feature, you cannot exclude files or directories from migration.
  3. Run the SMC client to import the migration source information.
    1. Enter the SMC client folder and run the SMC client.
      • For Windows servers, use one of the following methods to run the SMC client:
        • To run the Windows GUI version, double-click the go2aliyun_gui.exe file.
        • To run the Windows CLI version, double-click the go2aliyun_client.exe file.
        Note When you run the program, you must click OK to confirm that you have the administrator privilege.
      • For Linux servers, run the SMC client as a root or sudo user.
        • In the directory of the go2aliyun_client file, run the following commands as the root user:
          chmod +x go2aliyun_client
          ./go2aliyun_client
        • In the directory of the go2aliyun_client file, run the following commands with the sudo permission:
          sudo chmod +x ./go2aliyun_client
          sudo ./go2aliyun_client
        If you have required permissions on the migration source system, you can also run the following commands to import the migration source information. In this case, you do not need to enter your AccessKey pair.
        Note An AccessKey pair of an Alibaba Cloud account includes an AccessKey ID and AccessKey secret. If you have not created an AccessKey pair, create one first. For more information, see Create an AccessKey pair.
        • Run the following command as a root user:
          ./go2aliyun_client --accessid=<AccessKey ID> --secretkey=<AccessKey Secret>
        • Run the following command as a sudo user:
          sudo ./go2aliyun_client --accessid=<AccessKey ID> --secretkey=<AccessKey Secret>
    2. Enter the AccessKey pair of your Alibaba Cloud account.
      Note If the AccessKey pair you entered is invalid, open the user_config.json file, delete the access_id and secret_key values, and then run the client again.
      • For Windows servers
        • If you use the Windows GUI version, enter the AccessKey ID in the Access Id field, enter the AccessKey secret in the Secret Key field, and then click Start. For more information, see Use the Windows GUI version of an SMC client.
        • If you use the Windows CLI version, enter the AccessKey ID and AccessKey secret, and then press Enter.
      • For Linux servers
        Enter the AccessKey ID and AccessKey secret, and then press Enter. Enter the AccessKey pair
        The following prompts may appear:
        • If no snapshot dependency is installed on your source server, the following prompt appears, as shown in the following figure. Decide whether to install one based on whether you need to enable block replication.
          • If you need to enable block replication for the migration, enter yes to automatically install a snapshot dependency.
          • If you do not need to enable block replication for the migration, enter no.
          Note If the snapshot dependency fails to be installed, do not enable block replication when you create a migration task. Otherwise, the migration may fail.
          123
        • The rsync tool is installed in most mainstream migration sources. If rsync is not installed on the migration source, the SMC client displays a prompt. Enter yes to install rsync, as shown in the following figure. Install rsync
        • If SELinux is enabled on the migration source, you are prompted to disable SELinux. Enter yes to disable SELinux, as shown in the following figure. Disable SELinux
    Notice Do not close the client until the migration is complete. Otherwise, the migration source will be disconnected from the SMC console and the migration fails.
  4. Log on to the SMC console.
  5. Create a migration task.
    1. In the left-side navigation pane, click Migration Sources.
    2. Find the migration source, and click Create Migration Task in the Actions column.
      You can obtain the ID of the migration source from the SMC client, as shown in the following figure. Then, you can use the ID to find the migration source in the SMC console. For more information, see Step 1: Import the information of a migration source. Obtain the ID of the migration source
    3. In the Create Migration Task panel, read the instructions and set the parameters for the migration task.

      The Basic Configuration section includes the following parameters:

      • Target Region: Required. The ID of the destination region. For more information about Alibaba Cloud regions, see Regions and zones.
      • Task name: the name of the migration task.
        Note The task name must be unique within an Alibaba Cloud region.
      • Description: the description of the migration task.
      • Target Disk Size (GiB): the disk configuration of the destination server. adad

        The following table describes the parameters.

        Parameter Required Description
        Enable Block Replication No
        • If you select Enable Block Replication, stable data transmission is ensured. The block replication feature also ensures that the source and destination disks use the same partitioning scheme. You cannot modify the size of each partition in the destination disk. After you select Enable Block Replication, the Whether to enable block replication switch appears next to Partition <N>.
        • If you clear Enable Block Replication, SMC uses the default method to migrate the migration source. You can modify the size of each partition in the destination disk.
        Note If your source server runs Windows, block replication is enabled by default. Do not disable it.
        System Disk Yes
        • System Disk: the system disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 500. The size of the destination system disk must be greater than the amount of data in the source system disk. For example, if the total size of the source system disk is 400 GiB but the size of data stored in this disk is only 100 GiB, you must set this parameter to a value greater than 100 GiB.
          Note The default value of this parameter is the size of the source system disk. We recommend that you retain the default value or specify a greater value.
        • Partition <N>: SMC generates a partitioning scheme for the destination system disk based on that of the source system disk. Unit: GiB. Valid values: 0 to 98. N indicates the serial number of the partition. For example, if the system disk of the migration source has only one partition, Partition 0 is generated.
        • Whether to enable block replication: This switch is available only when you select Enable Block Replication. SMC allows or disallows you to turn on the switch based on whether the migration source supports block replication.
          • If the migration source does not support block replication for partitions, you cannot turn on the switch.
          • If the migration source supports block replication for partitions, you can turn on the switch to migrate disk data at the partition level.
        Data Disk <N> No
        • Data Disk <N>: the data disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 32768.
          • If you select the Data Disk <N> check box, a destination data disk is generated.
          • N indicates the serial number of the data disk.
          • The size of the destination data disk must be greater than that of the existing data in the source data disk. For example, if the total size of the source data disk is 500 GiB but the size of data stored in the disk is only 100 GiB, you must set this parameter to a value greater than 100 GiB.
        • Partition <N>: SMC generates a partitioning scheme for the destination data disk based on that of the source data disk. Unit: GiB. Valid values: 0 to 141. N indicates the serial number of the partition. For example, if a data disk of the migration source has only one partition, Partition 0 is generated.
        • Whether to enable block replication: This switch is available only when you select Enable Block Replication. SMC allows or disallows you to turn on the switch based on whether the migration source supports block replication.
          • If the migration source does not support block replication for partitions, you cannot turn on the switch.
          • If the migration source supports block replication for partitions, you can turn on the switch to migrate disk data at the partition level.
        Note Data Disk <N> is available only if the migration source has a data disk. For more information, see SMC FAQ.
      • Resource Type: the type of the destination image. Valid values:
        • ECS Image. The following table describes the parameters.
          Parameter Required Description
          Image Name No The name of the destination ECS image generated by SMC for the migration source.
          Note The image name must be unique within an Alibaba Cloud region.
          License Type Yes The license type.
          Automatic Incremental Synchronization No Specifies whether SMC automatically synchronizes incremental data of the migration source to Alibaba Cloud.
          • To enable this feature, you must set the following parameters:
            • Synchronization Interval: the interval at which SMC automatically synchronizes incremental data to Alibaba Cloud.
            • Upperlimit of Reserved Images: the maximum number of images that can be retained during incremental migration.
            SMC automatically synchronizes incremental data to Alibaba Cloud at the specified interval. For more information about best practices for incremental migration, see Migrate incremental data from a source server.
          • If you disable this feature, incremental data is not synchronized.
        • ECS Instance. The following table describes the parameters.
          Note The storage and operating systems of the source server and destination instance must be compatible. For more information, see Migrate servers to ECS instances.
          smc-instance
          Parameter Required Description
          Destination Instance No The destination ECS instance.
          License Type Yes The license type.
          Automatic Incremental Synchronization No Specifies whether SMC automatically synchronizes incremental data of the migration source to Alibaba Cloud.
          • To enable this feature, you must set the following parameters:
            • Synchronization Interval: the interval at which SMC automatically synchronizes incremental data to Alibaba Cloud.
            • Upperlimit of Reserved Images: the maximum number of images that can be retained during incremental migration.
            SMC automatically synchronizes incremental data to Alibaba Cloud at the specified interval. For more information about best practices for incremental migration, see Migrate incremental data from a source server.
          • If you disable this feature, incremental data is not synchronized.
        • Container Image. The following table describes the parameters.
          Note SMC does not allow you to migrate Windows servers to Container Registry. For more information, see Migrate source servers to Container Registry.
          Parameter Required Description
          Namespace Yes The namespace of the destination container image.
          Repository Name Yes The name of the repository that stores the destination container image.
          Version No The version of the destination container image.
          RAM Role Yes The RAM role that is attached to the intermediate instance.
      • Method to Run: specifies whether to run the task immediately after it is created or automatically run the task.
        • Run Now: The migration task runs immediately after it is created.
        • Run Later: The migration task automatically runs at the specified time after it is created.
          Note The earliest time that you can specify to run a migration task is 10 minutes after its creation.
        • Create Only: After the task is created, you must manually start the task.

        Default value: Run Now.

      Tag and Network (Optional):

      • Migration Task Tag: the tags that you specify for the migration task. Each tag contains a key and a value. You can use tags to query and manage migration tasks.
        Note You can specify a maximum of 20 tags for a migration task.
      • Network Type: the type of the network that is used to migrate data to an intermediate instance. During migration, SMC creates an intermediate instance that connects to a vSwitch in a VPC. If you select Public Network, a public IP address is assigned to the intermediate instance. 258

        The following table describes the parameters.

        Parameter Description
        Public Network SMC migrates data to the intermediate instance over the Internet. If you select Public Network, make sure that the migration source can access the Internet. You can choose whether to specify a VPC and a vSwitch based on your requirements.
        • If you specify a VPC and a vSwitch, SMC creates an intermediate instance that connects to the specified VPC and vSwitch.

          If you migrate multiple migration sources at a time, you can specify the same VPC and vSwitch for migration tasks. This improves the usage of VPC resources. You can migrate a maximum of 100 migration sources at a time.

        • If you do not specify a VPC or a vSwitch, SMC automatically creates a VPC and a vSwitch and creates an intermediate instance that connects to the VPC and the vSwitch.

          If you do not specify a VPC or a vSwitch before you migrate multiple migration sources at a time, SMC creates a VPC for each intermediate instance.

          Note Each Alibaba Cloud account can have a maximum of 10 VPCs in a region, including the VPCs that you create and the VPCs that are automatically created by SMC. Therefore, you can migrate a maximum of 10 migration sources at a time. To increase the VPC quota, submit a ticket.
        VPC SMC migrates data to the intermediate instance through a VPC. If you select VPC, you must specify a VPC and a vSwitch and make sure that the migration source can connect to the VPC.
        Note If your server in a data center, virtual machine, or cloud host can connect to a VPC, we recommend that you select this mode to migrate data. Compared with migration over the Internet, migration over a VPC is more efficient and stable. You can use VPN Gateway, Express Connect, and Smart Access Gateway to connect a migration source to a VPC. For more information, see Connect a data center to a VPC.
      Advanced Settings (Optional):
      • Checksum: This feature enhances the verification of data consistency between the migration source and the destination server. However, this may reduce the rate of data transmission.

        By default, this feature is disabled.

      • Transmission Speed Limit: the maximum bandwidth for data transmission during migration. Unit: Mbit/s.
      • Compression Level: the compression ratio of data to be migrated. Set the compression ratio based on your requirements.
        • If the bandwidth is limited, a high compression ratio improves the transmission efficiency.
        • If a high bandwidth is available, we recommend that you do not compress data. Data compression consumes CPU resources of the migration source.

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

      • Intermediate Instance Type: The type of the intermediate instance. Select an intermediate instance type based on your needs. The parameter takes effect only when Resource Type is set to ECS Image or Container Image.
        • If you specify the parameter, SMC creates an intermediate instance based on the specified instance type. If the specified instance type is unavailable, you cannot create the migration task.
        • If you do not specify the parameter, SMC automatically creates an intermediate instance.
    4. After the configuration is completed, click OK.
  6. Start the migration task.
    Note If you set the Method to Run parameter to Run Now, skip this step. If you set the Method to Run parameter to Create Only or Run Later, you can perform the following steps to start the migration task:
    1. In the left-side navigation pane, click Migration Tasks.
    2. Find the migration task and click Start in the Actions column.
      • To start multiple migration tasks at a time, select the tasks and click Start/Retry in the lower part of the Migration Tasks page. The selected tasks must be in the Ready, Stopped, or Error state.
      • To suspend a migration task in the Syncing state, click Pause in the Actions column.

What to do next

On the Migration Tasks page, wait until the migration task is completed. If the task enters the Completed state, the migration is successful.
  • If you set Resource Type to ECS Image, you can perform the following steps to create an ECS instance by using an image:
    1. Optional:Verify the migration result. This feature verifies whether the image generated by the migration task can create and start instances. This verification is based on the Operation Orchestration Service (OOS) template named ACS-SMC-CreateAndVerifyInstance provided by Alibaba Cloud.
      1. Click Verify Migration Result in the Actions column.
      2. In the dialog box that appears, read the verification process, and click Verify Now.

        You can also click Custom Verification Script to set the parameters.

      3. View the verification result in the Last Migration Result column.
        • Successful: indicates that the migration is successful. You can click View Output Parameter to check the details.
        • Failed: indicates that the migration failed. You can click View Cause to view the cause of failure and troubleshoot errors.

        You can also click the ... icon in the Actions column, and then click Check Verification History in the OOS Console to view the template history.

    2. Find the migration task, and click Create Instance in the Actions column. list
    3. Set the parameters to create the destination instance. For more information, see Create an ECS instance by using a custom image.
    4. Connect to the destination instance and check its system. For more information, see the "How do I check my system after I migrate a Windows server?" or "How do I check my system after I migrate a Linux server?" section in SMC FAQ.
  • If you set Resource Type to ECS Instance, you can click View Destination Instance in the Actions column to go to the Destination Instance page.
  • If you set Resource Type to Container Image, you can use a container image to deploy applications. For more information, see Migrate source servers to Container Registry. smc docker
If the migration task enters the Error state, the migration failed. You must perform the following steps:
  1. Click View Logs in the Actions column to fix errors. For information about common errors and solutions, see SMC FAQ.
  2. On the Migration Tasks page, restart the migration task. The migration task resumes from the point where it was suspended.
    Note If the intermediate instance is released, you must create another migration task. For more information, see the "What can I do if I have released an intermediate instance by mistake?" section in SMC FAQ.