Repository navigation
Barn 0.9.3
Pre-releaseBarn 0.9.3
Released on 2026-10-31. Barn 0.x releases use GitHub's pre-release channel.
Barn 0.9.3 focuses on safer lab changes and recovery. It adds resource-only
resize, lets selected nodes converge independently, accepts ordinary user path
forms for inventories and shares, and makes interrupted lifecycle operations
recoverable. The release embeds signed image catalog revision 2026102802.
Changes
- Resize without recreation. Edit
vm_cpuorvm_memand run
barn resize [node...]. Supported increases are hot-plugged when QEMU has
reserved capacity; decreases, older VMs, and unsupported backends use an
automatic stop/start. The VM identity, disks, SSH keys, and other settings
remain in place. Image, disk, network, and share changes still use
barn recreate. - Select the nodes to apply.
plan,up,reload,recreate, and
resizeretain the applied definitions of unselected peers. A changed or
temporarily omitted peer does not have to be applied in the same operation.
The complete inventory is still parsed, and address, alias, control-node,
and deployment-wide conflicts are rejected before a node is stopped or
deleted.reloadrefuses changes that requireresize,recreate, or
destroybefore it stops anything. - Choose an image in generated templates.
barn init [template] --image
andbarn setup [template] --imagewrite an alias, channel, or version
selector toall.vars.vm_image. They do not download an image and cannot
rewrite an existing inventory selected with-for discovery. - More usable paths and shares.
BARN_HOME, local repositories, catalog
export,BARN_MAC_RUNNER, inventories, imported images, and share sources
accept relative paths,~/, and directory symlinks where applicable.
Inventory-relative share sources resolve beside the inventory's real file.
Share sources may contain spaces, Unicode, and shell punctuation; readable
directories do not need to be owned by the caller, and multiple guests may
share overlapping trees. Guest mount paths and shell/fstab values are
normalized and quoted safely. Output-file symlinks are still protected from
overwrite. - Larger and safer image workflows. Local images and catalog artifacts with
declared sizes no longer have an 8 GiB limit. Imports are indexed by content
digest, so source names with spaces or Unicode and identical bytes are safe;
the local alias registry has no 256-entry ceiling and rejects oversized
updates before changing the existing registry. Cache and catalog checks keep
enforcing declared size, SHA-256, and qcow2 structure, and pruning protects
images referenced by applied nodes and local aliases. - Provisioning and logs.
barn provision --parallelaccepts any positive
value and--timeoutaccepts any positive duration.barn mac logs --lines
accepts any positive line count, including logs beyond the former 1 MiB and
10,000-line limits. Fallback loopback port allocation uses every valid
+10000candidate. - Embedded image catalog. The release embeds signed catalog revision
2026102802, covering 9 distribution families and 17 architecture-specific
artifacts. The default remains Ubuntu 24.04 (u24:stable) on the host's
native architecture; runbarn image listto inspect the active catalog. - Recovery and readiness. Interrupted Linux and macOS lifecycle, persistent
disk, and replacement operations retain enough journaled state for the next
command to recover safely.SIGINTandSIGTERMcancel active operations
with the structuredcancelledresult. On macOS,barn mac up --no-wait
now explicitly returns when the VM process starts; first-boot SSH and sudo
provisioning may still be running, so runbarn mac up NAMEagain before
usingmac sshormac exec.
Upgrade
Select 0.9.3 explicitly with the download installer, or upgrade the
Homebrew formula / Linux package. GitHub's releases/latest does not select
pre-releases. Existing Linux and macOS VM disks, credentials, and configuration
remain under ~/.barn; no recreation is required for this upgrade.
curl -fLO https://github.com/pgsty/barn/releases/download/v0.9.3/install.sh
BARN_VERSION=0.9.3 bash install.shAfter upgrading, run barn update if you want to activate the current remote
catalog for a repository. The embedded catalog is already available in the
binary; catalog activation never upgrades the Barn executable or replaces a
running VM's disks. Keep an explicit vm_image: family@version when a lab must
remain on one exact image across catalog updates.
The 0.9.3 macOS arm64 archive and Homebrew installation continue to provide
the signed, notarized Barn.app, CLI, and hosts helper from one release. Stop
macOS VMs before replacing the native component. Linux arm64/amd64 and Intel
macOS continue to provide the CLI and hosts helper; Linux guests use QEMU.
See the installation guide,
the Linux quick start, and the
Mac guide for platform-specific
instructions.
Barn 0.9.3(中文)
发布日期:2026-10-31。Barn 0.x 版本继续使用 GitHub 预发布频道。
Barn 0.9.3 聚焦于更安全的环境变更与恢复流程:新增只调整资源的扩容命令,
支持按节点独立收敛,放宽清单与共享目录的普通用户路径形式,并让中断的生命周期
操作可以安全恢复。本版内置签名镜像目录 revision 2026102802。
变更
- 无需重建即可调整资源。 修改
vm_cpu或vm_mem后执行
barn resize [node...]。QEMU 预留了容量且后端支持时,增加的 CPU 或内存会热插拔;
减少资源、旧虚拟机或不支持热插拔的后端会自动执行停机再启动。虚拟机身份、磁盘、
SSH 密钥及其他设置保持不变;镜像、磁盘、网络和共享目录变更仍使用
barn recreate。 - 按选择的节点应用变更。
plan、up、reload、recreate与resize会保留
未选择节点的已应用定义。某个节点发生修改或暂时从 YAML 中省略时,不必与其他节点
一起应用。整份清单仍会解析,地址、别名、控制节点和部署级冲突会在停机或删盘前拒绝。
reload遇到需要resize、recreate或destroy的变更时,会在停机前失败。 - 生成模板时选择镜像。
barn init [模板] --image与
barn setup [模板] --image会把镜像别名、频道或版本选择器写入
all.vars.vm_image。参数不会下载镜像,也不能改写通过-f指定或自动发现的已有清单。 - 路径与共享目录更灵活。
BARN_HOME、本地仓库、目录导出、BARN_MAC_RUNNER、
清单、导入镜像和共享源在适用场景下支持相对路径、~/与目录符号链接。相对于清单的
共享源以清单真实文件所在目录为基准。共享源可以包含空格、Unicode 和 shell 标点;
只要调用者可读,目录不必归调用者所有,多个客机可以共享重叠目录。客机挂载路径及
shell/fstab 值会规范化并安全引用;输出文件本身的符号链接仍不会被覆盖。 - 更大的镜像与更安全的缓存。 带有声明大小的本地镜像与目录产物不再受 8 GiB 限制。
导入镜像按内容摘要索引,因此带空格或 Unicode 的源文件名及相同字节内容都不会冲突;
本地别名注册表不再限制 256 项,超大更新会在写入前拒绝并保留原注册表。缓存与目录
仍严格校验声明大小、SHA-256 和 qcow2 结构;清理操作会保护已应用节点及本地别名引用的镜像。 - 批量脚本与日志。
barn provision --parallel接受任意正整数,--timeout接受任意
正时长。barn mac logs --lines接受任意正行数,可读取超过原 1 MiB 与 10,000 行上限的日志。
回退端口分配会继续尝试所有有效的+10000候选端口。 - 内置镜像目录。 本版内置签名目录 revision
2026102802,包含 9 个发行版系列、
17 个架构产物。默认仍为宿主原生架构的 Ubuntu 24.04(u24:stable);可用
barn image list查看当前生效目录。 - 恢复与就绪边界。 Linux 与 macOS 的生命周期、持久盘及替换操作中断后,会保留足够的
日志状态供下一次命令安全恢复。SIGINT与SIGTERM会以结构化cancelled结果取消
当前操作。在 macOS 上,barn mac up --no-wait明确表示虚拟机进程已启动即可返回;
首次启动的 SSH 与 sudo 初始化可能仍在后台进行,使用mac ssh或mac exec前请再次
执行barn mac up NAME等待就绪。
升级
下载安装器时请显式选择 0.9.3,或升级 Homebrew 配方 / Linux 软件包。GitHub 的
releases/latest 不会选择预发布版本。已有 Linux 与 macOS 虚拟机的磁盘、凭据和配置
仍保存在 ~/.barn,升级无需重建虚拟机。
curl -fLO https://github.com/pgsty/barn/releases/download/v0.9.3/install.sh
BARN_VERSION=0.9.3 bash install.sh如需为某个仓库激活当前远程目录,升级后执行 barn update。二进制已经内置本版目录;
目录激活不会升级 Barn 程序,也不会替换运行中虚拟机的磁盘。需要在目录更新后保持镜像
不变时,请在清单中使用 vm_image: family@version 固定精确版本。
0.9.3 的 macOS arm64 归档与 Homebrew 安装继续提供同一发行版本构建的签名公证
Barn.app、CLI 与 hosts helper。替换原生组件前请先停止 macOS 虚拟机。Linux arm64/amd64
与 Intel Mac 继续提供 CLI 和 hosts helper;Linux 客机使用 QEMU。
详见安装指南、
Linux 快速上手与
Mac 指南。