diff options
author | David Bremner <david@tethera.net> | 2022-05-19 16:43:35 -0300 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-05-19 17:43:42 -0700 |
commit | ad761f25d6121f145a583f50e3a062f3fd37c78d (patch) | |
tree | 039b7df096d214cf163485053088a8303bee52c9 | |
parent | c1fcfb251957c48e3be10f0cf01f257333837694 (diff) | |
download | consfigurator-ad761f25d6121f145a583f50e3a062f3fd37c78d.tar.gz |
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 <david@tethera.net>
-rw-r--r-- | src/property/libvirt.lisp | 5 |
1 files changed, 3 insertions, 2 deletions
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 |