Skip to content

Commit

Permalink
livemedia-creator: Check for BIOS vs. UEFI qemu support
Browse files Browse the repository at this point in the history
and raise an appropriate error. eg. aarch64 doesn't support non-uefi
installation.

Related: RHEL-31830
  • Loading branch information
bcl committed Jun 11, 2024
1 parent 48f8f77 commit 87b4b45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pylorax/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ class QEMUInstall(object):
Run qemu using an iso and a kickstart
"""
# Mapping of arch to qemu command and options
# Leave out 'machine' for systems that only have UEFI support
# and leave out 'uefi_machine' for systems with no UEFI support
QEMU = {"x86_64": {
"cmd": "qemu-system-x86_64",
"arches": ["x86_64", "i386"],
Expand Down Expand Up @@ -224,10 +226,13 @@ def __init__(self, opts, iso, ks_paths, disk_img, img_size=2048,

if boot_uefi:
if "uefi_machine" not in self.QEMU[target_arch]:
raise InstallError("UEFI support not available for %s (yet?)" % target_arch)
raise InstallError("UEFI support not available for %s" % target_arch)

qemu_cmd += ["-machine", self.QEMU[target_arch]["uefi_machine"]]
qemu_cmd += self.QEMU[target_arch]["uefi_args"]
else:
if "machine" not in self.QEMU[target_arch]:
raise InstallError("BIOS support not available for %s" % target_arch)

if "-machine" not in qemu_cmd:
qemu_cmd += ["-machine", self.QEMU[target_arch]["machine"]]
Expand Down

0 comments on commit 87b4b45

Please sign in to comment.