Installing and Configuring OpenStack (Juno) in Oracle® Solaris

Exit Print View

Updated: June 2016
 
 

Modifying Flavor Specifications

Under the Actions column for each flavor, clicking one of the first three options displays that flavor's properties as well as enables you to modify the properties. Three actions are available:

  • Edit Flavor displays information about the flavor and the properties that can be modified. With the Flavor Access tab, you can restrict which project can access the flavor. The default setting is none, which means that the flavor is public and all projects can access it.

  • Modify Access directly opens the flavor's Flavor Access tab so you can modify the access setting.

  • Update Metadata enables you to modify the flavor's metadata.

Not all flavor modifications can be performed on the dashboard. For example, the keys of the extra_specs property can only be revised with the command line. The property's keys refer to a set of zone properties that are typically configured with the zonecfg command and which are supported in OpenStack.

The following keys are supported in both kernel zones and non-global zone flavors:

  • zonecfg:bootargs

  • zonecfg:brand

  • zonecfg:hostid

  • zonecfg:cpu-arch

The following keys are supported only in non-global zone flavors:

  • zonecfg:file-mac-profile

  • zonecfg:fs-allowed

  • zonecfg:limitpriv

For a description of these zone configuration properties, see the zonecfg(1M) man page.


Note -  Not all zone configuration properties are supported in OpenStack.

The sc_profile key is also modifiable only from the command line. You use this key to specify a system configuration profile for the flavor.

To modify a flavor from the command line, use the following syntax:

nova flavor-key flavor action key=value [key=value ...]

flavor

The name or ID of the flavor.

action

set or unset

key=value

The key is the name of the spec. The value is the new value for that spec. If the action is unset, specify only the key.

For example, to set a specific system configuration file for the eighth flavor in the flavor list (Oracle Solaris kernel zone - large), you would issue the following command:

$ nova flavor-key 4 set sc_profile=/system/volatile/profile/sc_profile.xml

For information about deleting and creating flavors, see the OpenStack Admin User Guide.

How to Modify a Flavor's extra_specs Property

  1. Set the global shell variables for Neutron.
    controller# export OS_USERNAME=nova
    controller# export OS_PASSWORD=service-password
    controller# export OS_TENANT_NAME=service
    controller# export OS_AUTH_URL=http://$CONTROLLER_ADMIN_NODE:5000/v2.0
  2. Display the available flavors.
    controller# nova flavor-list
  3. Note the ID of the flavor you are modifying.
  4. Modify that flavor's extra_specs's key.
    controller# nova flavor-key flavor action es-key=value

    where es-key refers to the specific key of the extra_specs property.

  5. (Optional) Display the properties of the flavor.
Example 5  Changing the zonecfg:bootargs Key

This example shows how to modify the zonecfg:bootargs key of the Oracle Solaris non-global zone - medium flavor, whose ID is 8.

To conserve space, the RTX_Factor and Is_Public columns are elided from the following nova flavor-list sample output.

controller# nova flavor-list
+----+-----------------------------------------+-----------+------+-----------+------+-------+
| ID | Name                                    | Memory_MB | Disk | Ephemeral | Swap | VCPUs |
+----+-----------------------------------------+-----------+------+-----------+------+-------+
| 1  | Oracle Solaris kernel zone - tiny       | 2048      | 10   | 0         |      | 1     |
| 10 | Oracle Solaris non-global zone - xlarge | 16384     | 80   | 0         |      | 32    |
| 2  | Oracle Solaris kernel zone - small      | 4096      | 20   | 0         |      | 4     |
| 3  | Oracle Solaris kernel zone - medium     | 8192      | 40   | 0         |      | 8     |
| 4  | Oracle Solaris kernel zone - large      | 16384     | 40   | 0         |      | 16    |
| 5  | Oracle Solaris kernel zone - xlarge     | 32768     | 80   | 0         |      | 32    |
| 6  | Oracle Solaris non-global zone - tiny   | 2048      | 10   | 0         |      | 1     |
| 7  | Oracle Solaris non-global zone - small  | 3072      | 20   | 0         |      | 4     |
| 8  | Oracle Solaris non-global zone - medium | 4096      | 40   | 0         |      | 8     |
| 9  | Oracle Solaris non-global zone - large  | 8192      | 40   | 0         |      | 16    |
+----+-----------------------------------------+-----------+------+-----------+------+-------+

controller# nova flavor-key 8 set zonecfg:bootargs=-v
controller# nova flavor-show 8

+----------------------------+-----------------------------------------+
| Property                   | Value                                   |
+----------------------------+-----------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                   |
| OS-FLV-EXT-DATA:ephemeral  | 0                                       |
| disk                       | 40                                      |
| extra_specs                | {"zonecfg:brand": "solaris"}            |
|                            |    u'zonecfg:bootargs': u'-v'}          |bootargs modified
| id                         | 8                                       |
| name                       | Oracle Solaris non-global zone - medium |
| os-flavor-access:is_public | True                                    |
| ram                        | 4096                                    |
| rxtx_factor                | 1.0                                     |
| swap                       |                                         |
| vcpus                      | 8                                       |
+----------------------------+-----------------------------------------+