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.

In the left hand side navigation panel, select "compute" and then "servers" In the left hand side navigation panel, select "compute" and then "servers"

Find the server you want to resize in the list. At the right-hand side of its row, click the icon. In the drop-down menu that appears, click on Modify Server.

In the drop-down menu of the server you want to resize, click on "modify server" In the drop-down menu of the server you want to resize, click on "modify server"

Near the top of the options panel, find the Flavor section. See the current flavor used by the server. Expand the dropdown menu to get all available flavors.

The server's current flavor The server's current flavor

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.

As soon as you select a new flavor, the Resize button appears.

The server's new flavor The server's new flavor

Click on it to start the resize.

While the resize is ongoing, you see a spinning circle and the message “Resize is in progress”.

Server resize operation in progress Server resize operation 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.

Confirm or cancel the server resize attempt Confirm or cancel the server resize attempt

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.