Bug 1267667 - RFE: aarch64: platform.py: kvm guest platform detection
Summary: RFE: aarch64: platform.py: kvm guest platform detection
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-30 15:34 UTC by Andrew Jones
Modified: 2018-02-15 02:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew Jones 2015-09-30 15:34:16 UTC
When attempting to install a guest with this command line

qemu-system-aarch64 \
  -nographic \
  -machine virt,accel=kvm -cpu host \
  -m 4096 -smp 4 \
  -device virtio-scsi-device,id=scsi0 \
  -drive file=guest.qcow2,if=none,id=hd0,format=qcow2 \
  -device scsi-hd,drive=hd0 \
  -netdev user,id=hostnet0 \
  -device virtio-net-device,netdev=hostnet0 \
  -kernel vmlinuz -initrd initrd.img \
  -append inst.repo=http://.../F-22-Secondary/GOLD/Server/aarch64/os/

The installer fails with

Starting installer, one moment...
Traceback (most recent call last):
  File "/sbin/anaconda", line 792, in <module>
n <module>
    from .storage import StorageDevice
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 34, in <module>
    from ..formats import getFormat
  File "/usr/lib/python2.7/site-packages/blivet/formats/__init__.py", line 533, in <module>
    collect_device_format_classes()
  File "/usr/lib/python2.7/site-packages/blivet/formats/__init__.py", line 108, in collect_device_format_classes
    globals()[mod_name] = __import__(mod_name, globals(), locals(), [], -1)
  File "/usr/lib/python2.7/site-packages/blivet/formats/prepboot.py", line 25, in <module>
    from .. import platform
  File "/usr/lib/python2.7/site-packages/blivet/platform.py", line 441, in <module>
    platform = getPlatform()
  File "/usr/lib/python2.7/site-packages/blivet/platform.py", line 439, in getPlatform
    raise SystemError("Could not determine system architecture.")
SystemError: Could not determine system architecture.

Pane is dead
  File "/usr/lib/python2.7/site-packages/blivet/platform.py", line 441, in <module>
    platform = getPlatform()
  File "/usr/lib/python2.7/site-packages/blivet/platform.py", line 439, in getPlatform
    raise SystemError("Could not determine system architecture.")
SystemError: Could not determine system architecture.
Pane is dead


The installer succeeds when adding a bootloader, i.e. adding

  -bios /usr/share/edk2.git/aarch64/QEMU_EFI.fd

to the command line. Using a bootloader shouldn't be strictly required for a virtual machine, so it would be nice if we could add a nonEFI-AArch64 class to blivet/platform.py for getPlatform to detect. Or maybe a QEMU mach-virt specific class?

Comment 1 David Lehman 2016-09-14 15:43:41 UTC
Sorry for giving you the silent treatment. I am open to improvements in this area, but my priorities are elsewhere. A pull request at https://github.com/rhinstaller/blivet is probably the best way to proceed.

Comment 2 Laszlo Ersek 2016-09-14 18:55:25 UTC
I looked into this briefly, and it's a hard bug. get_platform() [blivet/platform.py] is not hard to customize , I think, but the object that describes the platform has to be constructed *somehow*, and I have zero clue what kinds of things we should state in that object, for a non-EFI aarch64 machine. There are other platforms in there, sure, but I don't know what should be copied / modified from where, and why. So I don't think I can help with this one.

Comment 3 David Lehman 2018-01-29 15:19:39 UTC
Reassigning to anaconda since platform.py has moved there recently.


Note You need to log in before you can comment on or make changes to this bug.