tencent cloud


Operation Guide

Last updated: 2022-11-17 17:18:21

    This document describes how to use the online migration feature in the CVM console to migrate a server online.

    Migration Process

    The online migration procedure is shown below:


    • Register on Tencent Cloud International.
    • If you want to migrate using a sub-account, ask the root account owner to assign the sub-account with the QcloudCSMFullAccess and QcloudCVMFullAccess permissions in CAM console.
    • Create a key and obtain the SecretId and SecretKey in API Key Management.
    • Download the compressed migration tool package.
    • Stop all applications on the source server to prevent them from being affected by the migration.
    • Back up your data in the following ways before migrating:
      • Source server: You can use the source server snapshot feature or other methods to back up data.
      • Destination CVM: You can create a snapshot as instructed in Creating Snapshots or use other methods to back up data.

    Migration Directions

    Checking before the migration

    Before migration, you need to check the following configuration based on the actual conditions:

    • If the migration destination is a CVM instance, you need to check the source server and destination CVM.
    • If the migration destination is a CVM image, you need to check only the source server.
    Linux source server
    1. Check and install Virtio. For more information, see Checking Virtio Drivers in Linux.
    2. Run the which rsync command to check whether Rsync is installed, and if not, install it as instructed in How do I install Rsync?.
    3. Check whether SELinux is enabled, and if yes, disable it as instructed in How do I disable SELinux?.
    4. After a migration request is made to the Tencent Cloud API, the API will use the current UNIX time to check the generated token. You need to make sure that the current system time is correct.
    Windows source server
    1. Check and install Virtio. For more information, see Checking or installing the Virtio driver.
    2. (Optional) Check and install Cloudbase-Init. For details, see Installing Cloudbase-Init on Windows. You can install it on the source server before the migration, or install it on the destination instance after the migration.
      If you install it before the migration, network configuration and activation are performed automatically after the migration.
      If you do not install it before the migration, you need to Log into Windows Instance via VNC, and modify the network configuration manually.
    Destination CVM (optional)
    1. Storage space: The cloud disks (including the system disk and data disk) of the destination CVM must offer sufficient storage space for saving data from the source server.
    2. Security group: Port 443 and port 80 cannot be restricted in the security group.
    3. Bandwidth setting: It is recommended that you maximize bandwidths at the 2 ends to speed up the migration. During the process, the traffic consumed is approximately the amount of data migrated. Adjust the billing mode before the migration if necessary.
    • You can use tool commands such as sudo ./go2tencentcloud_x64 --check to automatically check the source server.
    • By default, the go2tencentcloud migration tool automatically performs checks upon launch. To skip checks and perform forced migration, configure Client.Extra.IgnoreCheck to true in the client.json file.

    Registering migration source

    Importing migration source with migration tool

    1. Download or upload go2tencentcloud.zip to the source server and run the following command to enter the corresponding directory.
      i. Run the following commands in sequence to decompress go2tencentcloud.zip and enter the directory.
      unzip go2tencentcloud.zip

      cd go2tencentcloud

      ii. Run the following commands in sequence to decompress go2tencentcloud-linux.zip and enter the directory.
      unzip go2tencentcloud-linux.zip

      cd go2tencentcloud-linux


      The files in the go2tencentcloud directory will not be migrated. Do not place the files to be migrated in this directory.

    2. (Optional) Exclude files and directories on the source server that do not need to be migrated.
      If there are files or directories on the Linux source server that do not need to be migrated, you can add them to the [rsync_excludes_linux.txt] file, as described in Compatibility and Tool Configuration Description (https://www.tencentcloud.com/document/product/213/44340).
    3. Import the migration source.
      i. For example, on a 64-bit Linux source server, execute the following command in sequence as the root user to run the tool.
      chmod +x go2tencentcloud_x64

      sudo ./go2tencentcloud_x64

      ii. Enter the SecretId and SecretKey of the account API access key obtained in Prerequisites and press Enter as shown below:

      If the information in the following figure is displayed in the window of the migration tool, the migration source has been imported to the console successfully, and you can go to the console to view it:

    Viewing migration source in the console

    You can log in to the CVM console and enter the online migration page to view the imported migration source, whose status is Online as shown below:

    If "Import source server successfully" isn't displayed, the migration source failed to be imported, and you can view the log (which is the logs/log file in the migration tool directory by default) for troubleshooting. Then, run the migration tool to import the migration source again.


    After the migration source is imported successfully, don't close the migration tool in the instance until the migration task is completed; otherwise, the migration task can't be completed after the migration source becomes offline.

    Creating and starting a migration task

    1. Create a migration task
      Log in to the CVM console, go to the online migration page, and click Create Migration Task on the right of the desired migration source. In the Create Migration Task pop-up window, configure the task as shown below:

      Configure the migration as follows:
    • Basic Options:
      Configuration Item Required Description
      Destination Region Yes The Tencent Cloud region to which the source server is to be migrated. For information on regions, seeRegions and AZs.
      Task name Yes The migration task name.
      Task Description No Migration task description.
      Destination Type Yes Set the destination type for the source server to be migrated to Tencent Cloud.
      • CVM Image: A destination CVM image will be generated for the migration source after the migration task ends.
        Image name: Name of the destination CVM image that will be generated for the migration source. If an image with the same name already exists in the destination region, the migration task will automatically add the task ID to the name.
      • CVM Instance: Select a CVM instance in the destination region as the migration destination.
        Destination instance: We recommend you use the same operating system for the source server and destination CVM. For example, to migrate a CentOS 7 source server, select a CentOS 7 CVM as the destination.
      Scheduled Execution Time No Set the time when the migration task will be automatically started after creation. It can be as early as 10 minutes after the current time.
    • Advanced Options (optional):
      Configuration Item Required Description
      Network Mode No Set the network type for transferring data in migration.
      • Transfer via public network: Transfer data to the destination CVM or relay instance via the public network.
      • Transfer via private network: Transfer data to the destination CVM or relay instance via the private network. For details, see Private Network Migration.
        VPC: Create the relay instance in a VPC when migrating to a CVM image.
        Subnet: Create the relay instance in a subnet when migrating to a CVM image.
      Transfer Restriction (KB/s) No The bandwidth for data transfer during the migration ranges from 0 to 25600 KB/s. The transfer rate is unlimited by default. This item is not available for migration on Windows.
      Checksum Verification No When it is enabled, data consistency check is enhanced, but the transfer speed may be reduced. This item is not available for migration on Windows.
    1. Start the migration task

      You can skip this step if your task is scheduled, which will automatically start running at the scheduled execution time.

      After creating a migration task, you can click the Migration Task tab to view the task as shown below: You can click Start/Retry on the right of the task to start it, click OK in the pop-up window, and the task status will become Migrating as shown below:
      • If the migration destination is a CVM, the destination CVM enters migration mode after the migration starts. Do not reinstall the system, shut down, terminate, or reset passwords of the destination CVM until the migration ends and the destination CVM exits the migration mode.
      • If the migration destination is a CVM image, a relay instance do_not_delete_csm_instance will be created under your account after the migration starts. Don't reinstall, shut down, or terminate the relay instance or reset its password. It will be automatically terminated by the system after the migration ends.

    Waiting for migration task to end

    After the migration task status becomes Successful, the migration is completed successfully as shown below:

    • The time required for data transfer depends on the size of the data on the source server, network bandwidth, etc. Please wait for the migration process to end.
    • After the migration task starts, you can click Pause on the row of the task to stop it.
    • The migration tool supports checkpoint restart. After a task is paused, you can click Start/Retry again to resume migration from where you paused.
    • A migration task can be paused during data transfer. After you click Pause for it in the console, the migration tool will pause the data transfer in progress.
    • If the migration process is time-consuming and you need to stop it, you can pause the migration task first and click Delete to delete it.

    Checking after migration

    • Failed migration:
    • Check the error information in log files (under the migration tool directory by default), operation guides, or FAQs about Service Migration for troubleshooting methods. After troubleshooting, click Start/Retry under the operation column to restart the migration task.
    • Successful migration:
    • Migrating to a CVM: Check whether the destination CVM starts up normally, whether data on the CVM is consistent with that on the source server, and whether the network and other system services are normal.
    • Migrating to a CVM image: Click the CVM image ID on the row of the migration task to enter the CVM image page and view the image information. You can use this image to create CVM instances.

    If you have any questions or the migration has an exception, see FAQs about Service Migration or Contact Us.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support