Help Center/ Cloud Operations Center/ Best Practices/ Batch OS Upgrade Using COC
Updated on 2026-04-23 GMT+08:00

Batch OS Upgrade Using COC

Scenarios

As enterprise cloud resources grow, the rapid growth of infrastructure, including both ECSs and on-premises IDCs, makes OS updates and security patching a constant operational necessity. The traditional approach—manually upgrading servers one by one—has three major limitations:

  • Low efficiency: Upgrading hundreds of servers can take several days, leading to high O&M labor costs.
  • Poor consistency: Issues such as inconsistent versions, missing configurations, and dependency conflicts can occur, leading to compatibility problems.
  • Uncontrollable risks: Lack of batch management, process monitoring, and quick rollback mechanisms. Single points of failure can easily spread, severely affecting service continuity and compliance.

OS version change of COC focuses on security compliance, efficient collaboration, traceability, and auditability. It provides full-process automation capabilities, including compatibility evaluation, batch execution, process monitoring, result verification, and fault rollback. This function supports smooth OS version upgrades for many ECSs and on-premises IDCs, addressing the pain points of traditional methods and ensuring service stability and O&M efficiency.

Solutions

COC's batch OS version upgrade is designed based on the cloud O&M automation framework and integrates four modules: CMDB resource management, job scheduling, remote execution, and monitoring and alarm reporting. It uses UniAgent to securely communicate with ECSs and IDCs, building a distributed batch O&M architecture that consists of a management platform and execution agents.

  • Upgrade preparations (risk control)
    • Resource and version sorting: Use the COC CMDB to centrally manage target ECSs and IDCs, confirm the current OS version (only minor version upgrades from RHEL 7.4/7.6 to 7.9 and from 7.9 to 8.6/8.8/8.10 supported, x86_64 architecture), select the target instances, and ensure that UniAgent is running properly.
    • Compatibility pre-evaluation: Use COC's built-in compatibility check tool to check if the target version works with your applications, middleware, and drivers and generate an evaluation report, helping you fix issues ahead of time.
    • Data and backup assurance: Create system image backups for all target instances, configure data disk snapshots, and develop rollback plans. For core workload clusters, verify the upgrade process in the test environment first.
    • Batch policy planning: Develop batch rules based on the business architecture (such as clusters and AZs). For core workloads, use manual batching (grouped by node or AZ). For non-core workloads, use automatic batching.
  • Batch upgrade execution (automated management)
    • Creating an OS version change task: Log in to the COC console and choose Resource O&M > Automated O&M > OS Version Change. Specify the target resources (ECSs/IDCs), region, enterprise project, and target OS version.
    • Execution policy settings: Select Automatic batches or Manual batches, bind permissions to O&M accounts, and enable operation audit and log retention.
    • One-click batch execution: Submit the task to generate an upgrade service ticket. COC automatically delivers upgrade instructions in batches. UniAgent remotely installs the OS upgrade package, updates configurations, and restarts the system.
  • Troubleshooting and rollback (risk mitigation)
    • Node fault: For instances on which the upgrade fails, use COC to roll back the image to the pre-upgrade status. After the fault is rectified, perform the upgrade again.
    • Audit and review: Check upgrade logs, analyze fault causes, adjust the batch policy and compatibility check rules, and accumulate O&M experience.

Constraints

  • Only Red Hat Enterprise Linux is supported.
  • Only ECSs and on-premises IDCs are supported.
  • Red Hat Enterprise Linux Server (RHEL) 7.4 and 7.6 can be upgraded to Red Hat Enterprise Linux Server (RHEL) 7.9 and Red Hat Enterprise Linux Server (RHEL) 7.9 can be upgraded to Red Hat Enterprise Linux Server (RHEL) 8.6, 8.8, or 8.10.
  • The architecture type can only be x86_64.
  • UniAgent of the target instances must be running.

Precautions

If the OS version upgrade fails, the system may fail to start or functions may be abnormal. Before the upgrade, back up the system image. For details, see OS Version Upgrade Compatibility Issues.

Creating an OS Version Change Task

  1. Log in to COC.
  2. In the navigation pane, choose Resource O&M > Automated O&M.
  3. In the Advanced O&M area, click OS Version Change.
  4. On the displayed page, set the mandatory parameters by referring to Table 1 and retain the default values for other parameters.

    Figure 1 Configuring the execution content
    Figure 2 Adding instances
    Table 1 Parameters for a version upgrade

    Parameter

    Example Value

    Description

    OS Type

    RedHat

    Select the OS type to be upgraded. Only RedHat is supported.

    Architecture Type

    Red Hat Enterprise Linux for x86_64

    Select the CPU architecture type you want to use in the target version. Only x86_64 is supported.

    Target Version

    Red Hat Enterprise Linux Server release 7.9 (Maipo)

    Select the target version.

    OS Upgrade Procedure

    -

    The following 11 steps have been preset in the system: BusinessProcessingBeforeUpgrading User-defined, PreparationBeforeUpgrading, CheckBeforeUpgrading, BackupBeforeUpgrading, UpgradeOS, RebootOS, Sleep-20s, WaitingForOSReboot, SystemProcessingAfterUpgrading, BusinessProcessingAfterUpgrading User-defined, and BusinessVerificationAfterUpgrading User-defined.

    Target Instance

    -

    Click Add and select the target instances.

  5. In the Parameter Settings area, click Modify to modify the global parameters required for the OS version change. Parameters marked with an asterisk (*) are mandatory.

    Table 2 Global parameters

    Parameter

    Example Value

    Description

    REPO_IP_GLOBAL

    100.**.**.**

    Source IP address of the local Yum repository.

    SUT_PACKAGE_NAME_GLOBAL

    sut-1.1.5-13.eulerosv2r13.x86_64.rpm

    Name of the SUT package.

    HUAWEI_OBS_ENDPOINT_GLOBAL

    https://obs-test.obs.***.myhuaweicloud.com

    URL for accessing Huawei Cloud OBS buckets.

    REPO_BASE_URL_GLOBAL

    /myropo/redhat

    Source structure for the local YUM repository.

  6. Click OK. In the confirmation drawer, confirm the execution information and click OK to execute the OS version change.

    The system redirects to the ticket details page. Wait until the execution is complete.

  7. On the ticket details page, click the instance name and check the execution logs of the upgrade.

    Figure 3 Checking the execution logs