[PATCH consfigurator] add fallback for OS-VARIANT in LIBVIRT:DEFINED-FOR

David Bremner david at tethera.net
Thu May 19 20:43:35 BST 2022


Recently virt-install 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 (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 <david at tethera.net>
---
 src/property/libvirt.lisp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/property/libvirt.lisp b/src/property/libvirt.lisp
index 5c4670e..ea5035d 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
-- 
2.35.2




More information about the sgo-software-discuss mailing list