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 create a public flavor

Admin panel

  1. On the Compute > Virtual machines > Flavors tab, click Create flavor.
  2. In the Create flavor window, specify a flavor name, a number of virtual CPU cores, an amount of RAM, and then click Create.

The created flavor will be available to all of the projects.

To create a private flavor

  1. Create a flavor with the --private option. For example, to create the flavor private_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
  2. Assign the flavor to a project. For example, to assign the flavor private_tiny to the project myproject within the domain mydomain, 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

  1. On the Compute > Virtual machines > Flavors tab, select the flavor you want to delete, and then click Delete.
  2. Click Delete in the confirmation window.