Help Center > > Getting Started> Installing the Migration Agent on Source Servers> Installing the Linux Agent

Installing the Linux Agent

Updated at: Apr 14, 2020 GMT+08:00

Scenarios

You need to install the migration Agent on the source server and enter the AK and SK of your HUAWEI CLOUD account to which the target ECS belongs for authentication. After the migration Agent is started successfully, it automatically collects source server information and sends collected information to SMS.

You can download the migration Agent in either of the following ways:

  • Method 1: Run commands on the source server to download the migration Agent. You are advised to use method 1 to install the migration Agent for Linux OSs.
  • Method 2: Download the migration Agent from SMS and use a remote transmission tool, such as WinSCP, to upload the migration Agent to the source server to be migrated.

Prerequisites

Installing the Linux Agent (Method 1)

  1. Use PuTTY or an SSH client to log in to the source server to be migrated as user root:
  2. Run the following commands to download the migration Agent:

    wget -t 3 -T 15 https://sms-agent-inter-bucket.obs.ap-southeast-1.myhuaweicloud.com/SMS-Agent.tar.gz

    curl -O https://sms-agent-inter-bucket.obs.ap-southeast-1.myhuaweicloud.com/SMS-Agent.tar.gz

  3. (Optional) Verify the software integrity of the migration Agent. For details, see How Do I Verify the Software Integrity of the Migration Agent?
  4. Run the following command to decompress the software package:

    tar -zxvf SMS-Agent.tar.gz

  5. Run the following command to switch to the SMS-Agent directory on the source server:

    cd SMS-Agent

  6. If you need the HTTPS proxy server, go to 7.

    If you do not need the HTTPS proxy server, go to 8.

  7. (Optional) Configure an HTTPS proxy server.

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

      cd SMS-Agent/config

    2. Run the following command to open and edit the auth.cfg file:

      vi auth.cfg

      [auth-info]
      mainRegion = cn-north-1
      
      
      [proxy-config]
      enable = true
      proxy_addr = 192.168.1.10
      proxy_port = 3128
      proxy_user = root
      use_password = true
    3. Run the following command to save the auth.cfg file and exit:
      :wq
      • proxy_addr indicates the IP address of the proxy server, which allows the source server to access SMS through the proxy server. The IP address of the proxy server is not the destination IP address.
      • If the HTTPS proxy is not used during the migration, you are not allowed to modify the auth.cfg file.
      • The proxy is used only for registering the source server with SMS when Direct Connect or a VPN is used, and is not used for data migration.
      • If you use the Proxy, set enable to true.
      • If the Proxy server has a username, set proxy_user to the username, for example, root. If no, leave this parameter blank.
      • If the Proxy server has a password, set use_password to true. Otherwise, set use_password to false.
      • The preceding information is only for reference. Set Proxy server information based on the actual environment.

  8. Run the following command to start the migration Agent:

    ./startup.sh

  9. Read the displayed information carefully, enter y, and press Enter.

    Figure 1 Entering y

  10. Enter the AK and SK of the HUAWEI CLOUD account to which the target ECS belongs as prompted.

    When the following information is displayed, the Linux Agent starts successfully. The Agent starts sending source server information to SMS.

    Figure 2 Entering the AK and SK

Installing the Linux Agent (Method 2)

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

    The Server Migration Service console is displayed.

  3. In the navigation pane on the left, choose Migration Agent.

    The Migration Agent page is displayed.

  4. Click Download in the Download Linux Agent pane.

    The SMS-Agent.exe file starts to be downloaded.

  5. (Optional) Verify the software integrity of the migration Agent. For details, see How Do I Verify the Software Integrity of the Migration Agent?
  6. Use a remote transmission tool such as WinSCP to upload the migration Agent to the source server.
  7. Use PuTTY or an SSH client to log in to the source server to be migrated as user root:
  8. Run the following command to decompress the software package:

    tar -zxvf SMS-Agent.tar.gz

  9. Run the following command to switch to the SMS-Agent directory on the source server:

    cd SMS-Agent

  10. If you need the HTTPS proxy server, go to 11.

    If you do not need the HTTPS proxy server, go to 12.

  11. (Optional) Configure an HTTPS proxy server.

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

      cd SMS-Agent/config

    2. Run the following command to open and edit the auth.cfg file:

      vi auth.cfg

      [auth-info]
      mainRegion = cn-north-1
      
      
      [proxy-config]
      enable = true
      proxy_addr = 192.168.1.10
      proxy_port = 3128
      proxy_user = root
      use_password = true
    3. Run the following command to save the auth.cfg file and exit:
      :wq
      • proxy_addr indicates the IP address of the proxy server, which allows the source server to access SMS through the proxy server. The IP address of the proxy server is not the destination IP address.
      • If the HTTPS proxy is not used during the migration, you are not allowed to modify the auth.cfg file.
      • The proxy is used only for registering the source server with SMS when Direct Connect or a VPN is used, and is not used for data migration.
      • If you use the Proxy, set enable to true.
      • If the Proxy server has a username, set proxy_user to the username, for example, root. If no, leave this parameter blank.
      • If the Proxy server has a password, set use_password to true. Otherwise, set use_password to false.
      • The preceding information is only for reference. Set Proxy server information based on the actual environment.

  12. Run the following command to start the migration Agent:

    ./startup.sh

  13. Read the displayed information carefully, enter y, and press Enter.

  14. Enter the AK and SK of the HUAWEI CLOUD account to which the target ECS belongs as prompted.

    When the following information is displayed, the Linux Agent starts successfully. The Agent starts sending source server information to SMS.

    Figure 3 Entering the AK and SK

Troubleshooting

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel