Overview
The Xloud Compute scheduler determines which hypervisor node receives every new instance, resize, live migration, evacuate, and unshelve request. It runs a two-phase pipeline: filters eliminate hosts that don’t meet requirements, then weighers rank the survivors and the top-scoring host wins. Administrators control this pipeline vianova.conf, flavor extra specs, host aggregate metadata, and scheduler hints.
- Admin credentials sourced from
admin-openrc.sh - XDeploy admin access for nova.conf changes (requires service redeploy)
- Understanding of host aggregates and flavors
How the Scheduler Works
- Prefilters query the Placement service to reduce the candidate set before the main pipeline runs
- Filters evaluate each remaining host — a host is eliminated if it fails any single filter
- Weighers assign a numeric score to each surviving host
- The scheduler randomly picks one host from the top
host_subset_sizehosts (default: 1)
Prefilters
Prefilters run before the filter chain and reduce candidate hosts via the Placement service. They are faster than regular filters because they cut candidates early.| Prefilter | Enabled By | Description |
|---|---|---|
| Compute Disabled Status | Always active | Excludes hosts with COMPUTE_STATUS_DISABLED trait — mirrors the enabled/disabled state of nova-compute services |
| Image Type Support | [scheduler] query_placement_for_image_type_support = True | Excludes hosts that don’t support the image’s disk format (e.g., hosts using Ceph backend cannot use QCOW2 images without expensive conversion) |
| Isolate Aggregates | [scheduler] query_placement_for_traits_in_extra_specs = True | Flavor and image traits must match aggregate metadata requirements before entering the main filter chain |
Scheduler Filters
Filters are configured innova.conf under [filter_scheduler]:
Core Filters
ComputeFilter
ComputeFilter
nova-compute service is operational and enabled. This filter should always be in enabled_filters — without it, instances may be scheduled to unreachable or disabled nodes.ComputeCapabilitiesFilter
ComputeCapabilitiesFilter
capabilities: namespace prefix in extra specs:| Operator | Meaning | Example |
|---|---|---|
= | Greater than or equal (numeric) | =4 |
== | Exact match | ==kvm |
!= | Not equal | !=xen |
>= | Greater than or equal | >=8 |
<= | Less than or equal | <=16 |
s== | String equal (default) | s==kvm |
<in> | Substring match | <in>intel |
<all-in> | All values present | <all-in>avx,sse4 |
<or> | One of a list | <or>kvm <or>qemu |
free_ram_mb, free_disk_mb, host, hypervisor_type, hypervisor_version, num_instances, num_io_ops, vcpus_total, vcpus_usedImagePropertiesFilter
ImagePropertiesFilter
| Image Property | Description | Example Value |
|---|---|---|
hw_architecture | Required CPU architecture | x86_64, aarch64, ppc64le |
img_hv_type | Required hypervisor type | qemu (covers KVM and QEMU) |
img_hv_requested_version | Minimum hypervisor version | >=6000 |
hw_vm_mode | Required VM ABI mode | hvm, xen, exe |
NUMATopologyFilter
NUMATopologyFilter
PciPassthroughFilter
PciPassthroughFilter
nova.conf and request them via flavor extra specs.Server Group Filters
ServerGroupAffinityFilter
ServerGroupAffinityFilter
ServerGroupAntiAffinityFilter
ServerGroupAntiAffinityFilter
openstack server show app-1 -f value -c OS-EXT-SRV-ATTR:host and openstack server show app-2 -f value -c OS-EXT-SRV-ATTR:host should show different hosts.Aggregate-Based Filters
AggregateInstanceExtraSpecsFilter
AggregateInstanceExtraSpecsFilter
aggregate_instance_extra_specs: prefix against host aggregate metadata. The host must belong to an aggregate with matching metadata.AggregateIoOpsFilter
AggregateIoOpsFilter
nova.conf or per-aggregate via metadata:filter_scheduler.max_io_ops_per_host (default: 8). Uses the minimum value if the host belongs to multiple aggregates.AggregateNumInstancesFilter
AggregateNumInstancesFilter
filter_scheduler.max_instances_per_host (default: 50).AggregateMultiTenancyIsolation
AggregateMultiTenancyIsolation
filter_tenant_id are reserved for those tenants only. Hosts outside such aggregates serve all tenants.AggregateTypeAffinityFilter
AggregateTypeAffinityFilter
instance_type metadata on the aggregate to a flavor name or comma-separated list:Placement Hint Filters
SameHostFilter
SameHostFilter
same_host scheduler hint:DifferentHostFilter
DifferentHostFilter
different_host:SimpleCIDRAffinityFilter
SimpleCIDRAffinityFilter
IsolatedHostsFilter
IsolatedHostsFilter
nova.conf:Other Filters
IoOpsFilter
IoOpsFilter
filter_scheduler.max_io_ops_per_host (default: 8) concurrent I/O-intensive tasks. Counted task states: build, resize, snapshot, migrate, rescue, unshelve.NumInstancesFilter
NumInstancesFilter
filter_scheduler.max_instances_per_host (default: 50) running instances.MetricsFilter
MetricsFilter
MetricsWeigher. Filters hosts that are not reporting the metrics specified in [metrics] weight_setting, preventing weigher failures from missing data.AllHostsFilter
AllHostsFilter
Scheduler Weighers
Weighers assign a numeric score to each host that passed the filter chain. The final weight is the sum of all weighted scores:nova.conf:
Weigher Reference
| Weigher | Default Multiplier | Default Behavior | Negative Multiplier Effect |
|---|---|---|---|
RAMWeigher | 1.0 | Spread — prefer hosts with most free RAM | Stack — fill hosts before using new ones |
CPUWeigher | 1.0 | Spread — prefer hosts with most free vCPUs | Stack — maximize vCPU density |
DiskWeigher | 1.0 | Spread — prefer hosts with most free disk | Stack — fill disk before moving on |
IoOpsWeigher | -1.0 | Prefer lighter workload hosts | Prefer heavier workload hosts |
PCIWeigher | 1.0 | Prefer hosts with matching PCI devices | (positive only — do not set negative) |
MetricsWeigher | Configured via [metrics] | Custom metric-based ranking | Inverts metric preference |
ServerGroupSoftAffinityWeigher | 1.0 | Pack group members on same host | (positive only) |
ServerGroupSoftAntiAffinityWeigher | 1.0 | Spread group members across hosts | (positive only) |
BuildFailureWeigher | 1000000.0 | Heavily penalizes hosts with recent build failures | — |
CrossCellWeigher | 1000000.0 | Prefer same cell for resize/migrate | Prefer different cell |
HypervisorVersionWeigher | 1.0 | Prefer newer hypervisor versions | Prefer older versions |
NumInstancesWeigher | 0.0 (inactive) | Inactive — set positive to pack, negative to spread | — |
BuildFailureWeigher and CrossCellWeigher have multipliers of 1,000,000 by default — intentionally enormous to override all resource-based weighers. Lower these values if hosts with transient failures are being overly penalized.Per-Aggregate Weigher Overrides
Most weighers support per-aggregate multiplier overrides (set as aggregate metadata). The scheduler uses the minimum value when a host belongs to multiple aggregates with different values:| Weigher | Aggregate Metadata Key |
|---|---|
| RAMWeigher | ram_weight_multiplier |
| CPUWeigher | cpu_weight_multiplier |
| DiskWeigher | disk_weight_multiplier |
| IoOpsWeigher | io_ops_weight_multiplier |
| PCIWeigher | pci_weight_multiplier |
| BuildFailureWeigher | build_failure_weight_multiplier |
| CrossCellWeigher | cross_cell_move_weight_multiplier |
| ServerGroupSoftAffinityWeigher | soft_affinity_weight_multiplier |
| ServerGroupSoftAntiAffinityWeigher | soft_anti_affinity_weight_multiplier |
Allocation Ratios (Overcommit)
Allocation ratios control resource overcommit — how many virtual resources can be assigned per physical resource unit. These are applied by the Placement service and affect available resource inventory.| Ratio | Xloud Default | Description |
|---|---|---|
cpu_allocation_ratio | 4.0 | Virtual CPUs per physical core |
ram_allocation_ratio | 1.0 | Virtual RAM per physical GB |
disk_allocation_ratio | 1.0 | Virtual disk per physical GB |
Manage Ratios via Placement API
Manage allocation ratios per compute node without anova.conf change using the osc-placement plugin:
Host Aggregates
Host aggregates group compute nodes by shared hardware characteristics, location, or policy. The scheduler uses aggregate metadata to steer workloads to specific host groups.- Dashboard
- CLI
Create a host aggregate
Availability Zones
Availability zones are user-visible logical groupings of hosts. Users select a zone at instance launch. All hosts default to thenova zone.
Compute Capabilities as Traits
nova-compute automatically reports COMPUTE_* traits to the Placement service based on the virt driver’s capabilities. These traits can be used in flavor or image requirements to steer scheduling.
Common traits reported automatically:
| Trait | Meaning |
|---|---|
COMPUTE_STATUS_DISABLED | Host is disabled (always-active prefilter excludes these) |
COMPUTE_NET_ATTACH_INTERFACE | Host supports attach/detach of network interfaces |
COMPUTE_VOLUME_MULTI_ATTACH | Host supports multi-attach volumes |
COMPUTE_TRUSTED_CERTS | Host supports trusted image certificates |
HW_CPU_X86_SVM | AMD-V hardware virtualization present |
CUSTOM_IMAGE_TYPE_RBD | Host supports native Ceph RBD image backend |
Configuration Reference
| Option | Default | Description |
|---|---|---|
filter_scheduler.enabled_filters | (see above) | Active filters in the pipeline |
filter_scheduler.host_subset_size | 1 | Top N hosts to randomly choose from |
filter_scheduler.max_io_ops_per_host | 8 | Max concurrent I/O tasks before filtering |
filter_scheduler.max_instances_per_host | 50 | Max instances before filtering |
filter_scheduler.track_instance_changes | true | Enable scheduler cache for instance changes |
filter_scheduler.shuffle_best_same_weighed_hosts | false | Randomize among equal-weight hosts |
filter_scheduler.ram_weight_multiplier | 1.0 | RAM weigher multiplier |
filter_scheduler.cpu_weight_multiplier | 1.0 | CPU weigher multiplier |
filter_scheduler.disk_weight_multiplier | 1.0 | Disk weigher multiplier |
filter_scheduler.io_ops_weight_multiplier | -1.0 | I/O ops weigher multiplier |
filter_scheduler.build_failure_weight_multiplier | 1000000.0 | Build failure penalty weigher |
scheduler.query_placement_for_image_type_support | false | Enable image type prefilter |
Troubleshooting
No valid host was found (NoValidHost)
No valid host was found (NoValidHost)
- Available hosts:
openstack compute service list— are all compute services up? - Quotas:
openstack quota show --project <id>— has the project hit a limit? - Flavor requirements: Does the requested flavor fit on any available host?
- Aggregate filters: Is the
AggregateInstanceExtraSpecsFilterblocking all hosts? - Scheduler logs:
docker logs nova_scheduler | grep "Filter.*rejected\|NoValidHost"
CPU microarchitecture mismatch during live migration
CPU microarchitecture mismatch during live migration
guest CPU doesn't match specification: missing featuresCause: cpu_mode = host-model or host-passthrough exposes native CPU features. Different physical CPUs on different hosts (e.g., Intel Icelake vs. Cascadelake) expose different feature sets.Fix: Configure a common CPU baseline across all compute nodes:Instances always land on the same host
Instances always land on the same host
host_subset_size = 1 means the highest-scoring host always wins.Fix: Increase host_subset_size to pick randomly from the top N hosts, or adjust weigher multipliers to produce more differentiated scores:Aggregate filter blocking all hosts unexpectedly
Aggregate filter blocking all hosts unexpectedly
AggregateInstanceExtraSpecsFilter is enabled and a flavor has aggregate_instance_extra_specs:key=value, only hosts in aggregates with that metadata can receive the instance.aggregate_instance_extra_specs: prefix from the extra spec.