Linux

Scenarios

You need to install the Agent on each Linux source server that you want to migrate. During the Agent installation, you need to enter the AK/SK pair of your account. After the Agent is started successfully, it automatically reports source server information to SMS. All collected data is used for migration only. For details, see What Information Does SMS Collect About Source Servers?

Prerequisites

Installation

  1. Log in to the management console.
  2. Click Service List. Under Migration, click Server Migration Service.

    Figure 1 SMS console

  3. In the navigation pane on the left, click Agents.

    Figure 2 Agents

  4. Run any of the following commands to download the Agent installation package as prompted on the Agents page of the SMS console.

    wget -t 3 -T 15 https://sms-agent-2-0-cn-north-1.obs.cn-north-1.myhuaweicloud.com/SMS-Agent.tar.gz

    curl -O https://sms-agent-2-0-cn-north-1.obs.cn-north-1.myhuaweicloud.com/SMS-Agent.tar.gz

  5. (Optional) Run the command following sha256 version to download the SHA256 file. Use the hash value contained in the SHA256 file to verify the integrity of the Agent installation package. For details, see How Do I Verify the Integrity of the Agent?
  6. Run the following command to decompress the downloaded package:

    tar -zxvf SMS-Agent.tar.gz

  7. Run the following command to switch to the SMS-Agent directory of the source server:

    cd SMS-Agent

  8. If you need to use an HTTPS proxy server, go to 9.

    If you do not need to use an HTTPS proxy server, go to 10.

    A proxy server is a special network service. If your source server cannot access HUAWEI CLOUD through the Internet, you can use a proxy server to access HUAWEI CLOUD. You need to configure a proxy server by yourself.

  9. (Optional) Configure an HTTPS proxy server.

    1. Run the following command to go to the config directory:

      cd SMS-Agent/agent/config

    2. Run the following command to open and edit the auth.cfg file. The values shown here are for reference only. Do not edit the auth.cfg file unless you need to use an HTTPS proxy server.

      vi auth.cfg

      [proxy-config]
      enable = true
      proxy_addr = 192.168.1.10
      proxy_port = 3128
      proxy_user = root
      use_password = true
      • proxy_addr: IP address of the proxy server. The proxy is used for registering the source server with SMS when Direct Connect or a VPN is used. It is not used for data migration. It is different from the IP address of the target server.
      • enable: Whether to use the proxy. To use the proxy, set it to true.
      • proxy_user: If a username is required to use the proxy, set it to the username. If not username is required, leave it blank.
      • use_password: If a password is required to use the proxy, set it to true. If none is required, set it to false.
    3. Run the following command to save the auth.cfg file and exit:

      :wq

  10. Run the following command to start the Agent:

    ./startup.sh

  11. Carefully review the description of what information will be collected by the Agent, enter y, and press Enter.

    Figure 3 Entering y

  12. Enter the AK/SK pair of the HUAWEI CLOUD account to which the target server belongs.

    When the following information is displayed, the Agent has been started up and will automatically start reporting source server information to SMS.

    Figure 4 Entering the AK/SK pair