<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reference on Barn</title><link>https://barn.pgsty.com/v1.5/docs/reference/</link><description>Recent content in Reference on Barn</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 03 Dec 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://barn.pgsty.com/v1.5/docs/reference/index.xml" rel="self" type="application/rss+xml"/><item><title>Image Pipeline</title><link>https://barn.pgsty.com/v1.5/docs/reference/image-pipeline/</link><pubDate>Thu, 03 Dec 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/image-pipeline/</guid><description>&lt;p&gt;This page is for contributors who build Barn&amp;rsquo;s official Linux images; if you only use images, skip it. To share images of your own, &lt;a href="../../start/images/#build-a-static-repository"&gt;build a static repository&lt;/a&gt; instead.&lt;/p&gt;&#10;&lt;p&gt;The tools live under &lt;code&gt;packaging/image-pipeline/&lt;/code&gt; in the Barn source checkout. &lt;code&gt;build.sh&lt;/code&gt; turns one downloaded &lt;code&gt;qcow2&lt;/code&gt; with a known SHA-256 into a &lt;code&gt;testing&lt;/code&gt; candidate bundle, either validated as it is or normalized offline; &lt;code&gt;build-official.py&lt;/code&gt; runs it over the official matrix and assembles a candidate repository. The builder needs no network access or signing keys and leaves Barn&amp;rsquo;s runtime state alone. Its output then goes through live smoke tests and release review.&lt;/p&gt;</description></item><item><title>Self-hosted repositories and official signatures</title><link>https://barn.pgsty.com/v1.5/docs/reference/repository-signing/</link><pubDate>Thu, 03 Dec 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/repository-signing/</guid><description>&lt;p&gt;Share a lab repository by distributing its images and catalog. Barn 1.5.0 supports filename-based builds and ML-DSA-87 verification. Barn 1.4.0 uses &lt;code&gt;repo.yaml&lt;/code&gt; for builds and Minisign for official catalogs.&lt;/p&gt;&#10;&lt;h2 id="user-repository"&gt;Create and use a lab repository&#10;&lt;/h2&gt;&#10;&lt;p&gt;Place your images under &lt;code&gt;repo/images/&lt;/code&gt;, for example &lt;code&gt;lab-pg-1-arm64.qcow2&lt;/code&gt;. Run these commands on a host with &lt;code&gt;qemu-img&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-c4505e0b-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="bash" data-td-line-count="2"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-c4505e0b-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;barn repo build ./repo&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;barn up --repo ./repo -I lab-pg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;The first command writes &lt;code&gt;catalog.json&lt;/code&gt;. Barn takes the image name, version and architecture from each filename and defaults to UEFI. An existing &lt;code&gt;repo.yaml&lt;/code&gt; still selects the repository contents. A local repository can be unsigned and use your original image files.&lt;/p&gt;</description></item><item><title>Images</title><link>https://barn.pgsty.com/v1.5/docs/reference/images/</link><pubDate>Thu, 03 Dec 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/images/</guid><description>&lt;p&gt;Barn resolves Linux guest images from a static catalog and immutable &lt;code&gt;qcow2&lt;/code&gt; artifacts. Official and HTTP repositories require ML-DSA-87 catalog signatures, while explicitly selected local directory and HTTPS repositories may be unsigned. You can activate newer image catalogs with &lt;code&gt;barn update&lt;/code&gt; without replacing the &lt;code&gt;barn&lt;/code&gt; binary; the binary defines the trusted signing public keys and &lt;code&gt;qcow2&lt;/code&gt; safety rules.&lt;/p&gt;&#10;&lt;div class="td-callout td-callout--warning" role="note"&gt;&#10; &lt;div class="td-callout__title"&gt;&lt;i class="td-callout__icon fa-solid fa-triangle-exclamation" aria-hidden="true"&gt;&lt;/i&gt;&lt;span class="td-callout__label"&gt;Warning&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-callout__body"&gt;&#10;&lt;p&gt;&lt;code&gt;el7&lt;/code&gt; (CentOS Linux 7.9) is an EOL &lt;code&gt;deprecated&lt;/code&gt; compatibility image. The catalog also marks &lt;code&gt;el8&lt;/code&gt; (Rocky Linux 8) and &lt;code&gt;u22&lt;/code&gt; (Ubuntu 22.04 LTS) as &lt;code&gt;deprecated&lt;/code&gt; as support is phased out. Prefer &lt;code&gt;el9&lt;/code&gt;, &lt;code&gt;el10&lt;/code&gt;, &lt;code&gt;d12&lt;/code&gt;, &lt;code&gt;d13&lt;/code&gt;, &lt;code&gt;u24&lt;/code&gt;, or &lt;code&gt;u26&lt;/code&gt; for new labs.&lt;/p&gt;&#10; &lt;/div&gt;&#10;&lt;/div&gt;</description></item><item><title>Configuration</title><link>https://barn.pgsty.com/v1.5/docs/reference/configuration/</link><pubDate>Thu, 03 Dec 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/configuration/</guid><description>&lt;p id="a-complete-inventory"&gt;A Linux lab is one YAML file that lists each node under its fixed IPv4 address. This page defines the file&amp;rsquo;s shape, every variable Barn reads with its default, and how command-line flags and environment variables override them.&lt;/p&gt;&#10;&lt;div class="td-code td-code--titled" id="td-code-18050be9-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="yaml" data-td-line-count="12" role="group" aria-labelledby="td-code-18050be9-fence-0-title"&gt;&#10; &lt;div class="td-code__header"&gt;&#10; &lt;span class="td-code__filename" id="td-code-18050be9-fence-0-title" title="barn.yml"&gt;barn.yml&lt;/span&gt;&lt;/div&gt;&#10; &lt;div class="td-code__viewport" id="td-code-18050be9-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;all&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# applies to every host below&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;admin_ip&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;10.10.10.10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# the control node&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vm_image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;d13 &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Debian 13&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# ordinary Ansible groups; they may nest&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;lab&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vars&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;vm_mem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;4GiB &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# group default, overrides all.vars&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;hosts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10.10.10.10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;{&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;nodename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;meta } &lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# key = the node&amp;#39;s address on the lab /24&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10.10.10.11&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;{&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;nodename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;node-1 }&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;10.10.10.12&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;{&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;nodename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;node-2, vm_cpu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;}&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# host value wins over groups&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;This is an ordinary Ansible inventory. Barn reads the &lt;code&gt;vm_*&lt;/code&gt; variables and a few Pigsty fields and ignores everything else, so the same file can also drive Pigsty or Ansible: add &lt;code&gt;vm_*&lt;/code&gt; variables to a Pigsty &lt;code&gt;pigsty.yml&lt;/code&gt;, and Barn creates exactly the nodes its playbooks target.&lt;/p&gt;</description></item><item><title>CLI Contracts</title><link>https://barn.pgsty.com/v1.5/docs/reference/cli/</link><pubDate>Wed, 02 Dec 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/cli/</guid><description>&lt;p id="commands"&gt;Every &lt;code&gt;barn&lt;/code&gt; command follows the same output, prompt, and exit-code rules, so a script can handle all of them the same way. This page defines those rules; per-command syntax and flags are in the &lt;a href="../commands/"&gt;Command Reference&lt;/a&gt;, and native Mac VM contracts in &lt;a href="../mac/"&gt;Mac Reference&lt;/a&gt;.&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-3f2d26d6-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="text" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-3f2d26d6-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;barn [--json|--yaml] [-v|--verbose] &amp;lt;command&amp;gt; [flags] [node...]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Each command page lists its short aliases (&lt;code&gt;barn st&lt;/code&gt; is &lt;code&gt;barn status&lt;/code&gt;); the &lt;code&gt;network&lt;/code&gt; group also answers to &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;net&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Mac Runtime Reference</title><link>https://barn.pgsty.com/v1.5/docs/reference/mac/</link><pubDate>Fri, 27 Nov 2026 00:00:00 +0800</pubDate><guid>https://barn.pgsty.com/v1.5/docs/reference/mac/</guid><description>&lt;p id="commands"&gt;&lt;code&gt;barn mac&lt;/code&gt; runs named macOS virtual machines on an Apple Silicon Mac, alongside the Linux lab but separate from it. This page defines what scripts and agents depend on: what each machine owns, how it is networked, what the commands return, how they fail, and where state lives.&lt;/p&gt;&#10;&lt;p id="flags-by-command"&gt;Per-command syntax and options are in the &lt;a href="../commands/mac/"&gt;macOS Command Reference&lt;/a&gt;; the walkthrough is &lt;a href="../../start/macos/"&gt;macOS Virtual Machines&lt;/a&gt;.&lt;/p&gt;&#10;&lt;div class="td-code td-code--untitled" id="td-code-bb7d1ff4-fence-0" data-td-code data-td-code-auto-id&#10; data-td-language="text" data-td-line-count="1"&gt;&#10; &lt;div class="td-code__viewport" id="td-code-bb7d1ff4-fence-0-viewport" data-td-code-viewport&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;barn [--json|--yaml] [-v|--verbose] mac &amp;lt;command&amp;gt; [flags] [name...]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="runner"&gt;Host and runner&#10;&lt;/h2&gt;&#10;&lt;p&gt;Barn drives Apple&amp;rsquo;s Virtualization framework through &lt;code&gt;Barn.app&lt;/code&gt;, the native macOS app bundle that ships with the Apple Silicon release and the Homebrew formula (&lt;a href="../../start/macos/#install"&gt;install&lt;/a&gt;). The CLI and the app must come from the same build: before any VM operation the CLI checks that the app&amp;rsquo;s runner speaks protocol &lt;code&gt;2&lt;/code&gt;, and &lt;code&gt;barn mac doctor&lt;/code&gt; also verifies the runner&amp;rsquo;s local code signature.&lt;/p&gt;</description></item></channel></rss>