why newly created flavor do not appear in `nova flavor-list` command ?
Issue
- If anyone create private flavor then, it do not appear in "nova flavor-list" command but, it appears if we pass "--all" flag with the command. Also, we cant use flavor name while creating instance but, it accepts the flavor ID.
[root@controller ~(keystone_admin)]# nova flavor-create --is-public False test1234 21 2048 20 1
+----+----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+----------+-----------+------+-----------+------+-------+-------------+-----------+
| 21 | test1234 | 2048 | 20 | 0 | | 1 | 1.0 | False |
+----+----------+-----------+------+-----------+------+-------+-------------+-----------+
[root@controller ~(keystone_admin)]# nova flavor-list
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 39914232-72dc-4904-a4bc-8b58a7f8bf68 | pbandark_test | 1024 | 50 | 2 | 500 | 1 | 1.0 | False |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
But, "test1234" flavor appears if we pass "--all" flag with "nova flavor-list" command.
[root@controller ~(keystone_admin)]# nova flavor-list --all
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 21 | test1234 | 2048 | 20 | 0 | | 1 | 1.0 | False | <======
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 39914232-72dc-4904-a4bc-8b58a7f8bf68 | pbandark_test | 1024 | 50 | 2 | 500 | 1 | 1.0 | False |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+--------------------------------------+---------------+-----------+------+-----------+------+-------+-------------+-----------+
====
If we try to create any instance using flavor Name:
[root@controller ~(keystone_admin)]# nova boot --flavor test1234 --image cb272dd7-a9a8-41ab-bf25-5f791acc60e7 test_vm
ERROR: No flavor with a name or ID of 'test1234' exists.
Operation is successful if we create instance using flavor ID:
[root@controller ~(keystone_admin)]# nova boot --flavor 21 --image cb272dd7-a9a8-41ab-bf25-5f791acc60e7 --nic net-id=2190cc4c-e837-4a50-b207-81d68b7d15b8 test_vm
+--------------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------------+--------------------------------------+
| OS-EXT-STS:task_state | scheduling |
| image | RHEL |
| OS-EXT-STS:vm_state | building |
[...]
Environment
- Red Hat Open Stack
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.