summaryrefslogtreecommitdiff
path: root/virtinst/guest.py
diff options
context:
space:
mode:
Diffstat (limited to 'virtinst/guest.py')
-rw-r--r--virtinst/guest.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/virtinst/guest.py b/virtinst/guest.py
index df4c66e6..874035bb 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -522,7 +522,21 @@ class Guest(XMLBuilder):
arm+machvirt prefers UEFI since it's required for traditional
install methods
"""
- return self.os.is_arm_machvirt() or self.conn.is_bhyve()
+ if self.os.is_x86() and self.conn.is_qemu():
+ # 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
+ else:
+ prefer_efi = self.os.is_arm_machvirt() or self.conn.is_bhyve()
+
+ log.debug("Prefer EFI => %s", prefer_efi)
+ return prefer_efi
def is_uefi(self):
if self.os.loader and self.os.loader_type == "pflash":