OpenBSD: build arm64 libvirt boxes with QEMU - #9
Draft
dentarg wants to merge 3 commits into
Draft
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theminiroot 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.