Skip to content

Provisioning

Jackson Sá edited this page Oct 21, 2026 · 1 revision

aux provision (crates/aux-cli/src/provision.rs) sets a machine up from a provision file. Using it: Provisioning Virtual Machines. Reference: docs/provision.md.

  • Provision::parse reads YAML or JSON (unknown keys refused) and validates everything first: the version, the profile, host and user names, the enrollment token's shape, that a joining profile runs a node and names a user, the preferences (agentuxd::prefs::validate) and the policy (Policy::parse).
  • apply() works through a System trait (real: Host; tests record the calls): hostnamectl, agentux profile seed, the policy file, loginctl enable-linger, the user's preferences (owned by the user), runuser -u USER -- aux node enroll with the token and HOME in the environment, then systemctl --user --machine USER@.host enable --now agentuxd agentux-gateway.
  • run_auto() (the agentux-provision.service in agentux-os) skips a provisioned machine, loads qemu_fw_cfg, mounts a filesystem labelled AGENTUX read-only, takes the first source (kernel command line, fw_cfg, the media, /boot, /etc), applies it, records /var/lib/agentux/provisioned.json and deletes a spent file in /boot or /etc.

Clone this wiki locally