From 147eb874ea871beb42f0f29d7d48520a6a1a343a Mon Sep 17 00:00:00 2001 From: sjat Date: Thu, 18 Jun 2026 14:41:31 +0200 Subject: [PATCH] fix(integration-vm): pin LIBVIRT_DEFAULT_URI=qemu:///system Bare virsh/virt-install default to qemu:///session for a non-root caller, but the substrate, /dev/kvm, and the boma-it NAT network live on the SYSTEM libvirtd. Pin the URI so the driver targets system regardless of who runs it. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/integration-vm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/integration-vm.py b/scripts/integration-vm.py index aa96291..d71c781 100644 --- a/scripts/integration-vm.py +++ b/scripts/integration-vm.py @@ -44,6 +44,11 @@ DEFAULT_VCPUS = 2 MIN_FREE_MIB = 4096 VALID_TIERS = ("internal", "le-staging", "le-prod-wildcard") +# Target the SYSTEM libvirtd — where the substrate, /dev/kvm, and the NAT network live. +# Without this, a non-root caller's bare virsh/virt-install default to qemu:///session. +os.environ.setdefault("LIBVIRT_DEFAULT_URI", "qemu:///system") + + def vm_name(host, suffix=None): suffix = suffix or uuid.uuid4().hex[:8] return f"{NAME_PREFIX}{host}-{suffix}"