.. _bind-flavor-image-to-host: ============================================================= How to deploy instances on certain host based on flavor/image ============================================================= .. index:: hypervisor, flavor, image, deploy instance, select host You can configure instances to be deployed on certain hosts based on what flavor user chooses when creating the instance. To do the same but based on the chosen image, you must configure the flavor(s) then limit end-users to use the image(s) only with these flavors (see the last step from this page). First, ensure that your OpenStack Nova configuration file (``nova.conf``) has the following section configured: .. code-block:: bash [filter_scheduler] enabled_filters = AggregateInstanceExtraSpecsFilter You can read more about the setting in the official `OpenStack documentation `_. 1. Create a "Host Aggregate" and add the target host(s) to it. .. code-block:: bash # Create the aggregate openstack aggregate create fleio-group # Add your specific hypervisor(s) to it openstack aggregate add host fleio-group compute-node-01 2. Give this "Host Aggregate" group a unique property (key-value pair) that the scheduler can look for. .. code-block:: bash # Set a custom metadata tag (e.g., 'fleio_only=true') openstack aggregate set --property fleio_only=true fleio-group The Host Aggregate would look like this: .. code-block:: bash openstack aggregate show fleio-group +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | availability_zone | None | | created_at | 2026-01-27T14:59:09.000000 | | deleted_at | None | | hosts | compute-node-01 | | id | 1 | | is_deleted | False | | name | fleio-group | | properties | fleio_only='true' | | updated_at | None | | uuid | 5de5b39a-9081-40b0-8f67-8f2fea18f989 | +-------------------+--------------------------------------+ 3. Now, edit the flavor properties and add that specific metadata. You must use the ``aggregate_instance_extra_specs:`` prefix so the scheduler knows to look at Host Aggregates. You can do so by going in Fleio Staff Panel -> Flavor edit page -> "Properties" tab; otherwise run the following command: .. code-block:: bash openstack flavor set --property aggregate_instance_extra_specs:fleio_only=true flavor-name Instances created with configured flavor(s) should now be deployed only on the hypervisor(s) from the group. 4. If you want instances created with certain image(s) to be deployed only on the group host(s) as well, you must go in Fleio Staff Panel -> Image details page -> "Flavors assignment" tab. Here, assign the flavor(s) or flavor groups to the image. To ensure end-users will not choose another flavor with these images, go in Staff Panel -> Settings -> "OpenStack" -> "Defaults" tab. Here, ensure that "Hide unassigned images on instance create" setting is checked.