Skip to main content

Create a flavor

Last update:

To create cloud servers via the OpenStack CLI and Terraform, flavorings 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 arbitrary configurations, consider the available values of arbitrary linec configurations when creating a flavor.

Flavor will only be available for a single project and pool for which you have configured authorization in the OpenStack API.

  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 disk, the value must be zero;
    • <flavor_name> - flavor name. Must be unique and not match the names of previously deleted flavors. You can view the list of existing flavor names using the openstack flavor list.

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

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