Updated on 2022-09-23 GMT+08:00

Modifying ECS Specifications

Scenarios

When ECS specifications fail to meet service requirements, they can be modified, for example, by upgrading the vCPUs and memory. Certain ECSs also support changing ECS types during specifications modification.

Constraints

  • You can modify the ECS specifications only when the ECS is stopped.
  • The EVS disk capacity of the ECS cannot be reduced during the specifications modification.
  • When modifying the specifications of an ECS, you are not allowed to select sold-out vCPU and memory resources.
  • ECS specifications (vCPU or memory) degrade deteriorates the ECS performance.
  • Certain ECSs do not support specifications modification. To query the target flavors to which a specified ECS flavor can be changed, use API Querying the Target ECS Flavors to Which a Flavor Can Be Changed.

Procedure

  1. Modify ECS specifications.

    • API

      URI format: POST /v2.1/{tenant_id}/servers/{server_id}/action

      For details, see Modifying the Specifications of an ECS.

    • Example request
      {
          "resize": {
                        "flavorRef": "s6.medium.2"
          }
      }
    • Example response

      N/A

  2. Confirm the specifications modification.

    The ECS must be in resized state, OS-EXT-STS:vm_state being set to resized.

  3. (Optional) Roll back the specifications modification.

    Notes:

    The ECS must be in resized state, OS-EXT-STS:vm_state being set to resized.

    The data modified during specifications modification will be lost after the rollback.