OpenStack provides a feature called scheduler hints that allow a user to inform the scheduler where they desire their instance to run.
Policies available to use:
- Affinity (same host using server groups)
- Anti-affinity (different hosts using server groups)
- DifferentHost (using instance UUIDs)
- SameHost (using instance UUIDs)
More documentation on how to use these filters is available upstream at: https://docs.openstack.org/ocata/config-reference/compute/schedulers.html#servergroupaffinityfilter