Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1267667

Summary: RFE: aarch64: platform.py: kvm guest platform detection
Product: [Fedora] Fedora Reporter: Andrew Jones <drjones>
Component: python-blivetAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aaron, bcl, blivet-maint-list, dlehman, lersek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.