From 201c59240ddad31fcee4c1d431e0ee7775841d30 Mon Sep 17 00:00:00 2001 From: Santiago Zarate Date: Thu, 18 Jul 2019 16:13:50 +0200 Subject: [PATCH] Fix boot from cdrom for svirt/libvirt using qemu --- tests/installation/bootloader_svirt.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/installation/bootloader_svirt.pm b/tests/installation/bootloader_svirt.pm index 5197cea9d798..86d63ca0f287 100644 --- a/tests/installation/bootloader_svirt.pm +++ b/tests/installation/bootloader_svirt.pm @@ -82,11 +82,13 @@ sub run { if (check_var('BOOTFROM', 'c')) { $boot_device = 'hd'; } - elsif (check_var('BOOTFROM', 'd')) { + elsif (check_var('BOOTFROM', 'd') || (get_var('ISO') && !get_var('BOOT_HDD_IMAGE'))) { $boot_device = 'cdrom'; - } - else { - get_var('ISO') ? $boot_device = 'cdrom' : $boot_device = 'hd'; + } else { + record_info("No boot medium", "Failed to select a bootable medium, please check ISO," + . "BOOT_FROM and BOOT_HDD_IMAGE settings", + result => 'fail' + ); } # Does not make any difference on VMware. For ad hoc device selection # see vmware_select_boot_device_from_menu().