A lightweight build pipeline that creates ready-to-use Vagrant boxes for the libvirt provider. The images are built from scratch on Debian stable using mkosi, then packaged as distributable .box archives and published to a Forgejo package registry.
  • Shell 79.3%
  • Makefile 20.7%
Find a file
2026-07-06 10:19:56 +00:00
.devcontainer build(devcontainer): update devcontainer base image 2026-06-26 01:30:18 +02:00
.forgejo/workflows ci: force line-buffered mkosi output and strip color in build 2026-07-06 10:19:56 +00:00
vagrant bump: 26.07.0 2026-07-01 00:01:04 +00:00
.gitignore chore(devcontainer): add dev container with mkosi and forgejo-runner features 2026-06-22 16:36:47 +00:00
LICENSE Initial commit 2026-06-19 10:17:40 +00:00
README.md docs: rewrite README to describe image build pipeline 2026-06-25 23:08:46 +00:00
Vagrantfile feat: add Vagrantfile for dev stack 2026-06-25 22:51:35 +00:00

sebatec-images

Reproducible Debian Vagrant boxes for libvirt — built with mkosi, versioned, and published via Forgejo

A lightweight build pipeline that creates ready-to-use Vagrant boxes for the libvirt provider. The images are built from scratch on Debian stable using mkosi, then packaged as distributable .box archives and published to a Forgejo package registry.

Note

Versions follow YY.MM.PP format and are tracked in vagrant/mkosi.version. Use make bump to increment before a new release.

Features

  • Reproducible builds — Fully deterministic image generation from Debian stable
  • Minimal footprint — Optimized with systemd-boot, ext4 root, and ESP partitions
  • Vagrant-ready — Pre-configured vagrant user with insecure key and passwordless sudo
  • Cloud-native — Cloud-init, systemd-networkd (DHCP on eth0), and SSH pre-enabled
  • Versioned releases — Automatic semantic versioning with make bump
  • One-step packaging — Converts raw images to .box archives with metadata
  • Registry publishing — Direct upload to Forgejo package registry

Project Structure

.
├── Vagrantfile                      # Local development box (libvirt + sshfs)
└── vagrant/
    ├── Makefile                     # Build, bump, clean, and upload targets
    ├── mkosi.conf                   # Image configuration (Debian stable)
    ├── mkosi.repart/                # Partition scheme (ESP, BIOS, root)
    ├── mkosi.extra/                 # Overlay files (sudoers, networking, SSH keys)
    ├── mkosi.postinst.chroot        # Post-installation hook (vagrant user setup)
    ├── mkosi.postoutput             # Post-output hook (raw → qcow2 → .box)
    ├── mkosi.bump                   # Version bump script
    ├── mkosi.version                # Current version file
    └── Vagrantfile.libvirt          # Bundled Vagrantfile for packaged boxes

Prerequisites

  • mkosi >= 26
  • qemu-utils (for qemu-img)
  • jq (JSON query tool)
  • Linux host with KVM support
  • For publishing: Forgejo API token (PACKAGE_API_TOKEN)

Quick Start

Build

cd vagrant
make build         # Build and package the Vagrant box
make bump          # Advance version to YY.MM.<patch+1>
make clean         # Remove build artifacts

Output artifacts are written to vagrant/mkosi.output/:

  • debian-stable-<version>.raw — Raw disk image
  • debian-stable-<version>.box — Vagrant box (qcow2 + metadata)
  • debian-stable-<version>.efi, .vmlinuz, .initrd — Kernel artifacts

Test Locally

Add and boot the generated box:

cd vagrant/mkosi.output
vagrant box add debian-stable debian-stable-<version>.box
vagrant up

Or use the repository root Vagrantfile, which automatically discovers the debian-stable box:

vagrant up

Publish to Forgejo

cd vagrant
export PACKAGE_API_TOKEN=<your-forgejo-token>
export API_URL=https://forge.sebatec.eu/api
make upload

The box will be published to:

${API_URL}/packages/sebatec-eu/vagrant/debian-stable/<version>/libvirt.box

Warning

Publishing requires PACKAGE_API_TOKEN to be set. The Makefile will refuse to upload without it.

Versioning

Versions follow YY.MM.PP (year / month / patch):

  • Patch counter resets to 0 each month
  • Otherwise increments automatically
  • Use make bump to advance the version in vagrant/mkosi.version

See vagrant/mkosi.bump for implementation details.

Customizing the image