Help Center/ Cloud Operations Center/ Getting Started/ Restarting an ECS by Executing a Job
Updated on 2025-07-28 GMT+08:00

Restarting an ECS by Executing a Job

Scenarios

COC is a secure and efficient O&M platform, offering one-stop, AI-powered solutions for all your centralized O&M needs. The job management function of COC allows you to customize jobs and execute jobs on target VMs. You can use this function to perform operations on target instances, which can be ECSs or BMSs currently.

This section describes how to restart an ECS on COC.

Operation Process

Procedure

Description

Prepare for the task.

You need to sign up for a HUAWEI ID, complete real-name authentication, and enable COC.

Step 1: Synchronize resources.

This task obtains resources in all regions to which the current user belongs and synchronizes the resources to COC.

Step 2: Install a UniAgent.

You can install an UniAgent on each desired node for information exchange between COC, lower-layer services, and hosts.

Step 3: Execute a job.

On COC, you can enjoy automated job execution on ECSs.

Preparations

  1. Sign up for a HUAWEI ID and complete real-name authentication.

    Before using COC, sign up for a HUAWEI ID, enable Huawei Cloud services, and complete real-name authentication.

    If you already have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Enable COC.

    Upon your first login, enable COC first.

    If you have enabled COC, skip this step.

Step 1: Synchronize Resources.

  1. Log in to COC.
  2. In the navigation pane, choose Resources > Application and Resource Management.
  3. Click to synchronize resources.
    Figure 1 Synchronizing resources

Step 2: Install a UniAgent.

  1. Access the Resources tab page, select the target ECSs and choose UniAgent > Install.
    Figure 2 Installing a UniAgent
  2. Click manually install UniAgent. The page for manually installing the UniAgent is displayed.
    Figure 3 UniAgent installation page
  3. Run the installation command on the page to manually install the UniAgent.
    Figure 4 Manually installing a UniAgent

Step 3: Execute a Job.

  1. In the navigation pane on the left, choose Resource O&M > Automated O&M.
  2. In the Routine O&M area, click Jobs.
  3. Click the Public Jobs tab.
  4. Select All Jobs, locate the ECS restart job, and click Execute.
    Figure 5 Selecting a job to execute
  5. Set execution type and basic information.
    Figure 6 Parameters in the execution type and basic information areas
    Table 1 Parameters in the execution type and basic information areas

    Parameter

    Example Value

    Description

    Execution Type

    Single

    Select the scope of the jobs to be executed.

    IAM Agency

    ServiceLinkedAgencyForCOC

    Scope of permissions that can be used by COC to execute jobs.

  6. Set the execution content.
    Figure 7 Parameters in the Execution Content area
    Table 2 Parameters in the Execution Content area

    Parameter

    Example Value

    Description

    Region

    CN North-Beijing4

    Select the region in which the target instance is located.

    Target Instance Mode

    Consistent for all steps

    Select the execution mode for job steps and target instances.

    Target Instance

    N/A

    Select the target instance to execute the job.

    Batch Policy

    No Batch

    Batch execution policy of the target instance.

  7. Click Submit.
  8. Confirm the job configurations and click OK. The service ticket details page is displayed.
  9. Refresh the page and view the job execution status.