test: Fix CS9 UEFI installation failure issue

This commit is contained in:
Xiaofeng Wang 2022-09-28 12:51:39 +08:00 committed by Christian Kellner
parent e01fa00da1
commit 8e8704e03b

View file

@ -559,6 +559,15 @@ sudo rm -f "$LIBVIRT_BIOS_IMAGE_PATH"
## Install, upgrade and test Edge image on UEFI VM
##
##################################################
# Since virt-install 4.0.0, loader attribute can't be configured here,
# otherwise it'll report "loader attribute 'readonly' cannot be specified
# when firmware autoselection is enabled"
if nvrGreaterOrEqual "virt-install" "4.0.0"; then
BOOT_UEFI_ARGS="uefi"
else
BOOT_UEFI_ARGS="uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no"
fi
# Install ostree image via anaconda.
greenprint "💿 Install ostree image via installer(ISO) on UEFI VM"
sudo virt-install --name="${IMAGE_KEY}-uefi"\
@ -569,7 +578,7 @@ sudo virt-install --name="${IMAGE_KEY}-uefi"\
--os-type linux \
--os-variant ${OS_VARIANT} \
--cdrom "/var/lib/libvirt/images/${ISO_FILENAME}" \
--boot uefi \
--boot "$BOOT_UEFI_ARGS" \
--nographics \
--noautoconsole \
--wait=-1 \