Atom feed of this document
 

 File format for nova.conf

 Overview

The Compute service supports a large number of configuration options. These options are specified in the /etc/nova/nova.conf configuration file.

The configuration file is in INI file format, with options specified as key=value pairs, grouped into sections. Almost all configuration options are in the DEFAULT section. For example:

[DEFAULT]
debug=true
verbose=true

[trusted_computing]
server=10.3.4.2

 Types of configuration options

Each configuration option has an associated type that indicates which values can be set. The supported option types are:

BoolOpt

Boolean option. Value must be either true or false . Example:

debug=false
StrOpt

String option. Value is an arbitrary string. Example:

my_ip=10.0.0.1
IntOption

Integer option. Value must be an integer. Example:

glance_port=9292
MultiStrOpt

String option. Same as StrOpt, except that it can be declared multiple times to indicate multiple values. Example:

ldap_dns_servers=dns1.example.org
ldap_dns_servers=dns2.example.org
ListOpt

List option. Value is a list of arbitrary strings separated by commas. Example:

enabled_apis=ec2,osapi_compute,metadata
FloatOpt

Floating-point option. Value must be a floating-point number. Example:

ram_allocation_ratio=1.5
[Important]Important

Do not specify quotes around Nova options.

 Sections

Configuration options are grouped by section. The Compute configuration file supports the following sections.

[DEFAULT]

Contains most configuration options. If the documentation for a configuration option does not specify its section, assume that it appears in this section.

[cells]

Use options in this section to configure cells functionality. For details, see the Cells section (../config-reference/content/section_compute-cells.html) in the OpenStack Configuration Reference.

[baremetal]

Use options in this section to configure the baremetal hypervisor driver.

[conductor]

Use options in this section to configure the nova-conductor service.

[trusted_computing]

Use options in this section to configure the trusted computing pools functionality and how to connect to a remote attestation service.

 Variable substitution

The configuration file supports variable substitution. After you set a configuration option, it can be referenced in later configuration values when you precede it with $. This example defines my_ip and then uses $my_ip as a variable:

my_ip=10.2.3.4
glance_host=$my_ip
metadata_host=$my_ip

If you need a value to contain the $ symbol, escape it with $$. For example, if your LDAP DNS password was $xkj432, specify it, as follows:

ldap_dns_password=$$xkj432

The Compute code uses the Python string.Template.safe_substitute() method to implement variable substitution. For more details on how variable substitution is resolved, see http://docs.python.org/2/library/string.html#template-strings and http://www.python.org/dev/peps/pep-0292/.

 Whitespace

To include whitespace in a configuration value, use a quoted string. For example:

ldap_dns_passsword='a password with spaces'

 Define an alternate location for nova.conf

All nova-* services and the nova-manage command-line client load the configuration file. To define an alternate location for the configuration file, pass the --config-file /path/to/nova.conf parameter when you start a nova-* service or call a nova-manage command.

Log a bug against this page


loading table of contents...