test: only set boot args in virt-install version condition
Make it clearer that the only difference between the two cases are the arguments for --boot.
This commit is contained in:
parent
58eeb74c98
commit
55b1e2b6ee
1 changed files with 16 additions and 25 deletions
|
|
@ -516,34 +516,25 @@ sudo restorecon -Rv /var/lib/libvirt/images/
|
|||
|
||||
greenprint "💿 Installing raw image on UEFI VM"
|
||||
if nvrGreaterOrEqual "virt-install" "4"; then
|
||||
sudo virt-install --name="${IMAGE_KEY}-uefi"\
|
||||
--disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \
|
||||
--ram 3072 \
|
||||
--vcpus 2 \
|
||||
--network network=integration,mac=34:49:22:B0:83:31 \
|
||||
--import \
|
||||
--os-variant ${OS_VARIANT} \
|
||||
--boot uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no \
|
||||
--nographics \
|
||||
--noautoconsole \
|
||||
--wait=-1 \
|
||||
--noreboot
|
||||
BOOT_UEFI_ARGS="uefi,firmware.feature0.name=secure-boot,firmware.feature0.enabled=no"
|
||||
else
|
||||
sudo virt-install --name="${IMAGE_KEY}-uefi"\
|
||||
--disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \
|
||||
--ram 3072 \
|
||||
--vcpus 2 \
|
||||
--network network=integration,mac=34:49:22:B0:83:31 \
|
||||
--os-type linux \
|
||||
--import \
|
||||
--os-variant ${OS_VARIANT} \
|
||||
--boot uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no \
|
||||
--nographics \
|
||||
--noautoconsole \
|
||||
--wait=-1 \
|
||||
--noreboot
|
||||
BOOT_UEFI_ARGS="uefi,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd,loader_secure=no"
|
||||
fi
|
||||
|
||||
sudo virt-install --name="${IMAGE_KEY}-uefi"\
|
||||
--disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \
|
||||
--ram 3072 \
|
||||
--vcpus 2 \
|
||||
--network network=integration,mac=34:49:22:B0:83:31 \
|
||||
--os-type linux \
|
||||
--import \
|
||||
--os-variant ${OS_VARIANT} \
|
||||
--boot "${BOOT_UEFI_ARGS}" \
|
||||
--nographics \
|
||||
--noautoconsole \
|
||||
--wait=-1 \
|
||||
--noreboot
|
||||
|
||||
# Start VM.
|
||||
greenprint "💻 Start UEFI VM"
|
||||
sudo virsh start "${IMAGE_KEY}-uefi"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue