summaryrefslogtreecommitdiff
path: root/virtinst/guest.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2022-03-02 10:52:06 -0500
committerCole Robinson <crobinso@redhat.com>2022-03-02 10:52:06 -0500
commit5640e9be5b4d5fddb045a68aeea3ea776c9404b7 (patch)
tree5efe424d20c92c72151ac32fde27ff8105a12b3a /virtinst/guest.py
parent5d74ca76212ce76fb00b1bedf7b937249b9d3c4c (diff)
downloadvirt-manager-5640e9be5b4d5fddb045a68aeea3ea776c9404b7.tar.gz
osdict: firmware handling tweaks
* Check it for test:/// URI too * Move the whole logic into osdict.requires_firmware_efi * Wrap it all in an exception handler the final API breaks us * Add some coverage exclusions since this is currently untestable Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'virtinst/guest.py')
-rw-r--r--virtinst/guest.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 874035bb..3fb9a956 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -522,16 +522,13 @@ class Guest(XMLBuilder):
arm+machvirt prefers UEFI since it's required for traditional
install methods
"""
- if self.os.is_x86() and self.conn.is_qemu():
+ if (self.os.is_x86() and
+ (self.conn.is_qemu() or self.conn.is_test())):
# If OS has dropped support for 'bios', we have no
# choice but to use EFI.
# For other OS still prefer BIOS since it is faster
# and doesn't break QEMU internal snapshots
- has_efi = self.osinfo.supports_firmware_efi(self.os.arch)
- has_bios = self.osinfo.supports_firmware_bios(self.os.arch)
- log.debug("Guest osinfo firmware has_efi=%d has_bios=%d",
- has_efi, has_bios)
- prefer_efi = has_efi and not has_bios
+ prefer_efi = self.osinfo.requires_firmware_efi(self.os.arch)
else:
prefer_efi = self.os.is_arm_machvirt() or self.conn.is_bhyve()