A prewarm profile is the data one recorded workload read from one base snap. Boxes created from that snap, or from any snap forked from it, use the profile automatically on their first runs. Boost First Runs shows when and how to use one.
Commands
sys9 run prewarm record <name> --snap <base-snap-id> [--max-runtime <duration>] -- <command...>
sys9 run prewarm ls
sys9 run prewarm inspect <name-or-id>
sys9 run prewarm enable <name-or-id>
sys9 run prewarm disable <name-or-id>
sys9 run prewarm stop <name-or-id>
sys9 run prewarm rm <name-or-id>
Record
--snapnames the exact base. It must be anavailablesnap that is not attached to a box.--max-runtimedefaults to1mand accepts1sto12h. It counts only the time the workload runs.- The workload’s output streams to your terminal, so
recordrejects--json. - After a normal exit, an error exit, the runtime limit, or
Ctrl+C, the CLI keeps waiting until the recorded data is saved and installed.
Exit codes follow the workload: its own non-zero code is returned as is, Ctrl+C returns 130, and reaching --max-runtime counts as success once the profile is ready.
States
recording: the workload is running.finalizing: the workload ended and its recorded data is being saved.ready: the profile can be used. A new profile is enabled as soon as it is ready.error: saving failed. Record again with the same name and base.
Which profile a box uses
A box uses a profile when the profile is ready, enabled, and recorded on the box’s source snap or on one of that snap’s ancestors. With several candidates, the closest ancestor wins. Snaps on other branches of the fork tree never match.
Data that a later fork wrote itself is not part of the profile and is read the normal way.
Manage
enableturns a profile on and installs its data on the hosts currently serving your org.disablestops new execs from using it at once.stopends a running recording from any terminal and keeps what was collected.rmremoves areadyorerrorprofile. Stop a running recording and let it finish first.
A base snap cannot be deleted while a profile is recorded on it. rm keeps the snap and frees it for deletion.
Output
ls prints one line per profile with its state, whether it is enabled, how many hosts have it, the use count, and the last use. inspect adds the base snap, recorded size, and any per-host install error. ls, inspect, enable, and disable support --json.