All Products
Search
Document Center

Server Migration Center:Migrate servers to Alibaba Cloud

Last Updated:Jun 08, 2023

Server Migration Center (SMC) allows you to migrate servers that run various versions of the Windows or Linux operating system 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 without service downtime. Data in a server includes data in the system disk and data disks. 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), and Tencent Cloud. To ensure data consistency between a server and Alibaba Cloud, you can migrate full data from the server to Alibaba Cloud first, and then use incremental migration tasks to migrate the incremental data generated on the server to Alibaba Cloud at custom intervals. For more information, see Migrate incremental data from a source server.

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 the Migrate a server to Alibaba Cloud section of this topic.

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

Estimate the time required for migration and test the data transmission speed

You can estimate the time required for a migration task based on the migration period. The migration period is divided into three phases: pre-migration, migration, and post-migration. The migration period is proportional to the number of servers that you want to migrate and the volume of data. We recommend that you perform a test migration to estimate the time required for a migration task. For more information, see Estimate the time required for migration and test the data transfer speed.

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 process, 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 QEMU Guest Agent is installed. If QEMU Guest Agent is installed, you must uninstall it. For more information, see FAQs.

  • 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. ECS instances of Alibaba Cloud do not support built-in virtualized applications. After the migration, software such as VMware Workstation Pro, VirtualBox, or 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 must check the network environment.

    • If you migrate data from a Windows-based cloud server deployed on other QEMU KVM virtualization platforms, 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 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 process, 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, and Amazon 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. ECS instances of Alibaba Cloud do not support built-in virtualized applications. After the migration, software such as VMware Workstation Pro, VirtualBox, or 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 must 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 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 change the kernel to an official one. For technical support, see Contact us.

