Moving (copying) Admin User Guide CLI content to the Cloud Admin Guide as a part of the reorganization goal. This patch does not include any new or original content. This patch is Part 1 to create a new command- line client section for Admin Users in the Cloud Admin Guide, as disucssed in the User Guide Specialty team meetings. 1) Creating a new CLI section with cli.rst 2) Moving the non common files from user-guide-admin to admin-guide-cloud, along with their sub files. (Rename user-guide-admin files to user cli_ prefix in admin- guide-cloud.) manage_projects_users_and_roles.rst nova_cli_manage_projects_security.rst cli_manage_services.rst cli_manage_shares.rst cli_manage_flavors.rst cli_admin_manage_environment.rst cli_set_quotas.rst analyzing-log-files-with-swift-cli.rst cli_cinder_scheduling.rst 3) Attempt updates to several links. Change-Id: I97f4ced4f5033c7e0f3bf00c410288a75699d110 Implements: blueprint user-guides-reorganised
4.6 KiB
Manage flavors
In OpenStack, flavors define the compute, memory, and storage
capacity of nova computing instances. To put it simply, a flavor is an
available hardware configuration for a server. It defines the
size
of a virtual server that can be launched.
Note
Flavors can also determine on which compute host a flavor can be used to launch an instance. For information about customizing flavors, refer to Flavors.
A flavor consists of the following parameters:
- Flavor ID
-
Unique ID (integer or UUID) for the new flavor. If specifying 'auto', a UUID will be automatically generated.
- Name
-
Name for the new flavor.
- VCPUs
-
Number of virtual CPUs to use.
- Memory MB
-
Amount of RAM to use (in megabytes).
- Root Disk GB
-
Amount of disk space (in gigabytes) to use for the root (/) partition.
- Ephemeral Disk GB
-
Amount of disk space (in gigabytes) to use for the ephemeral partition. If unspecified, the value is 0 by default. Ephemeral disks offer machine local disk storage linked to the lifecycle of a VM instance. When a VM is terminated, all data on the ephemeral disk is lost. Ephemeral disks are not included in any snapshots.
- Swap
-
Amount of swap space (in megabytes) to use. If unspecified, the value is 0 by default.
The default flavors are:
Flavor | VCPUs | Disk (in GB) | RAM (in MB) |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
You can create and manage flavors with the nova
flavor-* commands provided by the
python-novaclient
package.
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:
$ nova flavor-list
To create a flavor, specify a name, ID, RAM size, disk size, and the number of VCPUs for the flavor, as follows:
$ nova flavor-create FLAVOR_NAME FLAVOR_ID RAM_IN_MB ROOT_DISK_IN_GB 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):$ nova flavor-create --is-public true m1.extra_tiny auto 256 0 1 --rxtx-factor .1
If an individual user or group of users needs a custom flavor that you do not want other tenants to have access to, you can change the flavor's access to make it a private flavor. See Private Flavors in the OpenStack Operations Guide.
For a list of optional parameters, run this command:
$ nova help flavor-create
After you create a flavor, assign it to a project by specifying the flavor name or ID and the tenant 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 LTE 512 Mbps. There are several aspects that can work for an instance includingCPU limits
,Disk tuning
,Bandwidth I/O
,Watchdog behavior
, andRandom-number generator
. For information about supporting metadata keys, see Flavors.For a list of optional parameters, run this command:
$ nova help flavor-key
Delete a flavor
Delete a specified flavor, as follows:
$ nova flavor-delete FLAVOR_ID