so orignally you ask for a way to not do this via flavor so i provied 2 ways to do it via teh server creeate command using --host or via the az on a per instance baseis what your acully asking for is effectivly to do it vai the image we develope a feature precisly for the windows usecase https://docs.openstack.org/nova/latest/reference/isolate-aggregates.html you can do it via filter as well if you want too https://docs.openstack.org/nova/latest/admin/scheduling.html#aggregateimagep... but the recommend way to do this is to add a requried trait to the winwos images and use the placemet functionality to enforce it for you. https://specs.openstack.org/openstack/nova-specs/specs/train/implemented/pla... you can declaratively add the CUSTOM_LICENSED_WINDOWS trait to your compute nodes using the provider.yaml feature https://specs.openstack.org/openstack/nova-specs/specs/train/approved/provid... https://docs.openstack.org/nova/latest/admin/managing-resource-providers.htm... if you do not want to do that via the placement apias documetned in https://docs.openstack.org/nova/latest/reference/isolate-aggregates.html if nethigh of those options appeal you can use https://docs.openstack.org/nova/latest/admin/scheduling.html#aggregateimagep... the eexample is actully lightly wrong because it suggest using os_distro='windows' you shoudl be useing 'os_type=windows' since that is the image property that enable the hyperv enlightment to improve the performance of windows on qemu/kvm. https://github.com/openstack/glance/blob/master/etc/metadefs/compute-libvirt... os_distor is ment to be "|win2k25||"|i belvie for windows server 2025 with os_version holdign something more human readble if needed. although folk often just use human readbale names instead of the osinfo ones. https://gitlab.com/libosinfo/osinfo-db/-/tree/main/data/os/microsoft.com?ref... we are incorectly using os_disto to mathc on the hosrt id i belive. there are a couple of other ways to do this as well but isolate aggregates in placment and the aggregateimagepropertiesisolation filter are the two solutions that were built specific to adress the windows server licening usecase. On 11/12/2025 05:52, Andy Speagle wrote:
Yeah... I've done this before with flavors and was looking for a way to schedule instances using aggregates without the need to create more flavors that would pin instances to specific hosts.
The main use case here is that we have a number of windows server based instances that due to licensing need to normally be colocated on a few hypervisors... it would be nice to have a feature that would allow me to do this simply... this is all rather klunky.
On Wed, 2025-12-10 at 16:04 +0000, Sean Mooney wrote:
if you have admin ascess you can do that vai passing the host on server create or on move operations.
https://urldefense.us/v3/__https://docs.openstack.org/python-openstackclient...
https://urldefense.us/v3/__https://docs.openstack.org/api-ref/compute/*id11_...
https://urldefense.us/v3/__https://docs.openstack.org/nova/latest/reference/...
https://urldefense.us/v3/__https://specs.openstack.org/openstack/nova-specs/...
with the json filter you could also jsut match on the hypervior hostname or host filed in the hoststate object but its simpler to do it with the native supprot in stead of buildign it your self again in the jsonfilter.
there is also an older way to do this by abusing the AZ
the aviablity zone filed supprot <AZ>:<host>:<node> syntax
so you can just do `:<hostname>` for the az or "my_az:compute-42"
if you can create flavor that implies your an admin so you shoudl proably just use the host or hypervior_hostname fiels in the server create rerequest.
On 10/12/2025 15:23, Andy Speagle wrote:
Also... if this isn't "the way"... then I'm curious what is the correct path forward.
I'm using terraform to build up my infrastructure on openstack and I'm looking for a way to ensure instances are scheduled on specific hosts. Aggregates seemed the right way. I'd rather not have dozens of different flavors doing this work. Scheduler hints seemed to be the simplest way.
Thanks if advance for any advice.
On Wed, 2025-12-10 at 12:46 +0000, Sean Mooney wrote:
⚠️CAUTION⚠️ This email originated outside of Toyon's network. Do not download attachments or click links unless you know the content is safe.
the aggreates are populated in the hoststate object for usage by other filters and weighers the json filter was not designed to be used with them in general
it was intend for use with the other filed that don't have dynamic subscriptable content. i.e. where the key si not know ahead of time
the operations supprote dby it are basic comparsion that work on singal values with the excption fo in
https://urldefense.us/v3/__https://github.com/openstack/nova/blob/master/nov...
so you can check fi a instnce uuid is in the set of instnaces on a host that work becasue its a dict keyed by the instance uuid so in or container works since the aggreats are a list you cant check if a host aggregate is in the host aggregates list because you woudl have to construct a host aggret object for in to work
so as i said above aggregates are not supported by this filter as it was not part of its original design.
it was orginally inteded form matching onf files like hypervior_type or version https://urldefense.us/v3/__https://github.com/openstack/nova/blob/master/nov...
On 10/12/2025 01:43, Andy Speagle wrote:
Hey Team,
I'm trying to use scheduler hints using the JsonFilter that involve host aggregates. Based on the documentation and my quick perusal of the scheduler's HostState class... it seems like $aggregates are populated there for usage, but I can't seem to find the right magick to make a json query work to schedule an instance on a host that belongs to a specific aggregate based on simply the name of the aggregate... or perhaps metadata contained within.
I think my lack of understanding of the structure of the $aggregates list in the scheduler's HostState class is tripping me up.
Does anyone have any insight into this?...
Thanks.