We recommend that you do not use the Server Migration Center (SMC) client in one-time job mode.

Prerequisites

Notice You can select another migration method based on your needs. For more information, see Overview.

Preparations are complete. For more information, see Before you begin.

Procedure

  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. Configure the migration source and destination.
    1. Open the user_config.json file.
      The following code shows the user_config.json file in its initial status:
      {
          "access_id": "",
          "secret_key": "",
          "region_id": "",
          "image_name": "",
          "system_disk_size": -1,
          "platform": "",
          "data_disks": [],
          "bandwidth_limit": 0
      }
    2. Configure the migration source and destination based on the migration parameters and data disk parameters.
      Table 3. Migration parameters
      Parameter Type Required Description
      access_id String Yes The AccessKey ID of your Alibaba Cloud account or RAM user. For more information, see Obtain an AccessKey pair.
      secret_key String Yes The AccessKey Secret of your Alibaba Cloud account or RAM user. For more information, see Obtain an AccessKey pair.
      region_id String Yes The ID of the Alibaba Cloud region to which you migrate your migration source. For more region ID values, see Regions and zones.
      image_name String Yes The name of the target Alibaba Cloud image generated by SMC for your migration source. The name must meet the following requirements:
      • The name cannot be the same as that of an existing image in the same region.
      • The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
      system_disk_size Integer Yes The system disk size of the destination ECS instance. Unit: GiB. Valid values: 20 to 500.
      Note The size of a destination data disk must be greater than the size of data in the source data disk. For example, if a source data disk has 500 GiB of storage space and 100 GiB of data, you must set this parameter to a value greater than 100 GiB.
      platform String No The operating system of the migration source. Valid values: Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows Server 2016, CentOS, Ubuntu, SUSE, OpenSUSE, Debian, RedHat, and Others Linux.
      Note The value of the platform parameter must be case-sensitive.
      bandwidth_limit Integer No The maximum bandwidth of data transmission during migration. Unit: KB/s.

      The default value is 0, which indicates unlimited bandwidth.

      data_disks Array No The list of data disks attached to the target Alibaba Cloud ECS instance. An ECS instance can be attached to a maximum of 16 data disks. For more information about the data disk parameters, see Data disk parameters.
      Table 4. Data disk parameters
      Parameter Type Required Description
      data_disk_index Integer Yes The index number of a data disk attached to the target Alibaba Cloud ECS instance. Valid values: 1 to 16

      Default value: 1

      data_disk_size Integer Yes The size of a data disk attached to the target Alibaba Cloud ECS instance. Unit: GiB. Valid values: 20 to 32768.
      Note The size of a destination data disk must be larger than the size of data in the source data disk. For example, if a source data disk has 500 GiB of storage space and 100 GiB of data, you must set this parameter to a value greater than 100 GiB.
      src_path String Yes The source directory of a data disk. Examples:
      • In Windows, specify a drive letter, such as D:, E:, or F:.
      • In Linux, specify a directory, such as /mnt/disk1, mnt/disk2, or /mnt/disk3.
        Note It cannot be the root directory or system directories such as /bin, /boot, /dev, /etc, /lib, /lib64, /sbin, /usr, or /var.
      • Scenario 1: Migrate a Windows server that has no data disks to the China (Hangzhou) region
        • Configurations of the source server:
          • Operating system: Windows Server 2008
          • System disk size: 30 GiB
        • Configurations of the destination server:
          • Target region: China (Hangzhou) (cn-hangzhou)
          • Image name: CLIENT_IMAGE_WIN08_01
          • System disk size: 50 GiB
        {
            "access_id": "YourAccessKeyID",
            "secret_key": "YourAccessKeySecret",
            "region_id": "cn-hangzhou",
            "image_name": "CLIENT_IMAGE_WIN08_01",
            "system_disk_size": 50,
            "platform": "Windows Server 2008",
            "data_disks": [],
            "bandwidth_limit": 0
        }
      • Scenario 2: Migrate a Windows server that has data disks to the China (Hangzhou) region
        In this scenario, the Windows server from Scenario 1 is attached to two data disks. The following drive letters and sizes of the data disks are used as an example:
        • Sizes of source data disks:
          • D: 50 GiB
          • E: 100 GiB
        • Sizes of destination data disks:
          • D: 100 GiB
          • E: 150 GiB
        {
            "access_id": "YourAccessKeyID",
            "secret_key": "YourAccessKeySecret",
            "region_id": "cn-hangzhou",
            "image_name": "CLIENT_IMAGE_WIN08_01",
            "system_disk_size": 50,
            "platform": "Windows Server 2008",
            "data_disks":  [ {
                    "data_disk_index": 1,
                    "data_disk_size": 100,
                    "src_path": "D:"
                }, {
                    "data_disk_index": 2,
                    "data_disk_size": 150,
                    "src_path": "E:"
                }
            ],
            "bandwidth_limit": 0
        }
      • Scenario 3: Migrate a Linux server that has no data disks to the China (Hangzhou) region
        • Configurations of the source server:
          • Operating system: CentOS 7.2
          • System disk size: 30 GiB
        • Configurations of the destination server:
          • Destination region: China (Hangzhou) (cn-hangzhou)
          • Image name: CLIENT_IMAGE_CENTOS72_01
          • System disk size: 50 GiB
        {
            "access_id": "YourAccessKeyID",
            "secret_key": "YourAccessKeySecret",
            "region_id": "cn-hangzhou",
            "image_name": "CLIENT_IMAGE_CENTOS72_01",
            "system_disk_size": 50,
            "platform": "CentOS",
            "data_disks": [],
            "bandwidth_limit": 0
        }
      • Scenario 4: Migrate a Linux server that has data disks to the China (Hangzhou) region
        In this scenario, the Linux server from Scenario 3 is attached to two data disks. The following drive letters and sizes of the data disks are used as an example:
        • Sizes of source data disks:
          • /mnt/disk1: 50 GiB
          • /mnt/disk2: 100 GiB
        • Sizes of destination data disks:
          • /mnt/disk1: 100 GiB
          • /mnt/disk2: 150 GiB
        {
            "access_id": "YourAccessKeyID",
            "secret_key": "YourAccessKeySecret",
            "region_id": "cn-hangzhou",
            "image_name": "CLIENT_IMAGE_CENTOS72_01",
            "system_disk_size": 50,
            "platform": "CentOS",
            "data_disks":  [ {
                    "data_disk_index": 1,
                    "data_disk_size": 100,
                    "src_path": "/mnt/disk1"
                }, {
                    "data_disk_index": 2,
                    "data_disk_size": 150,
                    "src_path": "/mnt/disk2"
                }
            ],
            "bandwidth_limit": 0
        }
  3. Optional. Exclude files or directories from migration.
    The configuration files are located in the Excludes directory of the SMC client, including:
    • A system disk configuration file: rsync_excludes_win.txt (for Windows servers) or rsync_excludes_linux.txt (for Linux servers)

    • A data disk configuration file: named by adding a suffix disk [disk index number] to the system disk, such as rsync_excludes_win_disk1.txt (for Windows servers) or rsync_excludes_linux_disk1.txt (for Linux servers).

    Note If a configuration file is lost or deleted by accident, you can create another one.
    • Example 1: Exclude files or directories from migration of a Windows Server
      • System disk:
        • Specify the files or directories to be excluded:
          C:\MyDirs\Docs\Words
          C:\MyDirs\Docs\Excels\Report1.txt
        • Add the following information to the rsync_excludes_win.txt file:
          /MyDirs/Docs/Words/
          /MyDirs/Docs/Excels/Report1.txt
      • Data disk:
        • Specify the files or directories to be excluded:
          D:\MyDirs2\Docs2\Words2
          D:\MyDirs2\Docs2\Excels\Report2.txt
        • Add the following information to the rsync_excludes_win_disk1.txt file:
          /MyDirs2/Docs2/Words2/
          /MyDirs2/Docs2/Excels2/Report2.txt
        Note
        To exclude a Windows directory, you must perform the following operations:
        • Remove the prefix of the directory (scr_path). In the preceding example, you must remove D:.
        • Replace \ with /.
    • Example 2: Exclude files or directories from the migration of a Linux server
      • System disk (root directory/):
        • Specify the files or directories to be excluded:
          /var/mydirs/docs/words
          /var/mydirs/docs/excels/report1.txt
        • Add the following information to the rsync_excludes_linux.txt file:
          /var/mydirs/docs/words/
          /var/mydirs/docs/excels/report1.txt
      • Data disk:
        • Specify the files or directories to be excluded:
          /mnt/disk1/mydirs2/docs2/words2
          /mnt/disk1/mydirs2/docs2/excels2/report2.txt
        • Add the following information to the rsync_excludes_linux_disk1.txt file:
          /mydirs2/docs2/words2/
          /mydirs2/docs2/excels2/report2.txt
        Note To exclude a Linux directory, you must remove the prefix of the directory (scr_path). In the preceding example, you must remove /mnt/disk1.
  4. Run the SMC client in one-time job mode.
    • For Windows servers, select one of the following methods to run the SMC client:
      • Windows GUI version
        1. Double-click to run go2aliyun_gui.exe.
        2. Choose Config > One-Time Job Mode.
        3. Click OK.
        4. Click Start.
        Note When you run the program, you must confirm your administrator privileges by clicking OK.
      • Windows CLI version
        1. Open the Command Prompt.
        2. Go to the directory where go2aliyun_client.exe is located.
        3. Run the go2aliyun_client.exe -- onetime command.
    • For Linux servers, select a method to run the SMC client based on whether you have root or sudo permissions on the source server system.
      • In the directory where go2aliyun_client is located, run the following commands as the root user:
        chmod +x ./go2aliyun_client
        ./go2aliyun_client --onetime
      • In the directory where go2aliyun_client is located, run the following commands by using sudo permissions:
        sudo chmod +x ./go2aliyun_client
        sudo ./go2aliyun_client --onetime

    You do not need to perform other operations after you run the SMC client. Wait until the migration is complete. The client obtains source server information such as the number of CPU cores, memory size, memory usage, and CPU utilization. Then, the information is displayed on the client interface. The migration status is also displayed on the client interface as a log stream.

What to do next