Creating custom flavors for virtual machines
In the compute cluster, a configuration template for virtual machines is called a flavor. Flavors simplify VM deployment. They allow you to set the number of virtual CPU cores and the amount of RAM a virtual machine will use. By default, five predefined flavors are created with the following parameters:
Name | vCPUs | Memory |
---|---|---|
tiny | 1 | 512 MiB |
small | 1 | 2 GiB |
medium | 2 | 4 GiB |
large | 4 | 8 GiB |
xlarge | 8 | 16 GiB |
You can create custom flavors with different sets of vCPU and RAM resources: public flavors (default), shared between all of the projects, and private flavors, shared with specific projects. Also, you can delete existing flavors, including the predefined ones.
Prerequisites
- To authorize further OpenStack commands, the OpenStack command-line client must be configured, as outlined in Connecting to OpenStack command-line interface.
To create a public flavor
To create a private flavor
-
Create a flavor with the
--private
option. For example, to create the flavorprivate_tiny
with 1 vCPU, 512 MiB of RAM, and the automatically generated UUID, run:# openstack --insecure flavor create private_tiny --private --id auto --ram 512 --disk 0 --vcpus 1
-
Assign the flavor to a project. For example, to assign the flavor
private_tiny
to the projectmyproject
within the domainmydomain
, run:# openstack --insecure flavor set private_tiny --project myproject --project-domain mydomain
The created flavor will only be available to the assigned project.
To delete a flavor
Admin panel
- On the Compute > Virtual machines > Flavors tab, select the flavor you want to delete, and then click Delete.
-
Click Delete in the confirmation window.