While trying to create a Virtual Machine instance on OpenStack, we encountered the error as shown below:
Quota exceeded for instances: Requested 1, but already used 10 of 10 instances (HTTP 403) (Request-ID: req-66d43488-7dea-45c4-822c-fdfab94289c8)
The “Quota exceeded for instances” error is to mean the default OpenStack quota of 10 instances or custom figure has been reached. It also mean you will not be able to create more instances.
To fix this error, you can either increase quota for instances or delete some existing instances to lower quantity. See example below that will increase the limit from 10 to 20 instances.
openstack quota set --instances 20 <PROJECT_ID>
This is a temporary solution. Since admin
project should be able to run unlimited number of instances and create other resources, we will disable quotas for the admin project.
The Quotas that will be disabled are:
- Instances Quotas
- Floating IPs Quotas
- CPU Cores and RAM quotas
- Disk and Volume Quotas
- Security groups and security rule quotas
To set unlimited quotas for these key items, we run the commands below.
openstack quota set --instances -1 admin
openstack quota set --floating-ips -1 admin
openstack quota set --cores -1 admin
openstack quota set --ram -1 admin
openstack quota set --gigabytes -1 admin
openstack quota set --volumes -1 admin
openstack quota set --secgroups -1 admin
openstack quota set --secgroup-rules -1 admin
openstack quota set --snapshots -1 admin
openstack quota set --backups -1 admin
openstack quota set --routers -1 admin
openstack quota set --injected-files -1 admin
openstack quota set --backup-gigabytes -1 admin
Setting resource quotas to -1
effectively removes the limits. We consider this a more convenient way to assure there are unlimited quotas for the said project, such admin project.
You can replace admin with any other <PROJECT_ID>.
To verify Quota change after setting to -1
, run:
$ openstack quota show admin
+-----------------------+-------+
| Resource | Limit |
+-----------------------+-------+
| cores | -1 |
| instances | -1 |
| ram | -1 |
| volumes | -1 |
| snapshots | -1 |
| gigabytes | -1 |
| backups | -1 |
| volumes_iscsi | -1 |
| gigabytes_iscsi | -1 |
| snapshots_iscsi | -1 |
| volumes___DEFAULT__ | -1 |
| gigabytes___DEFAULT__ | -1 |
| snapshots___DEFAULT__ | -1 |
| groups | 10 |
| trunk | -1 |
| networks | 100 |
| ports | 500 |
| rbac_policies | 10 |
| routers | -1 |
| subnets | 100 |
| subnet_pools | -1 |
| fixed-ips | -1 |
| injected-file-size | 10240 |
| injected-path-size | 255 |
| injected-files | -1 |
| key-pairs | 100 |
| properties | 128 |
| server-groups | 10 |
| server-group-members | 10 |
| floating-ips | -1 |
| secgroup-rules | -1 |
| secgroups | -1 |
| backup-gigabytes | -1 |
| per-volume-gigabytes | -1 |
+-----------------------+-------+