Skip to content

Resizing a server

This guide will walk you through the required steps to change the number of CPU cores and the amount of memory your server has access to, this is done by changing the server’s flavor.

Resize (or Server resize) is the ability to change the flavor of a server, thus allowing it to upscale or downscale according to user needs. A resize operation is a two-step process for the user:

  1. Initiate the resize.
  2. Either confirm (verify) success and release the old server, or declare a revert to release the new server and restart the old one.

Prerequisites

You need to have a server you wish to resize. Additionally, if you prefer to work with the OpenStack CLI, then make sure to properly enable it first.

Listing available flavors

Navigate to the server list.

The left hand side navigation panel, with the word "Servers"
highlighted.

Find the server you want to resize in the list, and on the right-hand side click on its menu button.

An orange circle with three white
dots.

Click on Modify Server.

A list of server actions, with the line "Modify Server"
highlighted.

On this panel near the top, find the section called Flavor. This is the current flavor used by the server. Press on the dropdown menu to see all available flavors.

A panel displaying the servers current flavor, 8 Cores and 24 GB
RAM with the name of the flavor "b.8c24gb" within
parenthesis.

To list all available flavors you can simply run openstack flavor list, but that will return a very long unsorted list, instead we recommend the following command:

openstack flavor list -c Name -f value | grep '[0-9]c[0-9]' | sort -V

The printout is a simple and clean list, sorted by the compute type, the number of cores and then by the amount of memory.

b.1c1gb
b.1c2gb
b.1c4gb
b.2c2gb
b.2c4gb
b.2c8gb
b.2c16gb
b.4c4gb
...

Initiating the resize

Choose a new flavor that you want your server to use instead.

A resize is only possible with flavors using the same prefix letter. Most commonly you will have a b. flavor, thus you must select another b. flavor.

Once selected, the Resize button will appear.

A panel displaying the servers new flavor, 4 Cores and 24 GB RAM
with the name of the flavor "b.4c24gb" within parenthesis, also a
green button below it with the text
"Resize".

Click on it to start the resize.

While the resize is ongoing you will see a spinning circle saying Resize is in progress.

A spinning circle with the text "Resize in
progress...".

To start the resize use the following command:

openstack server resize --flavor <new_flavor> <server_id>

While the resize is ongoing the server should have the OS-EXT-STS:task_state of resize_migrating and the status of RESIZE.

openstack server show -c OS-EXT-STS:task_state -c OS-EXT-STS:vm_state -c status <server_id>
+-----------------------+------------------+
| Field                 | Value            |
+-----------------------+------------------+
| OS-EXT-STS:task_state | resize_migrating |
| OS-EXT-STS:vm_state   | active           |
| status                | RESIZE           |
+-----------------------+------------------+

You may proceed with the next step once your server status is VERIFY_RESIZE.

+-----------------------+---------------+
| Field                 | Value         |
+-----------------------+---------------+
| OS-EXT-STS:task_state | None          |
| OS-EXT-STS:vm_state   | resized       |
| status                | VERIFY_RESIZE |
+-----------------------+---------------+

The resize process might take a minute or more. Cleura Cloud will now make a restore point in case the resize process fails. It would then restore your server to the state it was before the resize.

Confirming the resize

Your server is now using the new flavor you selected earlier, and you need to make sure the server is working as intended after the resize.

Once you are certain your server is working as intended, you should confirm the resize. If you do not confirm the resize, your server will automatically have the resize confirmed after 24 hours.

This is done by clicking the Confirm button.

A panel displaying the servers flavor, 4 Cores and 24 GB RAM
with the name of the flavor "b.4c24gb" within parenthesis, a red
button with the text "Cancel" below it and a green button with the
text "Confirm" beside
that.

If your server is not working as intended, or you simply regret the resize, instead click Cancel.

This is done by using the following command:

openstack server resize confirm <server_id>

Alternatively, if your server is not working as intended, revert the resize with the following command:

openstack server resize revert <server_id>

This concludes the process of resizing a server in Cleura Cloud.