From ad761f25d6121f145a583f50e3a062f3fd37c78d Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 19 May 2022 16:43:35 -0300 Subject: LIBVIRT:DEFINED-FOR: fix two problems with --os-variant Pass OS values, not HOST values, to LIBVIRT::OS-VARIANT. Recently virt-install(1) began to error by default if the OS variant is omitted. Switch off this requirement as a fallback for versions of Debian newer than known to virt-install(1) (via libosinfo). The argument '--osinfo' is recognized by virtinst 3.2.0 and later; in 4.0.0 it is documented as the preferred form. Signed-off-by: David Bremner --- src/property/libvirt.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/property') diff --git a/src/property/libvirt.lisp b/src/property/libvirt.lisp index 5c4670e..8845995 100644 --- a/src/property/libvirt.lisp +++ b/src/property/libvirt.lisp @@ -85,8 +85,9 @@ subcommand of virsh(1) to convert the running domain into a transient domain." (mrun (format nil - "virt-install --print-xml -n ~A~:[~; --os-variant=~:*~A~]~{ ~A~} >~S" - (get-hostname host) (os-variant host) + "virt-install --print-xml -n ~A --osinfo=~A~{ ~A~} >~S" + (get-hostname host) + (or (os-variant (get-hostattrs-car :os host)) "detect=on,require=off") (mapcar #'sh-escape arguments) file)) (mrun "virsh" "define" file))) (:unapply -- cgit v1.2.3