Help Center/ Elastic Cloud Server/ Troubleshooting/ Linux ECS Issues/ Why Is the OS Version of My ECS Not the One in the Image I Selected During ECS Creation?
Updated on 2024-02-29 GMT+08:00

Why Is the OS Version of My ECS Not the One in the Image I Selected During ECS Creation?

Symptom

You run the following command on your ECS to query its OS version:

/etc/redhat-release

Assume that the command output shows that the current version is CentOS 7.6. However, the version of the OS in the image that you used to create the ECS is CentOS 7.2 or another version earlier than CentOS 7.6.

The operations described in this section only apply to ECSs running CentOS or EulerOS.

Possible Causes

  1. System patches have been installed. Run the following command to view the operation records in yum:

    # yum history

    Information similar to the following is displayed:

    Loaded plugins: fastestmirror
    ID     | Login user               | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
         8 | root <root>              | 2019-08-23 10:00 | I, U           |   40 EE
         7 | root <root>              | 2019-06-24 10:12 | I, U           |   55   
         6 | root <root>              | 2019-02-22 11:10 | I, O, U        |  280 EE
         5 | root <root>              | 2019-02-22 11:09 | I, U           |    6   
         4 | root <root>              | 2019-02-22 11:08 | Install        |    1   
         3 | root <root>              | 2019-02-22 11:08 | Install        |    1   
         2 | root <root>              | 2019-02-22 11:08 | Install        |    1   
         1 | System <unset>           | 2019-02-22 10:49 | Install        |  352   
    history list

    The action performed on August 23 contains operations I (Install) and U (Update) with operation ID 8.

  2. Run the following command to view details about the operations:

    # yum history info 8

    Information similar to the following is displayed:

    Loaded plugins: fastestmirror
    Transaction ID : 8
    Begin time     : Fri Aug 23 10:00:13 2019
    Begin rpmdb    : 384:1c8e3df918de17e245b0dd7195f06f89656c5f27
    End time       :            10:02:22 2019 (129 seconds)
    End rpmdb      : 386:9a3172e7946f31d43c1268b6e1f2428125b3dfc5
    User           : root <root>
    Return-Code    : Success
    Command Line   : update -y

    The preceding command output indicates that user root has performed a yum update operation successfully. This upgrades the OS to the latest version.