Updated on 2024-02-05 GMT+08:00

Using Custom Agent Images

You can customize agent images by referring to Creating a Windows Agent Image and Creating a Linux Agent Image. Then you can use these custom agent images for migration by modifying the SMS Agent configuration file.

Precautions

SMS only provides standard, security-hardened agent images for testing use. You need to use your custom agent images for migration.

  • You are advised to use your custom agent images for migration of sensitive data. Before the migration, you need to scan and evaluate security risks in your agent images. Huawei Cloud can provide help for you. You are responsible for possible migration failures and data losses caused by the security risks identified in your agent images.
  • The agent images provided by SMS are only for migration testing. You are not advised to use them for other purposes.
  • In your custom agent images created using SMS agent images, do not change the IP address 169.254.XX.XX contained in the scripts. The IP address is used by ECS to access the metadata service.

Using a Windows Agent Image (Python 3)

  1. Log in to the SMS console. In the navigation pane on the left, choose Agents.
  2. Download Windows Agent (Python 3), upload it to the source server, and double-click SMS-Agent-Py3.exe to install the SMS-Agent. Click Finish to complete the installation.
  3. Enter the AK/SK pair and SMS domain name to start the SMS-Agent.
  4. Go to the directory where the SMS-Agent was installed (typically C:\SMS-Agent-Py3\config).
  5. In the cloud-region.json file, search for "windows_ssh_image_id" and replace the content as indicated by the arrow in the picture below with the ID of your custom image.

Using a Windows Agent Image (Python 2)

  1. Log in to the SMS console. In the navigation pane on the left, choose Agents.
  2. Download Windows Agent (Python 2), upload it to the source server, and double-click SMS-Agent-Py2.exe to install the SMS-Agent. Click Finish to complete the installation.
  3. Enter the AK/SK pair and SMS domain name to start the SMS-Agent.
  4. Go to the directory where the SMS-Agent was installed (typically C:\SMS-Agent-Py2\config).
  5. In the cloud-region.json file, search for "windows_ssh_image_id" and replace the content as indicated by the arrow in the picture below with the ID of your custom image.

Using a Linux Agent Image

  1. Log in to the SMS console. In the navigation pane on the left, choose Agents.
  2. Download the Linux Agent installation package to the source server to be migrated.
  3. On the source server, decompress the installation package.

    tar -zxvf SMS-Agent.tar.gz

  4. Start the Agent.

    ./startup.sh

  5. Enter the AK/SK pair and SMS domain name to start the SMS-Agent.
  6. Go to the directory where the SMS-Agent was installed (typically ~\SMS-Agent\agent\config\cloud-region.json).
  7. In the cloud-region.json file, search for "linux_image_id" and replace the content as indicated by the arrow in the picture below with the ID of your custom image.