3.3. Manage Flavors
Each created instance is given a flavor (resource template), which determines the instance's size and capacity. Flavors can also specify secondary ephemeral storage, swap disk, metadata to restrict usage, or special project access (none of the default flavors have these additional attributes defined).
Table 3.1. Default Flavors
| Name | vCPUs | RAM | Root Disk Size |
|---|---|---|---|
| m1.tiny | 1 | 512 MB | 1 GB |
| m1.small | 1 | 2048 MB | 20 GB |
| m1.medium | 2 | 4096 MB | 40 GB |
| m1.large | 4 | 8192 MB | 80 GB |
| m1.xlarge | 8 | 16384 MB | 160 GB |
The majority of end users will be able to use the default flavors. However, you might need to create and manage specialized flavors. For example, you might:
- Change default memory and capacity to suit the underlying hardware needs.
- Add metadata to force a specific I/O rate for the instance or to match a host aggregate.
Note
Behavior set using image properties overrides behavior set using flavors (for more information, see Section 4.1, “Manage Images”).
3.3.1. Update Configuration Permissions
By default, only administrators can create flavors or view the complete flavor list (select Admin > System > Flavors). To allow all users to configure flavors, specify the following in the
/etc/nova/policy.json file (nova-api server):
"compute_extension:flavormanage": "",
3.3.2. Create a Flavor
- As an admin user in the dashboard, select Admin > System > Flavors.
- Click , and specify the following fields:
Tab Field Description Flavor Information Name Unique name. ID Unique ID. The default value, 'auto', generates a UUID4 value, but you can also manually specify an integer or UUID4 value. VCPUs Number of virtual CPUs. RAM (MB) Memory (in megabytes). Root Disk (GB) Ephemeral disk size (in gigabytes); to use the native image size, specify '0'. This disk is not used if 'Instance Boot Source=Boot from Volume'. Epehemeral Disk (GB) Secondary ephemeral disk size (in gigabytes). Swap Disk (MB) Swap disk size (in megabytes). Flavor Access Selected Projects Projects which can use the flavor. If no projects are selected, all projects have access ('Public=Yes'). - Click .
3.3.3. Update General Attributes
- As an admin user in the dashboard, select Admin > System > Flavors.
- Click the flavor's button.
- Update the values, and click .
3.3.4. Update Flavor Metadata
In addition to editing general attributes, you can add metadata to a flavor ('extra_specs'), which can help fine-tune instance usage. For example, you might want to set the maximum-allowed bandwidth or disk writes.
- Pre-defined keys determine hardware support or quotas. Pre-defined keys are limited by the hypervisor you are using (for libvirt, see Table 3.2, “Libvirt Metadata”).
- Both pre-defined and user-defined keys can determine instance scheduling. For example, you might specify 'SpecialComp=True'; any instance with this flavor can then only run in a host aggregate with the same key-value combination in its metadata (see Section 3.4, “Manage Host Aggregates”).
3.3.4.1. View Metadata
- As an admin user in the dashboard, select Admin > System > Flavors.
- Click the flavor's Metadata link ('Yes' or 'No'). All current values are listed on the right-hand side under Existing Metadata.
3.3.4.2. Add Metadata
You specify a flavor's metadata using a
key/value pair.
- As an admin user in the dashboard, select Admin > System > Flavors.
- Click the flavor's Metadata link ('Yes' or 'No'). All current values are listed on the right-hand side under Existing Metadata.
- Under Available Metadata, click on the Other field, and specify the key you want to add (see Table 3.2, “Libvirt Metadata” ).
- Click the button; you can now view the new key under Existing Metadata.
- Fill in the key's value in its right-hand field.
Figure 3.2. Flavor Metadata

- When finished with adding key-value pairs, click .
Table 3.2. Libvirt Metadata
| Key | Description |
|---|---|
hw:action
|
Action that configures support limits per instance. Valid actions are:
Example: 'hw:cpu_max_sockets=2'
|
hw:NUMA_def
|
Definition of NUMA topology for the instance. For flavors whose RAM and vCPU allocations are larger than the size of NUMA nodes in the compute hosts, defining NUMA topology enables hosts to better utilize NUMA and improve performance of the guest OS.
NUMA definitions defined through the flavor override image definitions. Valid definitions are:
Example when the instance has 8 vCPUs and 4GB RAM:
numa_mempolicy setting.
|
hw:watchdog_action
|
An instance watchdog device can be used to trigger an action if the instance somehow fails (or hangs). Valid actions are:
Example: 'hw:watchdog_action=poweroff'
|
hw_rng:action
|
A random-number generator device can be added to an instance using its image properties (see
hw_rng_model in the "Command-Line Interface Reference" in RHEL OpenStack Platform documentation).
If the device has been added, valid actions are:
Example: 'hw_rng:allowed=True'.
|
hw_video:ram_max_mb
|
Maximum permitted RAM to be allowed for video devices (in MB).
Example: 'hw:ram_max_mb=64'
|
quota: option
|
Enforcing limit for the instance. Valid options are:
Example: 'quota:vif_inbound_average=10240'
|