Updated on 2026-06-23 GMT+08:00

Creating an OS Version Change Task

During routine O&M, you need to periodically upgrade the OS to ensure system stability and security. However, manual execution of this process is not only time-consuming but also error-prone. To address this challenge, you can create an OS version change task. After the task is created, a service ticket for upgrading the OS version is generated, simplifying the operation process and improving O&M efficiency.

The OS version change feature is billed on a pay-per-use basis. You can create OS version change tasks as required. For details, see Billing Mode.

Constraints

  • Currently, only Red Hat Enterprise Linux is supported.
  • Only ECSs and IDC resources 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 selected instance must be running.

Precautions

If the OS upgrade fails, the system may fail to start or functions may be abnormal. Before the upgrade, back up the system image. For more compatibility issues, see Summarizing 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. Fill in basic information about the OS version change.

    Figure 1 Configuring basic parameters
    Table 1 Basic information parameters

    Parameter

    Description

    Example Value

    IAM Agency

    (Mandatory)

    IAM agency name. (This agency is a cloud service agency. If this parameter is not specified, the default value ServiceAgencyForCOC is used.)

    ServiceAgencyForCOC

    Execution Description

    (Optional)

    Description of the job. The description can contain a maximum of 500 characters.

    -

  5. Specify OS Type, Schema Type, and Target Version.

    • OS Type: Select the type of the OS you want to use for the target version. Currently, only the Red Hat Enterprise Linux OS type is supported.
    • Architecture Type: Select the CPU architecture type you want to use in the target version. Currently, only x86_64 is supported.
    • Target Version: Select the target version.
      Figure 2 Configuring execution content

  6. Set the 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.
    • BusinessProcessingBeforeUpgrading User-defined, BusinessProcessingAfterUpgrading User-defined, and BusinessVerificationAfterUpgrading User-defined support user-defined configurations. You can click Modify under each step to navigate to the Modify Parameter drawer on the right. You can select a custom script on the Basic Information tab page. On the Input tab page, modify the input parameters. Other steps do not support user-defined configuration.
      Figure 3 Custom parameters

  7. Click Add and select the target instances.

    Figure 4 Adding an instance
    Table 2 Parameters for selecting an instance

    Parameter

    Description

    Example Value

    Selection Method

    Select an instance selection method. Select All is not enabled.

    • Manual Selection: Manually select one or more instances based on settings of Enterprise Project, View Type, Resource Type, Region, and Target Instance.
    • Select All: The system automatically selects all instances based on settings of Enterprise Project, View Type, Resource Type, Region, and Target Instance.

    Manual Selection

    Enterprise Project

    Select an enterprise project. You can select All.

    All

    View Type

    Select a view type.

    • CloudCMDB resources: Select an instance by resource type.
    • CloudCMDB application groups: Select an instance from the instance list by application.

    CloudCMDB resources

    Resource Type

    Select a resource type. Currently, only ECSs and IDC resources are supported.

    ECS

    Region

    Select an execution region. The target instance cannot be selected across regions.

    CN North-Beijing4

    Target Instance

    Set filter criteria in the filter box and manually select instances.

    Select the required instance.

  8. If multiple instances are selected in 7, set the batch policy as required.

    Table 3 Batch policy parameters

    Parameter

    Description

    Automatic

    The selected instances on which you want to perform operations are automatically divided into multiple batches based on the default rule.

    Manual

    You can manually create multiple batches and add instances to each batch as required.

    No Batch

    All instances on which you want to perform operations are in the same batch.

    If you select multiple target instances and set Batch Policy to Automatic or Manual, you can set the batch execution rule. You can select Pause for 1st batch, Pause after all batches, or Continue all.

    • If you select Pause for the 1st batch, you need to click Continue to execute the next batch after the first batch is executed.
    • If you select Pause after all batches, you need to click Continue after each batch is executed.
    • If you select Continue all, the system automatically executes the next batch after each batch is executed.
    • If you select Customize, you can determine whether to start or continue with the next batch after each batch is executed.

    For example, if you have selected multiple target instances and want to execute them in a custom number of batches, select Manual, set Batches to 3, and set the execution rule to Pause for the 1st batch. Then, select the corresponding batch and click Add.

    After the first batch of instances are executed, the execution is suspended. You can check whether the execution result meets the expectation. If the execution result is correct, click Continue to execute the next batch of instances. After the second batch of instances is executed, the third batch of instances will be automatically executed without manual confirmation.

    Figure 5 Setting a batch policy

  9. (Optional) Set global parameters.

    Click Modify to modify the global parameters related to the OS version change.

    Table 4 Parameter description

    Parameter

    Description

    REPO_IP_GLOBAL

    (Mandatory)

    IP address of the local Yum repository.

    SUT_PACKAGE_NAME_GLOBAL

    (Mandatory) This parameter has a default value.

    Name of the SUT package.

    HUAWEI_OBS_ENDPOINT_GLOBAL

    (Mandatory) This parameter has a default value.

    Address of the Huawei Cloud OBS bucket.

    BACKUP_DIR_CUSTOM_GLOBAL

    (Optional)

    Addresses of directories to be backed up. Separate multiple addresses with commas (,).

    EXCLUDE_DIR_CUSTOM_GLOBAL

    (Optional)

    Addresses of directories that do not need to be backed up. Separate multiple addresses with commas (,).

    REPO_BASE_URL_GLOBAL

    (Mandatory)

    Structure of the local Yum repository, that is, the path of the Yum repository.

    MAXIMUM_SPACE_OF_BACKUP_FILE_GLOBAL

    (Optional)

    Maximum size of a file in the backup directory, in MB. The default value is 5120.

    IDC_PROXY_IP_PORT_GLOBAL

    This parameter is mandatory when the upgrade process is performed through an IDC proxy.

    IP address and port number of the proxy server.

    CONFLICT_RPM_CUSTOM_GLOBAL

    (Optional) This parameter is specific to major version upgrades.

    The list of RPM packages with upgrade conflicts is used to determine whether to skip the conflict check. Use commas (,) to separate multiple package names.

    IS_AUTO_FIX_INCOMPAT_CASE_GLOBAL

    (Optional) This parameter is specific to major version upgrades.

    Whether to automatically fix the incompatibility issue of some RPM packages. The default value is true.

    • true: The incompatibility issue of some RPM packages is automatically rectified.
    • false: The incompatibility issue of RPM packages is not automatically rectified.

  10. Click OK. Confirm the execution information and click OK.

    The OS version change service ticket page is displayed. You can view the OS version change service ticket execution records.

Viewing the Execution Records of an OS Version Change Ticket

After an OS version is changed, an OS version change history that contains the execution results of this change will be generated. You can use the OS version change service ticket function to monitor and record the OS version change objects and execution results.

  1. Log in to COC.
  2. In the navigation pane on the left, choose Task Management > Execution Records. The task execution records page is displayed.
  3. Click the OS Version Change Service Tickets tab.
  4. In the OS version change service ticket list, click the target service ticket ID to go to the service ticket details page.
  5. Perform the following operations based on the service ticket status:

    • If the service ticket is failed, click Retry to execute the OS version change service ticket again.
    • If the service ticket is failed, click the rollback button to roll back the ticket to the source version.

Helpful Links

Use the OS version change function of COC to batch upgrade multiple hosts. For details, see Upgrading OSs in Batches Using COC.