The second setup backend, SITE_KIND=libvirt:
libvirt reaches the KVM host as root (or a sudo login) with the
provisioner key, pinning its host key the first time; checks
libvirt, /dev/kvm, the management bridge, qemu-img and curl,
and installs none of them; puts a directory pool and the cloud
image in place. On a host that is the control plane itself it
authorises its own key for root.
template builds a head image: the cloud image copied, a build VM with a
seed made here, the same golden.yml as Proxmox (now shared as
bakeHead), its disk kept under a new name per build - heads'
disks are overlays on it, so it is never rewritten in place.
config sites.yaml (kind libvirt, the pinned known_hosts), the unit's
environment file, site.auto.tfvars naming the image.
verify the same checks by using them, and discovery through the
provider with the settings the portal reads.
The libvirt module no longer takes the host's name: setup writes its
configuration before it has reached the host. Placement is held to one
host by comparing the hosts it chose with each other.
deploy/site.env.libvirt.example is held to its own validation, like the
Proxmox one. The interactive installer refuses a non-Proxmox site and
points at -yes -config. Tests cover the fields, what config writes and
that the portal can build a provider from it, every site.auto.tfvars
variable being declared by its environment (both backends), and the
host key pinned once and held to.
Not yet run against a real host end to end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>