vm_create now properly detects the swtpm CMD_INIT failure and prints the exact sudo command needed to fix the libvirt-qemu ownership issue that Debian's libvirt swtpm helper creates as root:root. Changes: - vm_setup_swtpm: simplified to just check prerequisites (swtpm installed, /var/lib/libvirt/swtpm/ exists) - vm_create: after failed start, detects if swtpm dir was created by libvirt and prints targeted fix command - vm_destroy: simplified (removed external swtpm socket management) - Auto-cleanup: undefines VM on TPM failure so user can retry immediately Root cause: libvirt's swtpm helper creates per-VM state directories as root:root but swtpm runs as libvirt-qemu. Needs one-time: sudo chown -R libvirt-qemu:libvirt-qemu /var/lib/libvirt/swtpm/ All 523 tests pass, 0 lint warnings. 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
46 KiB
Executable File
46 KiB
Executable File