Profiles
A profile is one named (kernel, initrd, cmdline, guest_os) tuple in provium.toml. Tests pick a profile by name when they create a VM. This page covers the practical patterns.
The configuration field reference is on provium.toml. A profile can also build its own artifacts before booting rather than pointing at files already on disk — see Dynamic profiles.
When you need more than one profile #
For most projects, one profile is enough — peios, pointing at the latest build. You'd add more when:
- You're testing across kernel versions (
peios-stable,peios-mainline). - You want a debug build available for diagnosing failures (
peios-debug). - You're gating tests on a feature flag in the kernel (
peios-prefeatx,peios-postfeatx). - You're testing a port to a new architecture (
peios-arm64).
Declaring multiple profiles #
[]
= "/build/peios/bzImage"
= "/build/peios/initrd.cpio.gz"
= "console=ttyS0 quiet"
[]
= "/build/peios-debug/bzImage"
= "/build/peios-debug/initrd.cpio.gz"
= "console=ttyS0 debug loglevel=7 nokaslr"
[]
= "/build/peios-stable/bzImage"
= "/build/peios-stable/initrd.cpio.gz"
= "console=ttyS0 quiet"
Tests pick:
provium:
provium:
provium:
A test can mix profiles in the same file — useful for compatibility testing:
test
Profile choice patterns #
Default vs debug #
The most common split: a fast peios build for the default loop, and a peios-debug build with loglevel=7, nokaslr, and (probably) KASAN/UBSAN enabled. Use the debug profile when reproducing a kernel bug:
test
Cross-version compatibility #
Two profiles, one per release line. Ship a small handful of cross-version tests:
test
test
Tag these cross-version and gate via --no-tag cross-version in the dev loop. CI runs them on a nightly cadence with --include-slow.
Feature-flag gating #
Two profiles built from the same source with one feature toggled:
[]
= "/build/peios-prefeatx/bzImage" # FEATX disabled
# …
[]
= "/build/peios-postfeatx/bzImage" # FEATX enabled
# …
Tests that exercise FEATX-specific behaviour pick peios-postfeatx; regression tests run against both.
test
Per-VM cmdline overrides #
The profile's cmdline is the default; kernel_cmdline in vm:boot(opts) overrides it for one VM:
local vm = provium:
vm:
This is useful for one-off testing of cmdline-sensitive features. For cmdline configurations you use repeatedly, declare a dedicated profile.
Default profile selection #
A few CLI subcommands take an optional profile arg — when omitted, they fall back to "the first profile in provium.toml sorted by name":
| Subcommand | Behaviour |
|---|---|
provium repl --fixture <path> (no profile) | First profile by sorted name. |
provium fixture build <path> | Uses the first profile's kernel/initrd as the cache-key kernel inputs. |
To make the default predictable, name your most common profile so it sorts first alphabetically. aaa-default is ugly but it works; peios is fine when it's your only profile.
What happens to the cache when profiles change #
The fixture cache key folds in the kernel and initrd identifiers of every profile in provium.toml, sorted by name for determinism (the full key model is on fixtures and dependencies). Practical consequences for profile changes specifically:
| Action | Cache effect |
|---|---|
| Edit a kernel image (any profile) | Every fixture invalidates. |
| Edit an initrd image (any profile) | Every fixture invalidates. |
| Add a new profile | Every fixture invalidates (the new profile's kernel/initrd are folded in). |
| Remove a profile | Every fixture invalidates. |
| Rename a profile | Usually invalidates everything (the fold order follows profile names). |
Edit cmdline on a profile | Cache is unaffected (cmdline isn't in the key). |
Change cache_dir | Cache is unaffected — the new dir is just empty. |
This is deliberately conservative. A new profile means a new kernel could behave differently, so the existing fixtures might be subtly stale. Rather than guess, the harness rebuilds.
If you need to add a profile without invalidating the cache, you can't. Either accept the rebuild or use a sibling provium.toml with --config alt-config.toml.
Multi-arch profiles (preview) #
In v1, the QemuVmm backend invokes qemu-system-x86_64 exclusively — there's no per-profile arch field yet. To run on aarch64, you'd have to swap the binary at the harness level (not currently exposed).
When multi-arch lands, the profile is the natural place for an arch = "x86_64" / arch = "aarch64" field.
See also #
- provium.toml reference — every field.
- VMs and profiles —
provium:vm(name, profile, opts?). - Fixtures and dependencies — what triggers a fixture rebuild.