From f8262bf4c5536233288d1c1cb89086dfe505be56 Mon Sep 17 00:00:00 2001 From: wangyueliang Date: Fri, 14 Jun 2024 11:10:40 +0800 Subject: [PATCH] Fix buildextend-live failure when no-kvm is set --- src/cmd-buildextend-live | 2 ++ src/libguestfish.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/cmd-buildextend-live b/src/cmd-buildextend-live index 755a4a48..d1ef5968 100755 --- a/src/cmd-buildextend-live +++ b/src/cmd-buildextend-live @@ -584,6 +584,8 @@ def generate_iso(): # Note: virt-make-fs lets us do this as non-root efibootfile = os.path.join(tmpisoimages, 'efiboot.img') os.environ["LIBGUESTFS_BACKEND"] = "direct" + if "COSA_NO_KVM" in os.environ: + os.environ["LIBGUESTFS_BACKEND_SETTINGS"] = "force_tcg" # On RHEL 8, when booting from a disk device (rather than a CD), # https://github.com/systemd/systemd/issues/14408 causes the # hybrid ESP to race with the ISO9660 filesystem for the diff --git a/src/libguestfish.sh b/src/libguestfish.sh index a8c42dc5..8fcdf37b 100755 --- a/src/libguestfish.sh +++ b/src/libguestfish.sh @@ -8,6 +8,9 @@ set -euo pipefail # We don't want to use libvirt for this, it inhibits debugging # shellcheck disable=SC2031 export LIBGUESTFS_BACKEND=direct +if [ "$COSA_NO_KVM" ];then + export LIBGUESTFS_BACKEND_SETTINGS=force_tcg +fi arch=$(uname -m) -- Gitee