| 264 | == Adding a Flavor == |
| 265 | |
| 266 | Use the flavor-create subcommand of nova : nova flavor-create <ID> <RAM in MB> <disk space in GB> <num virtual cores> |
| 267 | |
| 268 | {{{ |
| 269 | nova flavor-create m1.super 7 32768 160 16 |
| 270 | nova flavor-list |
| 271 | +--------------------------------------+------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ |
| 272 | | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs | |
| 273 | +--------------------------------------+------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ |
| 274 | | 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} | |
| 275 | | 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} | |
| 276 | | 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} | |
| 277 | | 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} | |
| 278 | | 6 | default-vm | 2048 | 20 | 0 | | 1 | 1.0 | True | {} | |
| 279 | | 7 | m1.super | 32768 | 160 | 0 | | 16 | 1.0 | True | {} | |
| 280 | | 76b049db-7f84-4fa0-8202-a31432af34d7 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} | |
| 281 | +--------------------------------------+------------+-----------+------+-----------+------+-------+-------------+-----------+-------------+ |
| 282 | }}} |
| 283 | |
| 284 | == Managing Quotas == |
| 285 | Openstack enforces quotas at the slice (project) level and at the server level. |
| 286 | |
| 287 | To view the default quotas, use the following command: |
| 288 | {{{ |
| 289 | source /etc/novarc |
| 290 | nova quota-defaults |
| 291 | }}} |
| 292 | |
| 293 | To update the default quota, use the following command: |
| 294 | {{{ |
| 295 | nova quota-class-update --key value default |
| 296 | }}} |
| 297 | See here for more details: |
| 298 | http://docs.openstack.org/user-guide-admin/content/cli_set_quotas.html |
| 299 | |
| 300 | There is also a notion of absolute limits on quota. The default quota |
| 301 | cannot exceed the absolute limits. |
| 302 | To view the absolute limit quota, use the following command: |
| 303 | {{{ |
| 304 | nova absolute-limits |
| 305 | }}} |
| 306 | |
| 307 | To change the value of the absolute-limits you must edit /etc/nova/nova.conf on the control node and restart the nova-api service. |
| 308 | For example, you can add these lines to set the number of cores and RAM: |
| 309 | {{{ |
| 310 | quota_ram=512000 |
| 311 | quota_cores=150 |
| 312 | }}} |
| 313 | |
| 314 | Further, there is a notion of overcommitting in OpenStack and this too has a limit. |
| 315 | See here for details: http://docs.openstack.org/openstack-ops/content/compute_nodes.html |
| 316 | |