openstack-manuals/doc/user-guide-admin/section_cli_nova_manage_flavors.xml
Christian Berendt bbec5aa4d2 Unified the syntax of the XML root element (user-guide-admin)
The XML root element of Docbook XML files should match the following
format:

<ELEMENT xmlns="http://docbook.org/ns/docbook"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="5.0"
  xml:id="THE_XML_ID_OF_THE_ELEMENT">

Change-Id: If8d27898af12af2edc2d2d13557ec2365a241656
2014-07-09 21:25:59 +02:00

226 lines
8.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="cli_manage_flavors">
<?dbhtml stop-chunking?>
<title>Manage flavors</title>
<para>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 <quote>size</quote> of a virtual server
that can be launched.</para>
<note>
<para>Flavors can also determine on which compute host a flavor
can be used to launch an instance. For information
about customizing flavors, refer to the <link
xlink:href="http://docs.openstack.org/admin-guide-cloud/content/"
><citetitle>OpenStack Cloud Administrator Guide</citetitle></link>.</para></note>
<para>A flavor consists of the following parameters:</para>
<variablelist>
<varlistentry>
<term>Flavor ID</term>
<listitem>
<para>Automatically generated by OpenStack. For
private flavors, a value from 1 to 255.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Name</term>
<listitem>
<para>Name for the new flavor.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>VCPUs</term>
<listitem>
<para>Number of virtual CPUs to use.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Memory MB</term>
<listitem>
<para>Amount of RAM to use (in megabytes).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Root Disk GB</term>
<listitem>
<para>Amount of disk space (in gigabytes) to use for
the root (/) partition.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Ephemeral Disk GB</term>
<listitem>
<para>Amount of disk space (in gigabytes) to use for
the ephemeral partition. If unspecified, the value
is 0 by default.</para>
<para>Ephemeral disks offer machine local disk storage
linked to the life cycle 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.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Swap</term>
<listitem>
<para>Amount of swap space (in megabytes) to use. If
unspecified, the value is 0 by default.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The default flavors are:</para>
<informaltable rules="all" width="50%">
<col width="30%"/>
<col width="20%"/>
<col width="25%"/>
<col width="25%"/>
<thead>
<tr>
<th>Flavor</th>
<th>VCPUs</th>
<th>Disk (in GB)</th>
<th>RAM (in MB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<para>m1.tiny</para>
</td>
<td>
<para>1</para>
</td>
<td>
<para>1</para>
</td>
<td>
<para>512</para>
</td>
</tr>
<tr>
<td>
<para>m1.small</para>
</td>
<td>
<para>1</para>
</td>
<td>
<para>20</para>
</td>
<td>
<para>2048</para>
</td>
</tr>
<tr>
<td>
<para>m1.medium</para>
</td>
<td>
<para>2</para>
</td>
<td>
<para>40</para>
</td>
<td>
<para>4096</para>
</td>
</tr>
<tr>
<td>
<para>m1.large</para>
</td>
<td>
<para>4</para>
</td>
<td>
<para>80</para>
</td>
<td>
<para>8192</para>
</td>
</tr>
<tr>
<td>
<para>m1.xlarge</para>
</td>
<td>
<para>8</para>
</td>
<td>
<para>160</para>
</td>
<td>
<para>16384</para>
</td>
</tr>
</tbody>
</informaltable>
<para>You can create and manage flavors with the nova
<command>flavor-*</command> commands provided by the
<filename>python-novaclient</filename> package.</para>
<section xml:id="cli_create_flavor">
<title>Create a flavor</title>
<procedure>
<step>
<para>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.</para>
<screen><prompt>$</prompt> <userinput>nova flavor-list</userinput></screen>
</step>
<step>
<para>To create a flavor, specify a name, ID, RAM
size, disk size, and the number of VCPUs for the
flavor, as follows:</para>
<screen><prompt>$</prompt> <userinput>nova flavor-create <replaceable>FLAVOR_NAME</replaceable> <replaceable>FLAVOR_ID</replaceable> <replaceable>RAM_IN_MB ROOT_DISK_IN_GB</replaceable> <replaceable>NUMBER_OF_VCPUS</replaceable></userinput></screen>
<note>
<para>The flavor ID is a number from 1 to 255 and
cannot contain special characters or
spaces.</para>
</note>
<para>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).</para>
<screen><prompt>$</prompt> <userinput>nova flavor-create --is-public true m1.extra_tiny auto 256 0 1 --rxtx-factor .1</userinput></screen>
<para>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 <link
xlink:href="http://docs.openstack.org/openstack-ops/content/private-flavors.html">
Private Flavors in the OpenStack Operations Guide
</link>.</para>
<para>For a list of optional parameters, run this
command:</para>
<screen><prompt>$</prompt> <userinput>nova help flavor-create</userinput></screen>
</step>
<step>
<para>After you create a flavor, assign it to a
project by specifying the flavor name or ID and
the tenant ID:</para>
<screen><prompt>$</prompt> <userinput>nova flavor-access-add <replaceable>FLAVOR</replaceable> <replaceable>TENANT_ID</replaceable></userinput></screen>
</step>
</procedure>
</section>
<section xml:id="cli_delete_flavor">
<title>Delete a flavor</title>
<procedure>
<step>
<para>Delete a specified flavor, as follows:</para>
<screen><prompt>$</prompt> <userinput>nova flavor-delete <replaceable>FLAVOR_ID</replaceable></userinput></screen>
</step>
</procedure>
</section>
</section>