Help Center/ Host Security Service/ FAQs/ Agent/ How Do I Use Images to Install Agents in Batches?
Updated on 2024-10-31 GMT+08:00

How Do I Use Images to Install Agents in Batches?

You can use an existing private image to install and deploy an agent on a new server.

Do not use existing private images across regions. Otherwise, the agent status will be Uninstalled.

For example, if you create a private image in region A and deploy it in region B, after the deployment is complete, the agent status in region B is Uninstalled. If you deploy the image in region A, the agent status is Installed.

If you need to use an image across regions, install the image, uninstall the agent in the original region and clear its information, obtain the agent installation command in the target region, and then run commands to install the agent in the target region.

Windows

Perform the following steps to install Windows agents in batches by using images:

  1. Purchase a Huawei Cloud ECS. Select the target Windows image. For details, see Purchasing an ECS.
  2. Install HSS agent on the purchased ECS. For details, see Installing an Agent.

    Do not enable services or modify configurations other than those required for installing HSS agents.

  3. Perform the following operations to view the protection status of an ECS:

    1. Log in to the console.
    2. Click in the upper left corner of the page, select a region, and choose Security & Compliance > HSS.
    3. In the navigation pane, choose Asset Management > Servers & Quota.
    4. Click the Servers tab.
    5. View the protection status in the Protection Status column of a server.
      • If the status is Protected, go to step 4.
      • If the status is Unprotected or Protection interrupted, go to step 5.

  4. Perform the following operations to disable HSS:

    1. In the Operation column of a server, click Disable Protection.
    2. Click OK.
    3. If the Protection Status of the server is Unprotected, the protection has been disabled.

  5. Log in to the ECS as user Administrator and delete the following file:

    C:\Program Files\HostGuard\run\agent_info.conf

  6. Stop the ECS and use it to create an image. For details, see Creating an Image.
  7. Use the image created in step 6 to create servers in batches.

    After the servers are created, wait for 5 to 10 minutes until the agent status changes to Online.

Linux

Perform the following steps to install agents on Linux server in batches by using images:

  1. Purchase a Huawei Cloud ECS and select the required Linux image. For details, see Purchasing an ECS.
  2. Install the agent on the purchased ECS. For details, see Installing an Agent.

    Do not enable services or modify configurations other than those required for installing HSS agents.

  3. Perform the following operations to view the protection status of an ECS:

    1. Log in to the console.
    2. Click in the upper left corner of the page, select a region, and choose Security & Compliance > HSS.
    3. In the navigation pane, choose Asset Management > Servers & Quota.
    4. Click the Servers tab.
    5. View the protection status in the Protection Status column of a server.
      • If the status is Protected, go to step 4.
      • If the status is Unprotected or Protection interrupted, go to step 5.

  4. Perform the following operations to disable HSS:

    1. In the Operation column of a server, click Disable Protection.
    2. Click OK.
    3. If the Protection Status of the server is Unprotected, the protection has been disabled.

  5. Log in to the ECS as user root and run the following command to delete the agent_info.conf file:

    rm /usr/local/hostguard/run/agent_info.conf

  6. Stop the ECS and use it to create an image. For details, see Creating an Image.
  7. Use the image created in 6 to create servers in batches.

    After the servers are created, wait for 5 to 10 minutes until the agent status changes to Online.