CLI reference¶
osw-builder exposes a single command through the osw-builder entry point.
capture_os¶
Build (if needed), register, capture, and optionally update an OS image.
osw-builder capture_os <os_name> [options] [--var <packer_args>...] [--before=<commit>]
Argument¶
<os_name>Name of the OS to capture. Must match a
name:field in the image catalogue (default_settings.yaml, possibly overridden byconfig.yaml).
Options¶
Option |
Description |
|---|---|
|
Display the usage message. |
|
Enable debug-level logging, including the resolved configuration block. |
|
libvirt connection URI. Default: |
|
Destroy the VM after the build completes. |
|
Apply branch updates ( |
|
Search for available updates ( |
|
Capture the IDLE state ( |
|
Enable network access during the build. |
|
Skip all neogit capture operations (no Neo4j/MinIO needed). |
|
neogit branch to commit to. |
|
Link the new build commit to an existing commit (used to chain captures). |
|
Extra Packer variables, repeatable. Example: |
Override precedence¶
The --updates, --search-updates, and --idle flags follow one rule: the CLI cannot re-enable something the catalogue explicitly disabled. If an image sets search_updates: false in its runtime_config, passing --search-updates=true has no effect. This protects images that are known not to support a given phase.
Examples¶
# Full pipeline
osw-builder capture_os win10-22h2-19045.2006
# Build and capture, no update search
osw-builder capture_os win10-22h2-19045.2006 --search-updates=false
# Build only, no capture
osw-builder capture_os ubuntu-22.04 --skip-neogit
# Extra Packer resources, debug logging
osw-builder capture_os ubuntu-22.04 --var cpus=4 -d