Bug 1267667 - RFE: aarch64: platform.py: kvm guest platform detection
RFE: aarch64: platform.py: kvm guest platform detection
Status: NEW
Product: Fedora
Classification: Fedora
Component: python-blivet (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-30 11:34 EDT by Andrew Jones
Modified: 2018-02-14 21:37 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Jones 2015-09-30 11:34:16 EDT
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 11:43:41 EDT
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 14:55:25 EDT
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 10:19:39 EST
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.