RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1264835 - ppc64le: virt-customize --install fail to detect the guest arch
Summary: ppc64le: virt-customize --install fail to detect the guest arch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.2
Hardware: ppc64le
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1211996 1218766
Blocks: 1288337 1301891
TreeView+ depends on / blocked
 
Reported: 2015-09-21 10:53 UTC by Hu Zhang
Modified: 2016-11-03 17:55 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.32.5-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 17:55:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-customize_install.log (83.09 KB, text/plain)
2015-09-21 10:53 UTC, Hu Zhang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 0 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 12:06:51 UTC

Description Hu Zhang 2015-09-21 10:53:41 UTC
Created attachment 1075458 [details]
virt-customize_install.log

Description of problem:
virt-customize --install fail to detect the guest arch. It returns the error "host cpu
(powerpc64le) and guest arch (ppc64) are not compatible". Actually, the guest arch is ppc64le.
They have the same arch.

Version-Release number of selected component (if applicable):
kernel-3.10.0-316.el7.ppc64le
libguestfs-1.28.1-1.55.el7.ppc64le
libguestfs-tools-c-1.28.1-1.55.el7.ppc64le

How reproducible:
Always

Steps to Reproduce:
1. In host
# virt-customize -a RHEL-Server-ppc64le-7.1-hvm.raw --install openssh -v -x
...
virt-customize: error: host cpu (powerpc64le) and guest arch (ppc64) are
not compatible, so you cannot use command line options that involve running
commands in the guest.  Use --firstboot scripts instead.

If reporting bugs, run virt-customize with debugging enabled and include
the complete output:

  virt-customize -v -x [...]
libguestfs: trace: close
...
  
2. In guest
#  subscription-manager facts
...
distribution.id: Maipo
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 7.1
distribution.version.modifier: ga
lscpu.architecture: ppc64le
lscpu.byte_order: Little Endian
...

Actual results:
In step 1, virt-customize fails to detect the guest arch.

Expected results:
The package should installed successfully through virt-customize --install.

Additional info:
The attachment is the full log file.

Comment 1 Richard W.M. Jones 2015-09-21 10:57:35 UTC
This is fixed upstream, but not in RHEL 7.2.

Upstream fix: https://github.com/libguestfs/libguestfs/commit/33d2b4a7341830efeddb1f258ac77f67a8004d30
Upstream bug 1211996

Should be fixed by the rebase.

Comment 5 Xianghua Chen 2016-06-28 06:16:53 UTC
It still failed with packages:
libguestfs-1.32.5-6.el7.x86_64

Steps:
1. Prepare an ppc64le guest image:
RHEL-7.1-ppc64le.qcow2 
2. Create  a tmp.qcow2 to only record the difference to backing_file:
# qemu-img create -f qcow2 -o backing_file=RHEL-7.1-ppc64le.qcow2 tmp.qcow2
# virt-inspector -a tmp.qcow2 
<?xml version="1.0"?>
<operatingsystems>
  <operatingsystem>
    <root>/dev/rhel-l/root</root>
    <name>linux</name>
    <arch>ppc64le</arch>
    <distro>rhel</distro>
    <product_name>Red Hat Enterprise Linux Server 7.1 (Maipo)</product_name>
    <major_version>7</major_version>
    <minor_version>1</minor_version>
    <package_format>rpm</package_format>
    <package_management>yum</package_management>
    <hostname>localhost.localdomain</hostname>
    <format>installed</format>
    <mountpoints>
      <mountpoint dev="/dev/rhel-l/root">/</mountpoint>
      <mountpoint dev="/dev/sda2">/boot</mountpoint>
... ... 
3. # virt-customize -a tmp.qcow2  --install openssh
[   0.0] Examining the guest ...
[   3.0] Setting a random seed
[   3.0] Installing packages: openssh
virt-customize: error: host cpu (x86_64) and guest arch (ppc64le) are not 
compatible, so you cannot use command line options that involve running 
commands in the guest.  Use --firstboot scripts instead.

If reporting bugs, run virt-customize with debugging enabled and include 
the complete output:

  virt-customize -v -x [...]


