In the case of a private Cloud, we recently had to create specific Nova flavors for one tenant, and didn’t want to expose this flavor to all tenants.
First of all, you need to know that by default only the “admin” tenant can manage flavors because of default policy in Nova :
"compute_extension:flavormanage": "rule:admin_api"
If you want to let the possibility to all tenants to create flavors, you can delete the rule to have :
"compute_extension:flavormanage": ""
Now we are going to create a flavor :
nova flavor-create flavor-name flavor-ID RAM-in-MB root-disk-in-GB VCPUs-number
--ephemeral ephemeral-disk-in-GB --swap swap-in-MB --is-public False
Example :
nova flavor-create enocloud-xxl 50 32 200 8 --is-public False
The next step is to associate the flavor to the tenant :
nova flavor-access-add <flavor-id> <tenant-id>
Example :
nova flavor-access-add 50 4f1b0b9ce3354a439db8ef10cf456d6f
Hope that helps !
Is it necessary (haven’t tried it yet) to remove the admin restriction to create non-public flavors?