Flavors Authorized users can use the nova flavor-create command to create flavors. To see the available flavor-related commands, run: $ nova help | grep flavor- flavor-access-add Add flavor access for the given tenant. flavor-access-list Print access information about the given flavor. flavor-access-remove Remove flavor access for the given tenant. flavor-create Create a new flavor flavor-delete Delete a specific flavor flavor-key Set or unset extra_spec for a flavor. flavor-list Print a list of available 'flavors' (sizes of flavor-show Show details about the given flavor. To modify an existing flavor in the dashboard, you must delete the flavor and create a modified one with the same name. Flavors define these elements:
Identity Service configuration file sections
Element Description
Name A descriptive name. xx.size_name is typically not required, though some third party tools may rely on it.
Memory_MB Virtual machine memory in megabytes.
Disk Virtual root disk size in gigabytes. This is an ephemeral disk that the base image is copied into. When booting from a persistent volume it is not used. The "0" size is a special case which uses the native base image size as the size of the ephemeral root volume.
Ephemeral Specifies the size of a secondary ephemeral data disk. This is an empty, unformatted disk and exists only for the life of the instance.
Swap Optional swap space allocation for the instance.
VCPUs Number of virtual CPUs presented to the instance.
RXTX_Factor Optional property allows created servers to have a different bandwidth cap than that defined in the network they are attached to. This factor is multiplied by the rxtx_base property of the network. Default value is 1.0. That is, the same as attached network.
Is_Public Boolean value, whether flavor is available to all users or private to the tenant it was created in. Defaults to True.
extra_specs Key and value pairs that define on which compute nodes a flavor can run. These pairs must match corresponding pairs on the compute nodes. Use to implement special resources, such as flavors that run on only compute nodes with GPU hardware.
Flavor customization can be limited by the hypervisor in use, for example the libvirt driver enables quotas on CPUs available to a VM, disk tuning, bandwidth I/O, and instance VIF traffic control. You can configure the CPU limits with control parameters with the nova tool. For example, to configure the I/O limit: $ nova flavor-key m1.small set quota:read_bytes_sec=10240000 $ nova flavor-key m1.small set quota:write_bytes_sec=10240000 There are CPU control parameters for weight shares, enforcement intervals for runtime quotas, and a quota for maximum allowed bandwidth. The optional cpu_shares element specifies the proportional weighted share for the domain. If this element is omitted, the service defaults to the OS provided defaults. There is no unit for the value. It is a relative measure based on the setting of other VMs. For example, a VM configured with value 2048 gets twice as much CPU time as a VM configured with value 1024. The optional cpu_period element specifies the enforcement interval (unit: microseconds) for QEMU and LXC hypervisors. Within a period, each VCPU of the domain is not allowed to consume more than the quota worth of runtime. The value should be in range [1000, 1000000]. A period with value 0 means no value. The optional cpu_quota element specifies the maximum allowed bandwidth (unit: microseconds). A domain with a quota with a negative value indicates that the domain has infinite bandwidth, which means that it is not bandwidth controlled. The value should be in range [1000, 18446744073709551] or less than 0. A quota with value 0 means no value. You can use this feature to ensure that all vcpus run at the same speed. For example: $ nova flavor-key m1.low_cpu set quota:cpu_quota=10000 $ nova flavor-key m1.low_cpu set quota:cpu_period=20000 In this example, the instance of m1.low_cpu can only consume a maximum of 50% CPU of a physical CPU computing capability. Through disk I/O quotas, you can set maximum disk write to 10 MB per second for a VM user. For example: $ nova flavor-key m1.medium set disk_write_bytes_sec=10485760 The disk I/O options are: disk_read_bytes_sec disk_read_iops_sec disk_write_bytes_sec disk_write_iops_sec disk_total_bytes_sec disk_total_iops_sec The vif I/O options are: vif_inbound_ average vif_inbound_burst vif_inbound_peak vif_outbound_ average vif_outbound_burst vif_outbound_peak Incoming and outgoing traffic can be shaped independently. The bandwidth element can have at most one inbound and at most one outbound child element. Leaving any of these children element out result in no quality of service (QoS) applied on that traffic direction. So, when you want to shape only the network's incoming traffic, use inbound only, and vice versa. Each of these elements have one mandatory attribute average. It specifies average bit rate on the interface being shaped. Then there are two optional attributes: peak, which specifies maximum rate at which bridge can send data, and burst, amount of bytes that can be burst at peak speed. Accepted values for attributes are integer numbers, The units for average and peak attributes are kilobytes per second, and for the burst just kilobytes. The rate is shared equally within domains connected to the network. This example configures a bandwidth limit for instance network traffic: $ nova flavor-key m1.small set quota:inbound_average=10240 $ nova flavor-key m1.small set quota:outbound_average=10240 Flavors can also be assigned to particular projects. By default, a flavor is public and available to all projects. Private flavors are only accessible to those on the access list and are invisible to other projects. To create and assign a private flavor to a project, run these commands: $ nova flavor-create --is-public false p1.medium auto 512 40 4 $ nova flavor-access-add 259d06a0-ba6d-4e60-b42d-ab3144411d58 86f94150ed744e08be565c2ff608eef9