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}"