Skip to content

Scheduler

The scheduler decides which hypervisor and storage pool a provisioning request lands on. It is capacity- and capability-aware and never over-commits a node.

Inputs

  • Plan (CPU, memory, disk, network, storage tier).
  • Location.
  • Image (and its provider template mappings).
  • Hypervisor capabilities and free capacity.
  • Storage placement filters.

How a placement is made

  1. Filter hypervisors by enabled state, maintenance, location, capability superset and free capacity.
  2. Filter storage pools by enabled/schedulable/health, provider accessibility, capability superset, tier and free capacity (with overcommit).
  3. Score candidates: free capacity, tier priority, health and image locality.
  4. Reserve capacity and the VMID, then commit the whole pre-provider state atomically (see Provisioning).

Inspect a decision

php artisan pterocloud:scheduler:simulate --plan=<uuid> --location=<uuid> --image=<uuid>
php artisan pterocloud:provision:dry-run --plan=<uuid> --location=<uuid> --image=<uuid>

Both are read-only and create nothing.