# Barn 0.7.0: simpler test labs and automatic recovery

> A shorter first run, compact progress, independent guest setup, and recovery through up.

---

LLMS index: [llms.txt](/llms.txt)

---

> [!NOTE]
> Historical release record (`0.7.0`). Old release downloads are retired; use the [installation guide](/docs/start/installation/) for the current release.

Barn 0.7.0 streamlines first-run startup and recovery for local test labs: re-running `barn up` finishes interrupted work, retries guest bootstrap stages, and updates guest helper scripts in place without restarting running VMs.

## What changed {#what-changed}

- **Shorter first run.** Interactive `up` can generate the default inventory, install missing host tools, and bring an intact inactive Barn network back online. Fast checks stay quiet while longer tasks display progress and a compact summary.
- **Independent guest stages.** Data disks, host shares, guest hostnames, node-to-node SSH, and private networking initialize independently. If an optional stage fails, Barn reports the specific limitation while keeping management SSH available, and subsequent `up` runs skip stages that are already healthy.
- **Automatic test-disk recovery.** Healthy filesystems are mounted as-is; unrecognized or confirmed-corrupt filesystems on test data disks are reformatted and remounted with an explicit data-loss notice. Transient probe failures, missing devices, busy mounts, and host I/O errors never trigger formatting.
- **Fewer manual fixes.** Unwritable host shares fall back to read-only and recover on the next `up` once permissions are fixed. Occupied automatic SSH forward ports are reassigned for stopped guests. Interrupted image downloads resume automatically and fail over across official repositories while enforcing SHA-256 digest verification.
- **Clean output and backward-compatible state.** Guest warnings are stored in a disposable cache outside the schema-2 VM documents and node directories, so older Barn binaries can still inspect and manage the deployment.

## Upgrade notes {#upgrade-notes}

- Re-running `up` performs guest recovery (there is no separate `repair` command), whereas `start` powers on existing nodes without applying inventory changes. Passing `--no-wait` skips readiness and recovery checks. See the [storage guide](/docs/start/storage/) for data-disk recovery rules.
- A guest with working management SSH and optional stage warnings returns exit code `0`. Automation that requires every optional feature should inspect `nodes[].warnings` and `nodes[].repairs` in `--json` or `--yaml` output.
- If an earlier 0.6.0 bootstrap failed after deleting the staged control-node private key, `up` restores management SSH and reports a `control-ssh` warning; run `barn plan` and `barn recreate` on the control node if it needs peer-to-peer SSH.

## Install or upgrade {#install-or-upgrade}

```bash
curl -fLO https://github.com/pgsty/barn/releases/download/v0.7.0/install.sh
chmod +x install.sh
BARN_VERSION=0.7.0 ./install.sh
barn version
barn up
```

The release includes macOS and Linux (`amd64`/`arm64`) archives, Linux DEB/RPM packages, the installer script, checksums, SBOMs, and a Homebrew formula.

## Validation {#validation}

Release commit `9c6d4896d93733d1cb60a7e5d8591e9a06659c9d` passed [source CI](https://github.com/pgsty/barn/actions/runs/35118137961), the [packaging snapshot](https://github.com/pgsty/barn/actions/runs/35118137990), and the [tag workflow](https://github.com/pgsty/barn/actions/runs/35119206685), producing 20 verified release assets. Public macOS `arm64` and Linux `amd64` installer runs verified binary delivery for `0.7.0`, and macOS validation covered CLI smoke checks and cross-compilation.

On Ubuntu 26.04 `amd64` with KVM/QEMU 10.2.1 and Ubuntu 24.04 guests, recovery tests exercised ext4/XFS corruption, retained persistent disks, failed probes, busy mounts, read-only share fallback, and repeated healthy `up` runs without restarting the QEMU process:
- An interrupted 0.6.0 bootstrap (stopped at the management-egress probe) resumed under 0.7.0 in 3.3 s while preserving its data disk and UUID, and remained manageable by the 0.6.0 binary (`status`, `stop`, `start`, `destroy`).
- A deliberately corrupted disposable ext4 data disk was reformatted and remounted in 3.2 s with an explicit data-loss notice while keeping the VM process running.
