Skip to content

OpenBSD: build arm64 libvirt boxes with QEMU - #9

Draft
dentarg wants to merge 3 commits into
masterfrom
openbsd-arm64-libvirt-qemu
Draft

OpenBSD: build arm64 libvirt boxes with QEMU #9
dentarg wants to merge 3 commits into
masterfrom
openbsd-arm64-libvirt-qemu

Conversation

@dentarg

@dentarg dentarg commented Aug 31, 2026

Copy link
Copy Markdown
Member

The amd64 box uses the VirtualBox builder and the arm64 box the VMware
Fusion builder; both need a desktop hypervisor. Packer cannot drive
OpenBSD's serial-console installer, so neither builds headlessly on a
plain Linux/KVM host (CI, a Linux dev box, or a nested-virt VM).

Add a shell-script build (build.sh + install.py) that boots the
miniroot installer under QEMU/KVM, drives an unattended install over
the serial console, provisions over SSH, and packages the qcow2 as a
libvirt box. It captures the non-obvious QEMU tuning OpenBSD/arm64
needs under (nested) KVM: gic-version=3, a single CPU, virtio INTx,
and a drained serial console.

Consumers that pin the Python interpreter to `/usr/local/bin/python3`
(e.g. Ansible) cannot find it: `pkg_add python%3` installs only the
versioned `python3.X` binary and leaves the unversioned name for the
operator to create. Symlink it during provisioning so the box works
with them as built.
The box shipped only Vagrant's classic RSA insecure public key. Newer
Vagrant, and the inventory vagrant-libvirt generates, prefer the
ed25519 insecure key, so connecting to the box with it failed with a
public-key error. Install both keys.
The amd64 box uses the VirtualBox builder and the arm64 box the VMware
Fusion builder; both need a desktop hypervisor. Packer cannot drive
OpenBSD's serial-console installer, so neither builds headlessly on a
plain Linux/KVM host (CI, a Linux dev box, or a nested-virt VM).

Add a shell-script build (`build.sh` + `install.py`) that boots the
miniroot installer under QEMU/KVM, drives an unattended install over
the serial console, provisions over SSH, and packages the qcow2 as a
libvirt box. It captures the non-obvious QEMU tuning OpenBSD/arm64
needs under (nested) KVM: `gic-version=3`, a single CPU, virtio INTx,
and a drained serial console.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant