This topic describes how to migrate your physical servers to Alibaba Cloud ECS.

Migrate a Windows-based physical server to Alibaba Cloud

Before you perform migration, you must complete the following preparations:
  • Create snapshots to back up data.
  • Make sure that the system time of the VM is the same as the standard time of the region in which the VM to be migrated is located.
  • Make sure that the VM to be migrated can access the following URLs and ports:
    • ECS: https://ecs.aliyuncs.com:443.
      Note For information about ECS API endpoints of other regions, see Service endpoints.
    • VPC: https://vpc.aliyuncs.com:443.
    • STS: https://sts.aliyuncs.com:443.
    • Intermediate instance: ports 8080 and 8703.
      Note An intermediate instance is a temporary instance automatically created by the Cloud Migration tool during runtime. If network connection errors occur during the migration, you must run the following commands to ensure that the VM to be migrated has access to ports 8080 and 8703 of the intermediate instance:
      telnet xxx.xx.xxx.xx 8080  #xxx.xx.xxx.xx is the public IP address of the intermediate instance. When you perform VPC-based migration, xxx.xx.xxx.xx is the private IP address of the intermediate instance.
      telnet xxx.xx.xxx.xx 8703  #xxx.xx.xxx.xx is the public IP address of the intermediate instance. When you perform VPC-based migration, xxx.xx.xxx.xx is the private IP address of the intermediate instance.
  • Check virtualized applications. Alibaba Cloud ECS instances do not support built-in virtualized applications. After migration, software such as VMware Workstation, Virtual Box, and Hyper-V that can be used only in a physical server environment is not supported.
  • Make sure that the Windows VSS is enabled.
  • Check whether qemu-guest-agent is installed. If this tool is installed, you must uninstall it. For more information, see Cloud Migration tool FAQ.
  • Check the validity of your application licenses. After your physical server is migrated to Alibaba Cloud, the underlying hardware devices of the system change and associated application licenses may become invalid.
  • We recommend that you use a test machine to conduct migration tests as described in this topic.

Perform the following operations to migrate a Windows-based physical server to Alibaba Cloud:

  1. Download and install the Cloud Migration tool onto the server to be migrated.
    For more information, see the "Step 1: Download and install the Cloud Migration tool" section in Migrate your server to Alibaba Cloud by using the Cloud Migration tool.
  2. Configure the user_config.json file.

    The user_config.json file contains the following configuration items:

    • The AccessKey information of your Alibaba Cloud account.
    • The destination region of migration and the name of the destination image.
    • Optional. The size of the destination system disk and the specifications of the destination data disks.
    • The platform and architecture of the source system to be migrated.

    For information about how to configure these items, see the "Step 2: Configure the user_config.json file" section in Migrate your server to Alibaba Cloud by using the Cloud Migration tool.

  3. Optional:Configure the directories or files that do not need to be migrated.
    For more information, see the "Step 3: (Optional) Exclude files or directories from migration" section in Migrate your server to Alibaba Cloud by using the Cloud Migration tool.
  4. Run the main program of the Cloud Migration tool.

    Run go2aliyun_client.exe or go2aliyun_gui.exe as an administrator. If the main program is a GUI version, click Start to start the migration.

Migrate a Linux-based physical server to Alibaba Cloud

Before you perform migration, you must complete the following preparations:
  • Create snapshots to back up data.
  • Make sure that the system time of the VM is the same as the standard time of the region in which the VM to be migrated is located.
  • Make sure that the VM to be migrated can access the following URLs and ports:
    • ECS: https://ecs.aliyuncs.com:443.
      Note For information about ECS API endpoints of other regions, see Service endpoints.
    • VPC: https://vpc.aliyuncs.com:443.
    • STS: https://sts.aliyuncs.com:443.
    • Intermediate instance: ports 8080 and 8703.
      Note An intermediate instance is a temporary instance automatically created by the Cloud Migration tool during runtime. If network connection errors occur during the migration, you must run the following commands to ensure that the VM to be migrated has access to ports 8080 and 8703 of the intermediate instance:
      telnet xxx.xx.xxx.xx 8080  #xxx.xx.xxx.xx is the public IP address of the intermediate instance. When you perform VPC-based migration, xxx.xx.xxx.xx is the private IP address of the intermediate instance.
      telnet xxx.xx.xxx.xx 8703  #xxx.xx.xxx.xx is the public IP address of the intermediate instance. When you perform VPC-based migration, xxx.xx.xxx.xx is the private IP address of the intermediate instance.
  • Download and install the Cloud Migration tool. For more information, see Download and install the Cloud Migration tool.
  • Go to the directory where the Cloud Migration tool is located. Run the ./Check/client_check --check command to check whether the physical server to be migrated meets the migration conditions. If all check items are displayed as OK in the command output, you can start the migration. Otherwise, you must perform the following checks:
    1. Check SELinux. For CentOS and Red Hat kernel systems, you must check whether SELinux is disabled or shut down. If SELinux is not shut down, you can disable it by using one of the following methods:
      1. Run the setenforce 0 command to shut down SELinux temporarily.
      2. Modify the /etc/selinux/config file to set SELINUX to disabled to disable SELinux permanently.
    2. Check the virtualization driver. For more information, see Install virtio driver.
    3. Check the GRUB bootloader. For earlier kernel versions such as CentOS 5, Red Hat 5, and Debian 7, you must upgrade GRUB to version 1.99 or later. For more information, see Install GRUB in a Linux server.
  • Check virtualized applications. Alibaba Cloud ECS instances do not support built-in virtualized applications. After migration, software such as VMware Workstation, Virtual Box, and Hyper-V that can be used only in a physical server environment is not supported.
  • Check the validity of your application licenses. After your VM is migrated to Alibaba Cloud, the underlying hardware devices of the system change and associated application licenses may become invalid.
  • We recommend that you use a test machine to conduct migration tests as described in this topic.

Perform the following operations to migrate a Linux-based physical server to Alibaba Cloud:

  1. Configure the user_config.json file.

    The user_config.json file contains the following configuration items:

    • The AccessKey information of your Alibaba Cloud account.
    • The destination region of migration and the name of the destination image.
    • Optional. The size of the destination system disk and the specifications of the destination data disks.
    • The platform and architecture of the source system to be migrated.

    For information about how to configure these items, see the "Step 2: Configure the user_config.json file" section in Migrate your server to Alibaba Cloud by using the Cloud Migration tool.

  2. Optional:Configure the directories or files that do not need to be migrated.
    For more information, see the "Step 3: (Optional) Exclude files or directories from migration" section in Migrate your server to Alibaba Cloud by using the Cloud Migration tool.
  3. Run the following commands as the root user to grant the execution permission to the main program of the Cloud Migration tool and run the program:
    chmod +x go2aliyun_client
    ./go2aliyun_client
    Wait until the Cloud Migration tool finishes running. When the Goto Aliyun Finished! message is displayed, the migration is complete. The following figure shows an example.linux_result