There are currently two docs describing flavors in 'admin', which contain a lot of overlapping information. Fix this by keeping the configuration guide (how to create, delete, modify flavors) in 'admin', while moving the reference-style parts into 'user'. We cross-reference the two internally. Given that large chunks of this needed to be rewritten, we've taken the opportunity to fix a poor description for the RXTX factor, closing a longstanding bug in the process. Change-Id: Ia57c93ef1e72ccf134ba6fc7fcb85ab228d68a47 Closes-Bug: #1688054
4.3 KiB
Manage Flavors
Admin users can use the openstack flavor
command to customize and manage
flavors. To see information for this command, run:
$ openstack flavor --help
Command "flavor" matches:
flavor create
flavor delete
flavor list
flavor set
flavor show
flavor unset
Note
Configuration rights can be delegated to additional users by
redefining the access controls for
os_compute_api:os-flavor-manage
in
/etc/nova/policy.json
on the nova-api
server.
Note
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, watchdog behavior, random number generator device control, and instance VIF traffic control.
For information on the flavors and flavor extra specs, refer to /user/flavors
.
Create a flavor
List flavors to show the ID and name, the amount of memory, the amount of disk space for the root partition and for the ephemeral partition, the swap, and the number of virtual CPUs for each flavor:
$ openstack flavor list
To create a flavor, specify a name, ID, RAM size, disk size, and the number of vCPUs for the flavor, as follows:
$ openstack flavor create FLAVOR_NAME --id FLAVOR_ID \ --ram RAM_IN_MB --disk ROOT_DISK_IN_GB --vcpus NUMBER_OF_VCPUS
Note
Unique ID (integer or UUID) for the new flavor. If specifying 'auto', a UUID will be automatically generated.
Here is an example with additional optional parameters filled in that creates a public
extra_tiny
flavor that automatically gets an ID assigned, with 256 MB memory, no disk space, and one VCPU. The rxtx-factor indicates the slice of bandwidth that the instances with this flavor can use (through the Virtual Interface (vif) creation in the hypervisor):$ openstack flavor create --public m1.extra_tiny --id auto \ --ram 256 --disk 0 --vcpus 1 --rxtx-factor 1
If an individual user or group of users needs a custom flavor that you do not want other projects to have access to, you can change the flavor's access to make it a private flavor.
Add an example of how to do this
For a list of optional parameters, run this command:
$ openstack help flavor create
This should be migrated to the 'openstack' tool
After you create a flavor, assign it to a project by specifying the flavor name or ID and the project ID:
$ nova flavor-access-add FLAVOR TENANT_ID
In addition, you can set or unset
extra_spec
for the existing flavor. Theextra_spec
metadata keys can influence the instance directly when it is launched. If a flavor sets theextra_spec key/value quota:vif_outbound_peak=65536
, the instance's outbound peak bandwidth I/O should be less than or equal to 512 Mbps. There are several aspects that can work for an instance including CPU limits, Disk tuning, Bandwidth I/O, Watchdog behavior, and Random-number generator. For information about supporting metadata keys, seeflavors
.For a list of optional parameters, run this command:
$ nova help flavor-key
Modify a flavor
Delete a flavor
Delete a specified flavor, as follows:
$ openstack flavor delete FLAVOR_ID
Default Flavors
Previous versions of nova typically deployed with default flavors. This was removed from Newton. The following table lists the default flavors for Mitaka and earlier.
Flavor | VCPUs | Disk (in GB) | RAM (in MB) |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|