Releases: pgsty/barn
Release list
Barn 0.9.0
Barn 0.9.0
Barn 0.9.0 brings Linux labs and native macOS machines into one command-line
tool, with clearer diagnostics and recovery for interrupted operations.
Install 0.9.0 · Download assets · Full changelog
macOS machines on Apple Silicon
barn mac creates named macOS 27 machines with a desktop, SSH, shared folders,
and text clipboard sharing. The first machine installs a base from Apple's
verified restore image; subsequent machines clone it with separate writable
disks, credentials, and private subnets.
barn mac up
barn mac open
barn mac sshMac guests require Apple Silicon, macOS 27+, and the native Barn Mac.app
component. The 0.9.0 release archives contain the CLI; follow the
Mac guide to build the native
component from the release tag with Xcode 27.
Apple allows two macOS VMs running at a time, including other tools. Mac state
is independent of the Linux inventory and survives Linux destroy and purge.
Easier Linux lab recovery
Repeat barn up to continue unfinished setup. A failed first start can be
retried after correcting the inventory, and an interrupted destroy can resume.
After a host reboot, a QEMU PID reused by an unrelated process no longer blocks
the lab: Barn recognizes the old VM as stopped without signaling that process.
Concurrent modifying commands wait up to ten minutes and identify the operation
holding the lock. Status and access commands remain available. Plans now list
each node's data disks, including the default 128 GiB /data disk.
Diagnostics with a next step
Inventory errors include the rule, value, and source line when available, with
suggestions for mistyped vm_* fields. Failed external commands retain the
useful tail of stderr. JSON failures use a consistent class and optional
reason and next fields.
Host setup explains its package and network changes before requesting privileges.
Barn preserves linked SSH configuration files and prints the Include line to
add through your dotfile manager.
Updated Linux images
The release embeds catalog 2026093001, with 41 artifacts in nine families.
Debian 12/13 and Rocky Linux 8/9 use Barn-normalized images. Debian includes XFS
tools and en_US.UTF-8, while keeping C.UTF-8 as its default locale. Rocky
Linux 8 uses its shipped chrony configuration and chronyd service, with SELinux
labels completed during image creation to avoid first-boot relabeling. Ubuntu
keeps Canonical's original image bytes. Ubuntu 24.04 remains the default.
barn image list
barn updatebarn update refreshes the Linux image catalog; it does not upgrade the Barn
application or replace an existing VM's disk.
Upgrade notes
- The command is
barn, the preferred configuration file isbarn.yml, and
state lives under~/.barn; environment variables useBARN_*. - The destructive
rmalias is removed. Usepurgeexplicitly when you intend
to discard the complete Linux deployment, including persistent disks and keys. - For scripts,
recreate_requiredandnodes_removedarereasonvalues under
error: "conflict";resource_conflictbecomesresource. Missing inventory
and unknown images return usage/2. Read the exit-code reference. stopandstartkeep disks.recreatereplaces the root and non-persistent
disks. Persistent Linux data disks may still be reset if their filesystems
are unrecognized or confirmed damaged; review the storage rules.
Start with the Linux quick start or the
macOS guide. Report problems with the command, Barn version,
host platform, and relevant logs in GitHub Issues.
Barn 0.9.0(中文)
Barn 0.9.0 用同一套命令行工具管理 Linux 实验环境与原生 macOS 虚拟机,
同时改进错误提示和中断操作的恢复体验。
Apple Silicon 上的 macOS 虚拟机
barn mac 创建命名的 macOS 27 虚拟机,提供原生桌面、SSH、共享目录与文本剪贴板。
首台机器从经过校验的 Apple 恢复镜像安装基础系统,之后的机器通过克隆复用它,
各自保有独立的可写磁盘、凭据与私有子网。
barn mac up
barn mac open
barn mac sshMac 客机需要 Apple Silicon、macOS 27+ 与原生组件 Barn Mac.app。
Mac 教程说明组件的安装方式,以及使用 Xcode 27
从发行标签构建的方法。0.9.0 发行归档提供 CLI;使用 macOS 客机需通过 Xcode 27 从标签构建
Barn Mac.app。Apple 允许同时运行两台 macOS 虚拟机,包含其他工具启动的机器。
Mac 状态独立于 Linux 主机清单,Linux 的 destroy 和 purge 会保留它们。
更顺畅的 Linux 环境恢复
重复 barn up 即可继续未完成的初始化。首次启动失败后,修正配置可以直接重试;
中断的销毁操作也可以继续。宿主重启后,即使原 QEMU PID 已被无关进程复用,Barn
也能识别原虚拟机已经停止,不会向无关进程发送信号。
并发修改命令最多等待十分钟,并说明哪个操作正在持有锁;状态和访问命令保持可用。
计划会逐项列出节点的数据盘,包括默认挂载到 /data 的 128 GiB 数据盘。
能指向下一步的诊断
配置错误会尽可能给出规则、取值和行号,并对误拼的 vm_* 字段提供建议。
外部命令失败时保留 stderr 末尾的有效信息;JSON 失败结果使用统一分类,
并按需给出 reason 与 next。
宿主准备会在请求管理员权限前说明软件包与网络变更。链接形式的 SSH 配置保持原样,
Barn 会打印需通过 dotfile 管理器添加的 Include 行。
更新的 Linux 镜像
本版内置镜像目录 2026093001,包含 9 个系列、41 个镜像文件。
Debian 12/13 与 Rocky Linux 8/9 使用经过 Barn 规范化的镜像;Debian 带有 XFS
工具与 en_US.UTF-8,默认 locale 保持为 C.UTF-8。Rocky Linux 8 使用已有的
chrony 配置和 chronyd 服务,并在制镜时完成 SELinux 标签处理,避免首次启动全盘重标记。
Ubuntu 保留 Canonical 原始镜像,Ubuntu 24.04
继续作为默认客机系统。
barn image list
barn updatebarn update 只刷新 Linux 镜像目录,不升级 Barn 程序,也不替换已有虚拟机的磁盘。
升级注意事项
- 命令为
barn,优先配置文件为barn.yml,状态位于~/.barn,环境变量统一使用BARN_*。 - 移除会直接删除环境的
rm别名。确实要丢弃整套 Linux 部署、持久盘和密钥时,请显式使用purge。 - 自动化脚本需注意:
recreate_required、nodes_removed是error: "conflict"下的reason;resource_conflict改为resource。缺少配置和未知镜像返回 usage/2,详见退出码参考。 stop和start保留磁盘;recreate替换根盘与非持久数据盘。Linux 持久数据盘的文件系统无法识别或确认损坏时,仍可能被清空重建,使用前请阅读存储规则。
从 Linux 快速上手或 macOS 教程
开始。报告问题时,请在 GitHub Issues
附上命令、Barn 版本、宿主平台与相关日志。