Migrate a server to Alibaba Cloud across regions outside the Chinese mainland

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 the Chinese mainland. Select ECS Image as the destination image type. For more information, see Migrate a server to Alibaba Cloud.

    If an Amazon 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 an image.

  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 on 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. Import the information about a migration source.

  2. Log on to the SMC console.

  3. In the Create Migration Job dialog box, configure the parameters and click Create.

    SMC supports server migration and operating system migration. You can select a migration job type based on your business requirements. For more information about best practices, see Migrate an operating system.

    The following table describes the parameters that you can configure to create a server migration job.

    Parameter

    Description

    Migration Job Type

    The type of the migration job. After you select Server Migration, read the migration instructions carefully.

    Basic Settings

    Destination Region

    The Alibaba Cloud region to which you want to migrate your source server. This parameter is required. For more information about regions, see Regions and zones.

    Migration Job Name

    The name of the migration job.

    Note

    The job name must be unique within an Alibaba Cloud region.

    Job Description

    The description of the migration job.

    Destination Disk Size

    The disk configurations of the destination server. adadConfigure the following parameters based on your business requirements:

    • Enable Block Replication

      • If you select Enable Block Replication, stable data transmission is ensured. The block-level replication feature also ensures that the source and destination disks use the same partitioning scheme. You cannot modify the size of each partition on the destination disk. After you select Enable Block Replication, the 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 on the destination disk.

      Note

      If your source server runs Windows, block-level replication is enabled by default. Do not disable it.

    • System Disk

      • System Disk: the system disk size of the destination Elastic Compute Service (ECS) instance. Unit: GiB. Valid values: 20 to 2048. The size of the destination system disk must be larger than the amount of data on the source system disk. For example, if the total size of the source system disk is 400 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.

        Note

        The default value of this parameter indicates the size of the source system disk. We recommend that you retain the default value or specify a greater value.

      • Partition<N>: the size of the partition. SMC generates a partitioning scheme for the destination disk based on the partitioning scheme of the source disk. Unit: GiB. Valid values: 0 to 14. <N> indicates the serial number of the partition. For example, if the system disk of the migration source has only one partition, Partition0 is generated.

      • Enable Block Replication: This switch is displayed only if you select Enable Block Replication. SMC allows or disallows you to turn on the switch based on whether the migration source supports block-level replication for partitions.

        • If the migration source does not support block-level replication for partitions, you cannot turn on the switch.

        • If the migration source supports block-level replication for partitions, you can turn on the switch to migrate disk data at the partition level.

    • Data Disk<N>

      • Data Disk<N>: the data disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 32768.

        • If you select Data Disk<N>, a destination data disk is generated.

        • <N> indicates the serial number of the data disk.

        • The size of the destination data disk must be larger than the amount of data on the source data disk. For example, if the total size of the source data disk is 500 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.

      • Partition<N>: the size of the partition. SMC generates a partitioning scheme for the destination disk based on the partitioning scheme of the source disk. Unit: GiB. Valid values: 0 to 14. <N> indicates the serial number of the partition. For example, if a data disk of the migration source has only one partition, Partition0 is generated.

      • Enable Block Replication: This switch is displayed only if you select Enable Block Replication. SMC allows or disallows you to turn on the switch based on whether the migration source supports block-level replication for partitions.

        • If the migration source does not support block-level replication for partitions, you cannot turn on the switch.

        • If the migration source supports block-level replication for partitions, you can turn on the switch to migrate disk data at the partition level.

      Note

      Data Disk<N> is displayed only if the migration source has a data disk. For more information, see the "Why are the data disk parameters of a migration source not displayed in the Create Migration Job dialog box? What do I do?" section of the SMC FAQ topic.

    Destination Type

    The type of the destination on Alibaba Cloud to which you want to migrate the source server.asads5

    • ECS Image: You can migrate the source server to an ECS image and then create an ECS instance by using the image.

    • ECS Instance: You can migrate the source server to an ECS instance that you have purchased. The storage system and operating system of the source server must be compatible with those of the ECS instance.

      Important
      • After a migration job is created, all original data is deleted from the destination ECS instance. If the destination ECS instance contains important data, we recommend that you do not directly migrate the source server to the destination instance. In this case, we recommend that you set the Destination Type parameter to ECS Image to migrate the source server to an ECS image and then create an ECS instance by using the image. For more information about how to migrate a source server to an ECS instance, see Migrate servers to ECS instances.

      • After the migration is complete, the cloud disks on the destination ECS instance are released, and the automatic snapshots of these cloud disks are deleted and cannot be recovered. You can manually disable the Delete Automatic Snapshots While Releasing Disk feature to retain the snapshots. For more information, see Delete automatic snapshots while releasing a disk.

    • Container Image: You can migrate the source server to Container Registry. Then, you can deploy containerized applications in Container Registry at low costs.

    The following section describes the parameters that you can configure for each type of destination:

    • ECS Image

      Parameters:

      • Image Name: 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: the type of the license. Valid values:

        • Alibaba Cloud: the Microsoft license provided by Alibaba Cloud. For more information, see SMC FAQ.

        • BYOL: SMC allows you to bring your own license (BYOL). You can bring your own Microsoft license or register with Red Hat Cloud Access. For more information, see SMC FAQ.

      • Automatic Incremental Synchronization: specifies whether SMC automatically synchronizes the incremental data of the migration source to Alibaba Cloud.

        • To enable this feature, you must configure 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, see Migrate incremental data from a source server.

        • If you disable this feature, incremental data is not synchronized.

    • ECS Instance

      Note

      The storage system and operating system of the source server must be compatible with those of the destination ECS instance. For more information about best practices, see Migrate servers to ECS instances.

      Parameters:

      • Destination Instance: Select an ECS instance as the destination instance.

        Important

        During the migration, do not stop, start, restart, or release the destination ECS instance. Otherwise, the migration fails.

      • License Type: the type of the license. Valid values:

        • Alibaba Cloud: the Microsoft license provided by Alibaba Cloud. For more information, see SMC FAQ.

        • BYOL: SMC allows you to bring your own license (BYOL). You can bring your own Microsoft license or register with Red Hat Cloud Access. For more information, see SMC FAQ.

      • Automatic Incremental Synchronization: specifies whether SMC automatically synchronizes the incremental data of the migration source to Alibaba Cloud.

        • To enable this feature, you must configure 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, see Migrate incremental data from a source server.

        • If you disable this feature, incremental data is not synchronized.

    • Container Image

      Note

      Parameters:

      • Namespace: the namespace of the destination container image.

      • Repository Name: the name of the repository that stores the destination container image.

      • Version: the version of the destination container image.

      • RAM Role: the Resource Access Management (RAM) role that is assigned to the intermediate instance.

    Execution Method

    The method that is used to run the migration job. Valid values:

    • Run Now: The migration job starts immediately after it is created.

    • Run Later: The migration job automatically starts at the specified time after it is created.

      Note

      The earliest time that you can specify to run a migration job is 10 minutes after the job is created.

    • Create Only: After the migration job is created, you must manually start the job.

    Default value: Run Now.

    Tags and Network (Optional)

    Migration Job Tags

    The tags that you specify for the migration job. Each tag contains a key and a value. You can use tags to query and manage migration jobs.

    Note

    You can specify a maximum of 20 tags for a migration job.

    Network Type

    The type of the network that is used to migrate data to the intermediate instance. During migration, SMC creates an intermediate instance that connects to a vSwitch in a virtual private cloud (VPC). If you select Public Network, a public IP address is assigned to the intermediate instance.adda

    Valid values:

    • 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 business 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 jobs. This improves the usage of VPC resources. In this case, 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 if you do not specify a VPC or a vSwitch. To raise the VPC quota, submit a ticket.

    • VPC: SMC migrates data to the intermediate instance over 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, your VM, or your third-party cloud server can connect to a VPC, we recommend that you select this network type 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 Verification

    This feature enhances the verification of data consistency between the migration source and the destination instance. However, this may slow down data transmission.

    By default, this feature is disabled.

    Transmission Speed Limit

    The maximum bandwidth for data transmission during migration. Unit: Mbit/s.

    Compression Ratio

    The compression ratio of the data to be migrated. Set the compression ratio based on your business 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 the CPU resources of the migration source.

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

    Intermediate Instance Type

    The type of the intermediate instance. Select an intermediate instance type based on your business requirements. This parameter is displayed only if the Destination Type parameter is set to ECS Image or Container Image.

    • If you specify an instance type, SMC creates an intermediate instance of the specified type. If the specified instance type is unavailable, the migration job fails to be created.

    • If you do not specify an instance type, SMC automatically selects an instance type to create an intermediate instance.

    Important

    During the migration, do not stop, start, restart, or release the intermediate instance. Otherwise, the migration fails. After the migration job is complete, SMC automatically releases the intermediate instance.

  4. Start the migration job.

    Note

    If the Execution Method parameter is set to Run Now, skip this step. If the Execution Method parameter is set to Create Only or Run Later, you can perform the following steps to start the migration job.

    1. In the left-side navigation pane, click Migration Jobs.

    2. Find the migration job and click Run in the Actions column.

      • To start multiple migration jobs at a time, select the jobs and click Start or Retry in the lower part of the Migration Jobs page. The selected jobs must be in the Ready, Stopped, or InError state.

      • To stop a migration job in the Synchronizing state, click Stop in the Actions column.

