Skip to main content

Create a flavor

Last update:

To create cloud servers via the OpenStack CLI and Terraform, flavors are used to define the number of vCPUs, RAM, and local disk size (optional) of the server. Through the OpenStack API, you can create a GPU flavor. Flavors correspond to custom configurations; when creating a flavor, consider the available values of custom configurations for lines.

The flavor will be available only for the specific project and pool for which you have configured OpenStack API authorization.

  1. Open the OpenStack CLI.

  2. Create a flavor:

    openstack flavor create \
    --private \
    --vcpus <vcpu> \
    --ram <ram_size> \
    --disk <disk_size> \
    <flavor_name>

    Specify:

    • <vcpu> — number of vCPUs; ;
    • <ram_size> — RAM size in MB; ;
    • optional: <disk_size> — local disk size in GB. To create a flavor with a network volume, the value must be zero; ;
    • <flavor_name> — flavor name. Must be unique and must not match the names of previously deleted flavors. You can view the list of existing flavors using openstack flavor list.

    Example of creating a flavor with 1 vCPU, 1 GB RAM, and a 5 GB local disk size:

    openstack flavor create --private --vcpus 1 --ram 1024 --disk 5 new_flavor