Bug 1211996 - virt-inspector gives incorrect arch (ppc64) for ppc64le guest
virt-inspector gives incorrect arch (ppc64) for ppc64le guest
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Maros Zatko
:
Depends On:
Blocks: 1264835
  Show dependency treegraph
 
Reported: 2015-04-15 07:34 EDT by Richard W.M. Jones
Modified: 2015-09-21 06:57 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-05-28 08:01:09 EDT
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 Richard W.M. Jones 2015-04-15 07:34:04 EDT
Description of problem:

$ virt-builder --arch ppc64le fedora-21 --output fedora-21-ppc64le
$ virt-inspector -a fedora-21-ppc64le
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/sda5</root>
    <name>linux</name>
    <arch>ppc64</arch>     # incorrect, should be ppc64le

The root cause seems to be because guestfs_file_architecture
gives the wrong output:

$ guestfish --ro -a fedora-21-ppc64le -i

><fs> file-architecture /boot/vmlinuz-3.17.4-301.fc21.ppc64le 
ppc64
><fs> file-architecture /bin/ls
ppc64

The output of 'file /bin/ls' on ppc64le is:

ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=bf32a7e5068074a54e91a65b2110a34bd0e9aea4, stripped

Note 'LSB' indicating little endian.

For comparison, on ppc64 (big endian):

ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked, interpreter /lib64/ld64.so.1, for GNU/Linux 2.6.32, BuildID[sha1]=20d03ec87b2e8a3073bcc9e1427f1598ee8e2821, stripped

Version-Release number of selected component (if applicable):

libguestfs-1.29.34-1.fc23.x86_64
Comment 1 Richard W.M. Jones 2015-05-28 08:01:09 EDT
Upstream commit:
https://github.com/libguestfs/libguestfs/commit/33d2b4a7341830efeddb1f258ac77f67a8004d30

$ virt-builder --arch ppc64le fedora-21 --output fedora-21-ppc64le
$ virt-inspector -a fedora-21-ppc64le | grep arch | head -1
    <arch>ppc64le</arch>

Fixed in libguestfs >= 1.29.45.

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