How to add computer flavor to Openstack from CLI

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

How to use cli to add flavor to openstack: This is a continuation of the introduction to the Openstack computing platform series. In an earlier part of this series, we introduced “Adding images to Openstack Glance”.

What is the Openstack flavor?

In OpenStack, the style defines the computing, memory, and storage capacity of virtual servers (also called instances). As an administrative user, you can create, edit and delete flavors. This can be done from the cli or using the Horizon dashboard,

Starting from the Newton openstack version, there is no default style. You have to create them manually, which is why I wrote this tutorial.

Add flavors.

We will define 6 flavors, each with a unique flavor ID, from small to large. Please note that this is just an example, you can define custom flavors to suit your use.

You need to configure the OpenStack client for this operation: How to install and configure the OpenStack client on Linux

Type the following commands to define six flavors:

openstack flavor create --id 0 --ram 512   --vcpus 1 --disk 10  m1.tiny
openstack flavor create --id 1 --ram 1024  --vcpus 1 --disk 20  m1.small
openstack flavor create --id 2 --ram 2048  --vcpus 2 --disk 40  m1.medium
openstack flavor create --id 3 --ram 4096  --vcpus 2 --disk 80  m1.large
openstack flavor create --id 4 --ram 8192  --vcpus 4 --disk 160 m1.xlarge
openstack flavor create --id 5 --ram 16384 --vcpus 6 --disk 320 m1.jumbo

Let me first explain the meaning of the values ​​used in each definition. If we take the first line as an example, 0 meIs the ID of the picture, 512 Means the flavor will 512 MB RAM versus 1 vcpu with 10 GB Root disk.The name of the taste is m1.tiny.

Confirm the flavor list.

You can check if the flavor has been successfully created from the cli using the following command:

$ openstack flavor list

On the user interface.You can go to Admin>System>Flavour

How to add flavor to OpenStack using CLI

Now that the flavor is added, you can create a test instance on Openstack for testing:

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Sidebar