From 00dd497173fb101fc552b9def15dbdf539ac0b21 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 16 Nov 2022 11:53:07 +0200 Subject: [PATCH] libvirt.sh: Adjust virt-install parameters for 9.2 --- tools/libvirt_test.sh | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/tools/libvirt_test.sh b/tools/libvirt_test.sh index 4d444bf99..28369d21f 100755 --- a/tools/libvirt_test.sh +++ b/tools/libvirt_test.sh @@ -277,29 +277,51 @@ elif [[ $ARCH == 's390x' ]]; then --noautoconsole \ --network network=integration,mac=34:49:22:B0:83:30 else + case "${ID}-${VERSION_ID}" in + "rhel-8"* | "centos-8") + MIN_RAM="1024" + ;; + "rhel-9"* | "centos-9") + MIN_RAM="1536" + ;; + *) + echo "unsupported distro: ${ID}-${VERSION_ID}" + exit 1;; + esac + + case "${ID}-${VERSION_ID}" in + "rhel-8"* | "rhel-9.0" | "rhel-9.1" | "centos-8") + NVRAM_TEMPLATE="nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd" + ;; + "centos-9" ) + # Disable secure boot for CS9 due to bug bz#2108646 + NVRAM_TEMPLATE="firmware.feature0.name=secure-boot,firmware.feature0.enabled=no" + ;; + "rhel-9.2") + NVRAM_TEMPLATE="" + ;; + *) + echo "unsupported distro: ${ID}-${VERSION_ID}" + exit 1;; + esac + # Both aarch64 and x86_64 support hybrid boot if [[ $BOOT_TYPE == 'uefi' ]]; then - # Disable secure boot for CS9 due to bug bz#2108646 - if [[ "${ID}-${VERSION_ID}" == "centos-9" ]] ; then - BOOT_ARGS="uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no" - else - BOOT_ARGS="uefi,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd" - fi sudo virt-install \ --name "$IMAGE_KEY" \ - --memory 1024 \ + --memory ${MIN_RAM} \ --vcpus 2 \ --disk path="${LIBVIRT_IMAGE_PATH}" \ --disk path=${CLOUD_INIT_PATH},device=cdrom \ --import \ --os-variant rhel8-unknown \ --noautoconsole \ - --boot "${BOOT_ARGS}" \ + --boot uefi,"${NVRAM_TEMPLATE}" \ --network network=integration,mac=34:49:22:B0:83:30 else sudo virt-install \ --name "$IMAGE_KEY" \ - --memory 1024 \ + --memory ${MIN_RAM} \ --vcpus 2 \ --disk path="${LIBVIRT_IMAGE_PATH}" \ --disk path=${CLOUD_INIT_PATH},device=cdrom \