The error is still there.

Comment 6 Pino Toscano 2016-06-28 07:59:43 UTC
(In reply to Xianghua Chen from comment #5)
> virt-customize: error: host cpu (x86_64) and guest arch (ppc64le) are not 
> compatible, so you cannot use command line options that involve running 
> commands in the guest.  Use --firstboot scripts instead.

This is correct: you cannot run (easily, I'd say) ppc64le binaries using the x86_64 appliance built from the host.

You need to try on a ppc64le host as well, like shown in comment #0.

Comment 7 Xianghua Chen 2016-06-29 02:15:07 UTC
(In reply to Pino Toscano from comment #6)
> (In reply to Xianghua Chen from comment #5)
> > virt-customize: error: host cpu (x86_64) and guest arch (ppc64le) are not 
> > compatible, so you cannot use command line options that involve running 
> > commands in the guest.  Use --firstboot scripts instead.
> 
> This is correct: you cannot run (easily, I'd say) ppc64le binaries using the
> x86_64 appliance built from the host.
> 
> You need to try on a ppc64le host as well, like shown in comment #0.

I'm sorry I have pasted the wrong log I think... I should paste the one on ppc64le.
Actually I tried first on x86_64 which gives the above error, then I tried on ppc64le it still fail as following:
----------------------------------------------------------
# uname -a
Linux ibm-p8-rhevm-17.lab4.eng.bos.redhat.com 3.10.0-327.el7.ppc64le #1 SMP Thu Oct 29 17:31:13 EDT 2015 ppc64le ppc64le ppc64le GNU/Linux

# virt-customize -a RHEL-7.1-ppc64le.qcow2 --install openssh
[   0.0] Examining the guest ...
[   5.6] Setting a random seed
[   5.6] Installing packages: openssh
virt-customize: error: host cpu (powerpc64le) and guest arch (ppc64le) are 
not compatible, so you cannot use command line options that involve running 
commands in the guest.  Use --firstboot scripts instead.

If reporting bugs, run virt-customize with debugging enabled and include 
the complete output:

  virt-customize -v -x [...]
---------------------------------------------------------

It's not fixed yet, the error is the same as before.

Comment 8 Richard W.M. Jones 2016-06-29 09:15:21 UTC
Should be fixed by:
https://github.com/libguestfs/libguestfs/commit/3ac0aa82327a23e3a2538f46938481beae72d2ec

Comment 10 Xianghua Chen 2016-07-07 02:39:04 UTC
Verified with the packages:
libguestfs-1.32.5-6.el7.x86_64

Verify steps:
1. Prepare an ppc64le guest image:
RHEL-7.1-ppc64le.qcow2 
2. Create  a tmp.qcow2 to only record the difference to backing_file:
# qemu-img create -f qcow2 -o backing_file=RHEL-7.1-ppc64le.qcow2 tmp.qcow2
3. 
# virt-customize -a tmp.qcow2 --install openssh[   0.0] Examining the guest ...
[   5.6] Setting a random seed
[   5.6] Installing packages: openssh
[   6.8] Finishing off

4. 
# guestfish -a tmp.qcow2 -i sh 'rpm -qa | grep -i openssh'
openssh-clients-6.6.1p1-28.el7.ppc64le
openssh-6.6.1p1-28.el7.ppc64le
openssh-server-6.6.1p1-28.el7.ppc64le


Commands finished successfully, and the package has been installed correctly.

So verified.

Comment 11 Richard W.M. Jones 2016-07-07 07:34:52 UTC
(In reply to Xianghua Chen from comment #10)
> # guestfish -a tmp.qcow2 -i sh 'rpm -qa | grep -i openssh'
> openssh-clients-6.6.1p1-28.el7.ppc64le
> openssh-6.6.1p1-28.el7.ppc64le
> openssh-server-6.6.1p1-28.el7.ppc64le

This should also have worked:

virt-inspector -a tmp.qcow2 | grep openssh

Comment 13 errata-xmlrpc 2016-11-03 17:55:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2576.html


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