- Jinja 81.6%
- Python 18.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVUe4g65L7UnUVqHmQp7kG |
||
| .forgejo/workflows | ||
| changelogs | ||
| extensions/molecule | ||
| meta | ||
| roles | ||
| .ansible-lint | ||
| .copier-answers.yml | ||
| .gitignore | ||
| .gitleaks.toml | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| galaxy.yml | ||
| LICENSE | ||
| README.md | ||
| requirements.yml | ||
| ruff.toml | ||
| SECURITY.md | ||
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 frombelowtoxic.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.