What to do next

Operation

Description

Verify the migration result

This feature verifies whether the image generated by the migration job can be used to create and start instances. This verification is based on the Operation Orchestration Service (OOS) template named ACS-SMC-CreateAndVerifyInstance provided by Alibaba Cloud.

  1. Find the migration job and click Verify Migration Result in the Actions column.

  2. In the dialog box that appears, read the instructions on the verification process and click Verify Now.

    You can also click Customize Verification Parameters to configure the parameters.

  3. View the verification result in the Latest Verification Result column.

    • Successful: indicates that the migration is successful. You can click Show Output Parameters to check the details.

    • Failed: indicates that the migration failed. You can click View Cause to view the cause of failure and troubleshoot issues.

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

View the destination instance

If you migrate an operating system or set the Destination Type parameter to ECS Instance, you can find the migration job and click View Destination Instance in the Actions column to view the details of the destination instance.

Deploy a container application

If you set the Destination Type parameter to Container Image, you can use a container image to deploy applications. For more information, see the "Step 3: Verify the container image" section of the Migrate source servers to Container Registry topic.smc docker

View the details of the migration job

On the Migration Jobs page, click the ID of the migration job to view the details of the migration job.

Troubleshoot migration issues

If the migration job enters the InError state, the migration failed. In this case, you can perform the following steps:

  1. Find the migration job and click View Logs in the Actions column to view logs and fix errors. For more information about common errors and solutions, see SMC FAQ.

  2. On the Migration Jobs page, restart the migration job. The migration job resumes from the point where it was stopped.

    Note

    If the intermediate instance is released, you must create another migration job. For more information, see the "What do I do if I release an intermediate instance by accident?" section of the SMC FAQ topic.