This topic describes how to migrate your AWS EC2 instance to Alibaba Cloud ECS.

Migrate your EC2 Windows instance to Alibaba Cloud

Preparations

  1. Create a snapshot to back up your data.
  2. Check the validity of your application licenses.
    Note After your instance is migrated to Alibaba Cloud, the underlying hardware devices of the system will change, which may result in the associated application licenses becoming invalid.
  3. Check your network environment.
  4. Verify that the Windows VSS service is enabled.
  5. Check whether you have installed the qemu-agent tool. If so, uninstall it. For more information, see Cloud Migration tool FAQ.
  6. We recommend that you use a test machine to conduct migration tests before completing the actual procedure to ensure the migration is successful.

Procedure

  1. Download and install the Cloud Migration tool onto the server to be migrated.
  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 target zone of migration and the name of the target image
    • (Optional) The size of the target system disk and the configuration of the target data disks
    • The platform and architecture of the source system to be migrated

    For the configuration methods of these items, see Configure the user_config.json file.

  3. (Optional) Configure the directories or files that do not need to be migrated. For more information, see Exclude files or directories from migration.
  4. Run the main program of the Cloud Migration tool.

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

Migrate your EC2 Linux instance to Alibaba Cloud

Preparations

  1. Create a snapshot to back up your data.
  2. Check the validity of your application licenses.
    Note After your instance is migrated to Alibaba Cloud, the underlying hardware devices of the system will change, which may result in the associated application licenses becoming invalid.
  3. Check your network environment.
  4. Download and install the Cloud Migration tool.
  5. Go to the directory where the Cloud Migration tool is located. Run the ./Check/client_check --check command to check whether the EC2 instance to be migrated meets the migration conditions.
    Note If all check items are OK, you can start the migration. Otherwise, you need to conduct the following additional checks:
    • Check the cloud-init service. cloud-init is a service used by multiple cloud platforms to automatically initialize the configuration system. However, the cloud-init service configuration of AWS is incompatible with that of Alibaba Cloud. Therefore, the system migrated from AWS may fail to start normally due to a cloud-init startup failure, and the network cannot be connected. We recommend that you use the cloud-init configuration of Alibaba Cloud before migrating your AWS EC2 instance. For more information, see Install cloud-init. Alternatively, you can uninstall the cloud-init service of your AWS EC2 instance.
    • Check the GRUB bootloader.
      1. Upgrade GRUB to 2.02 or a later version for Amazon Linux systems as the root user.
      2. Upgrade GRUB to 1.99 or a later version for systems with earlier kernel versions (such as CentOS 5, Red Hat 5, and Debian 7) as the root user.
  6. We recommend that you use a test machine to conduct migration tests before completing the actual procedure to ensure the migration is successful.

Procedure

  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 target zone of migration and the name of the target image
    • (Optional) The size of the target system disk and the configuration of the target data disks
    • The platform and architecture of the source system to be migrated

    For the configuration methods of these items, see Configure the user_config.json file.

  2. (Optional) Configure the directories or files that do not need to be migrated. For more information, see Exclude files or directories from migration.
  3. Run the following command as the root user to grant the execution permission to the main program, and then run this program.
    chmod +x go2aliyun_client
    ./go2aliyun_client
  4. Wait until the main program of the Cloud Migration tool has been completely executed. When the message Go to Aliyun Finished! is displayed, the migration is successfully completed.

Cloud migration across international regions

  1. Migrate the AWS EC2 instance to the corresponding international region of Alibaba Cloud. For more information, see Full migration. For example, if the EC2 instance to be migrated is located in a region in the United States (such as US East (N. Virginia)), you can migrate it to an Alibaba Cloud region that is also in the United States (such as US East 1). For information about regions and their corresponding IDs, see Regions and zones.
  2. Copy the newly created image to the target Alibaba Cloud region. For more information, see Copy images.
  3. Use this image to create an instance in the target Alibaba Cloud region.

What to do next

By default, logon to your AWS EC2 instance using the root password is disabled by SSH. You can log on to your Alibaba Cloud instance by using your AWS username and SSH key.