Build a ready custom template, keep pool capacity warm, and create machines with explicit checkout modes.
This example builds a custom FastAPI template, creates a template warm pool,
waits for ready capacity, launches machines with prefer and require, then
drains the pool.
Template builds and template warm pools require microVM-runtime/private-beta
deployment support.
Use warm_pool_mode="prefer" when cold fallback is acceptable. Use
warm_pool_mode="require" when the request should fail with
warm_pool_unavailable instead of cold creating.
When stable moves, the pool records a rollout generation, drains old ready or
warming inventory, and fills the new build. Already claimed old-build
machines continue as normal machines.