No description
  • Jinja 81.6%
  • Python 18.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
oliver.maklott 6dc9253a49
All checks were successful
ci / build (push) Successful in 1s
ci / sanity (push) Successful in 3s
ci / lint (push) Successful in 7s
ci / units (push) Successful in 0s
ci / molecule (push) Successful in 7m5s
release / release (push) Successful in 2s
Release 0.1.2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG
2026-11-30 07:18:56 +00:00
.forgejo/workflows belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
changelogs Release 0.1.2 2026-11-30 07:18:56 +00:00
extensions/molecule belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
meta belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
roles vm: a kept logical volume is never overwritten on re-creation 2026-11-30 05:16:23 +00:00
.ansible-lint belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
.copier-answers.yml belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
.gitignore belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
.gitleaks.toml belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
.pre-commit-config.yaml belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
.yamllint belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
CHANGELOG.md Release 0.1.2 2026-11-30 07:18:56 +00:00
CONTRIBUTING.md belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
galaxy.yml Release 0.1.2 2026-11-30 07:18:56 +00:00
LICENSE belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
README.md belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
requirements.yml belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
ruff.toml belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00
SECURITY.md belowtoxic.virtualization 0.1.0: libvirt hosts, images and guests 2026-11-22 23:03:42 +00:00

belowtoxic.virtualization

KVM hypervisors and their guests:

  • libvirt host with a storage pool for guest disks (qcow2 files or one LVM volume per guest) and without libvirt's NAT network - guests use the routed taps of belowtoxic.networking.
  • Verified images: Debian 13, Ubuntu 24.04/26.04 and Flatcar stable, checked against the distributions' published checksums.
  • Guests on their routed tap: Debian and Ubuntu with a cloud-init seed, Flatcar with an Ignition config passed via fw_cfg (belowtoxic.flatcar). The guest's addresses and routes come from belowtoxic.networking.network_plan, so the guest, the host routes and the firewall always agree.

Firecracker micro-VMs (firecracker_host, microvm) follow in a later release.

Part of belowtoxic-ansible.

Content

Role Purpose
belowtoxic.virtualization.libvirt_host packages, storage pool, nested virtualization option
belowtoxic.virtualization.images download and verify base images
belowtoxic.virtualization.vm one guest: disk, cloud-init or Ignition, libvirt domain, state

Order on a hypervisor

- ansible.builtin.include_role: {name: belowtoxic.virtualization.libvirt_host}
- ansible.builtin.include_role: {name: belowtoxic.virtualization.images}
  vars: {images_wanted: [debian-13, flatcar-stable]}
- ansible.builtin.include_role: {name: belowtoxic.networking.host_network}   # taps, routes
- ansible.builtin.include_role: {name: belowtoxic.networking.nftables}       # expose rules
- ansible.builtin.include_role: {name: belowtoxic.virtualization.vm}
  vars: {vm_name: web1, vm_image: flatcar-stable, vm_network: "{{ guest_plan }}"}

Guests are provisioned once: cloud-init and Ignition apply their config at first boot. Changing a guest's OS configuration means re-provisioning it (vm_state: absent, vm_delete_disk: true, then create it again).

Testing

extensions/molecule/default: a fake Hetzner router VM and a hypervisor VM with the whole stack. The hypervisor boots a Debian guest (routed public addresses) and a Flatcar guest (NAT with a port forward) in nested KVM; the test logs into both and checks addresses, host name and cloud-init status, then probes from the router: SSH from the admin network only, ping over IPv4 and IPv6, and the port forward to the Flatcar guest.

License

GPL-3.0-or-later, see LICENSE.