Managing Compute Service Quotas

As an administrator, you can update the Compute service quotas for a specific project as well as update the quota defaults for a new project.

To view and update default quota values:

  1. List all default quotas for all projects.

    $ nova quota-defaults
    +-----------------------------+-------+
    | Quota                       | Limit |
    +-----------------------------+-------+
    | instances                   | 10    |
    | cores                       | 20    |
    | ram                         | 51200 |
    | floating_ips                | 10    |
    | fixed_ips                   | -1    |
    | metadata_items              | 128   |
    | injected_files              | 5     |
    | injected_file_content_bytes | 10240 |
    | injected_file_path_bytes    | 255   |
    | key_pairs                   | 100   |
    | security_groups             | 10    |
    | security_group_rules        | 20    |
    +-----------------------------+-------+
    
  2. Update a default value for a new project.

    $ nova quota-class-update --KEY VALUE default
    

To view quota values for an existing tenant:

   $ openstack quota show <PROJECT_ID>
   +-----------------------------+-------+
   | Quota                       | Limit |
   +-----------------------------+-------+
   | instances                   | 10    |
   | cores                       | 20    |
   | ram                         | 51200 |
   | floating_ips                | 10    |
   | fixed_ips                   | -1    |
   | metadata_items              | 128   |
   | injected_files              | 5     |
   | injected_file_content_bytes | 10240 |
   | injected_file_path_bytes    | 255   |
   | key_pairs                   | 100   |
   | security_groups             | 10    |
   | security_group_rules        | 20    |
   +-----------------------------+-------+

To update quota values for an existing tenant:

  1. Obtain the project ID you need.

    $ openstack project show <PROJECT_NAME>
    
  2. Update the quota value for the project.

    $ nova quota-update --floating-ips 20 <TENANT_ID>
    $ openstack quota show <PROJECT_ID>
    +-----------------------------+-------+
    | Quota                       | Limit |
    +-----------------------------+-------+
    | instances                   | 10    |
    | cores                       | 20    |
    | ram                         | 51200 |
    | floating_ips                | 20    |
    | fixed_ips                   | -1    |
    | metadata_items              | 128   |
    | injected_files              | 5     |
    | injected_file_content_bytes | 10240 |
    | injected_file_path_bytes    | 255   |
    | key_pairs                   | 100   |
    | security_groups             | 10    |
    | security_group_rules        | 20    |
    +-----------------------------+-------+
    

To view quota values for a project user:

   $ openstack quota show --user <USER_ID> <PROJECT_ID>
   +-----------------------------+-------+
   | Quota                       | Limit |
   +-----------------------------+-------+
   | instances                   | 10    |
   | cores                       | 20    |
   | ram                         | 51200 |
   | floating_ips                | 20    |
   | fixed_ips                   | -1    |
   | metadata_items              | 128   |
   | injected_files              | 5     |
   | injected_file_content_bytes | 10240 |
   | injected_file_path_bytes    | 255   |
   | key_pairs                   | 100   |
   | security_groups             | 10    |
   | security_group_rules        | 20    |
   +-----------------------------+-------+

To update quota values for a user:

   $ nova quota-update  --user <USER_ID> <QUOTA_NAME> <QUOTA_VALUE> <TENANT_ID>
   +-----------------------------+-------+
   | Quota                       | Limit |
   +-----------------------------+-------+
   | instances                   | 10    |
   | cores                       | 20    |
   | ram                         | 51200 |
   | floating_ips                | 12    |
   | fixed_ips                   | -1    |
   | metadata_items              | 128   |
   | injected_files              | 5     |
   | injected_file_content_bytes | 10240 |
   | injected_file_path_bytes    | 255   |
   | key_pairs                   | 100   |
   | security_groups             | 10    |
   | security_group_rules        | 20    |
   +-----------------------------+-------+

To display the current quota usage for a project user:

$ openstack limits show --absolute <PROJECT_ID>
+-------------------------+-------+
| Name                    | Value |
+-------------------------+-------+
| maxServerMeta           | 128   |
| maxPersonality          | 5     |
| maxImageMeta            | 128   |
| maxPersonalitySize      | 10240 |
| maxTotalRAMSize         | 51200 |
| maxSecurityGroupRules   | 20    |
| maxTotalKeypairs        | 100   |
| totalRAMUsed            | 0     |
| maxSecurityGroups       | 10    |
| totalFloatingIpsUsed    | 0     |
| totalInstancesUsed      | 0     |
| totalSecurityGroupsUsed | 0     |
| maxTotalFloatingIps     | 10    |
| maxTotalInstances       | 10    |
| totalCoresUsed          | 0     |
| maxTotalCores           | 20    |
+-------------------------+-------+