~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to doc/source/runnova/managing.instance.types.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
..
2
 
      Copyright 2011 Ken Pepple
3
 
 
4
 
      Licensed under the Apache License, Version 2.0 (the "License"); you may
5
 
      not use this file except in compliance with the License. You may obtain
6
 
      a copy of the License at
7
 
 
8
 
          http://www.apache.org/licenses/LICENSE-2.0
9
 
 
10
 
      Unless required by applicable law or agreed to in writing, software
11
 
      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
 
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
 
      License for the specific language governing permissions and limitations
14
 
      under the License.
15
 
 
16
 
Managing Instance Types and Flavors
17
 
===================================
18
 
 
19
 
You can manage instance types and instance flavors using the nova-manage command-line interface coupled with the instance_type subcommand for nova-manage.
20
 
 
21
 
What are Instance Types or Flavors ?
22
 
------------------------------------
23
 
 
24
 
Instance types describe the compute, memory and storage capacity of nova computing instances. In layman terms, this is the size (in terms of vCPUs, RAM, etc.) of the virtual server that you will be launching. In the EC2 API, these are called by names such as "m1.large" or "m1.tiny", while the OpenStack API terms these "flavors" with names like "512 MB Server".
25
 
 
26
 
In Nova, "flavor" and "instance type" are equivalent terms. When you create an EC2 instance type, you are also creating a OpenStack API flavor. To reduce repetition, for the rest of this document I will refer to these as instance types.
27
 
 
28
 
Instance types can be in either the active or inactive state:
29
 
  * Active instance types are available to be used for launching instances
30
 
  * Inactive instance types are not available for launching instances
31
 
 
32
 
In the current (Cactus) version of nova, instance types can only be created by the nova administrator through the nova-manage command. Future versions of nova (in concert with the OpenStack API or EC2 API), may expose this functionality directly to users.
33
 
 
34
 
Basic Management
35
 
----------------
36
 
 
37
 
Instance types / flavor are managed through the nova-manage binary with
38
 
the "instance_type" command and an appropriate subcommand. Note that you can also use
39
 
the "flavor" command as a synonym for "instance_types".
40
 
 
41
 
To see all currently active instance types, use the list subcommand::
42
 
 
43
 
    # nova-manage instance_type list
44
 
    m1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 3, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
45
 
    m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
46
 
    m1.tiny: Memory: 512MB, VCPUS: 1, Storage: 0GB, FlavorID: 1, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
47
 
    m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
48
 
    m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
49
 
 
50
 
By default, the list subcommand only shows active instance types. To see all instance types (inactive and active), use the list subcommand with the "--all" flag::
51
 
 
52
 
    # nova-manage instance_type list --all
53
 
    m1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 3, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
54
 
    m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
55
 
    m1.tiny: Memory: 512MB, VCPUS: 1, Storage: 0GB, FlavorID: 1, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
56
 
    m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
57
 
    m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
58
 
    m1.deleted: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB, inactive
59
 
 
60
 
To create an instance type, use the "create" subcommand with the following positional arguments:
61
 
 * memory (expressed in megabytes)
62
 
 * vcpu(s) (integer)
63
 
 * local storage (expressed in gigabytes)
64
 
 * flavorid (unique integer)
65
 
 * swap space (expressed in megabytes, defaults to zero, optional)
66
 
 * RXTX quotas (expressed in gigabytes, defaults to zero, optional)
67
 
 * RXTX cap (expressed in gigabytes, defaults to zero, optional)
68
 
 
69
 
The following example creates an instance type named "m1.xxlarge"::
70
 
 
71
 
    # nova-manage instance_type create m1.xxlarge 32768 16 320 0 0 0
72
 
    m1.xxlarge created
73
 
 
74
 
To delete an instance type, use the "delete" subcommand and specify the name::
75
 
 
76
 
    # nova-manage instance_type delete m1.xxlarge
77
 
    m1.xxlarge deleted
78
 
 
79
 
Please note that the "delete" command only marks the instance type as
80
 
inactive in the database; it does not actually remove the instance type. This is done
81
 
to preserve the instance type definition for long running instances (which may not
82
 
terminate for months or years). If you are sure that you want to delete this instance
83
 
type from the database, pass the "--purge" flag after the name::
84
 
 
85
 
    # nova-manage instance_type delete m1.xxlarge --purge
86
 
    m1.xxlarge purged