Bug 1267882 - Can't create ppc64 guests on a ppc64le host
Can't create ppc64 guests on a ppc64le host
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
ppc64le Linux
unspecified Severity high
: rc
: ---
Assigned To: Andrea Bolognani
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2015-10-01 05:46 EDT by Andrea Bolognani
Modified: 2015-11-19 01:55 EST (History)
11 users (show)

See Also:
Fixed In Version: libvirt-1.2.17-13.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-19 01:55:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrea Bolognani 2015-10-01 05:46:17 EDT
Attempting to create a ppc64 guest on a ppc64le host fails
right away with the following error message:
  $ virt-install --arch ppc64 ...
  ERROR    Host does not support any virtualization options for arch 'ppc64'

Editing an existing guest by changing the contents of the
<arch> element from ppc64le to ppc64 also fails:

  $ virsh edit ...
  error: invalid argument: could not find capabilities for arch=ppc64 
  Failed. Try again? [y,n,i,f,?]: 

The same happens if you try creating a ppc64le guest on a
ppc64 host.

It should be possible to create ppc64 guests on ppc64le
hosts, and vice versa, because the CPU endianness is
chosen by the guest kernel at startup.
Comment 3 Andrea Bolognani 2015-10-01 08:51:46 EDT
Fix posted upstream.

Comment 4 David Gibson 2015-10-01 19:43:15 EDT
Am I right in thinking you can workaround this by choosing "ppc64le" in the libvirt config, but installing a ppc64 (BE) guest anyway?
Comment 5 Andrea Bolognani 2015-10-05 02:33:19 EDT
(In reply to David Gibson from comment #4)
> Am I right in thinking you can workaround this by choosing "ppc64le" in the
> libvirt config, but installing a ppc64 (BE) guest anyway?

Yes, you can definitely do that, but of course it's kinda
ugly - not to mention very confusing to someone who's just
trying to install a BE guest on a LE host.
Comment 6 Andrea Bolognani 2015-10-05 04:07:16 EDT
The issue has been fixed upstream.

  commit 938368f8382ca94c5156c44ad85a06cf9e4f8f8f
  Author: Andrea Bolognani <abologna@redhat.com>
  Date:   Wed Sep 30 11:58:58 2015 -0400

      qemu: Add conditions for qemu-kvm use on ppc64

      qemu-kvm can be used to run ppc64 guests on ppc64le hosts and vice
      versa, since the hardware is actually the same and the endianness
      is chosen by the guest kernel.

      Up until now, however, libvirt didn't allow the use of qemu-kvm
      to run guests if their endianness didn't match the host's.

      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1267882

Comment 9 Dan Zheng 2015-10-09 03:18:20 EDT
Reproduce with below package:

Test with below packages:

Below tests are executed.
1. Pass.  virt-install can work with --arch ppc64, the guest is created, running and can be accessed.
virt-install --name rhel72-20151008-be --arch ppc64 --location http://download.eng.bos.redhat.com/rel-eng/RHEL-7.2-Snapshot-4.1/compose/Server/ppc64/os/ --memory 2048 --disk size=20,bus=virtio --nographics  --network model=virtio,bridge=virbr0

2. Pass. virt-install can work with --arch ppc64le, the guest is created, running and can be accessed.
virt-install --name rhel72-20151008-le --arch ppc64le --location http://download.eng.bos.redhat.com/rel-eng/RHEL-7.2-Snapshot-4.1/compose/Server/ppc64le/os/ --memory 2048 --disk size=20,bus=virtio --nographics  --network model=virtio,bridge=virbr0

3. Pass. Edit a guest XML and changes can be saved.
# virsh edit guest
Change to arch='ppc64' instead of arch='ppc64le'
    <type arch='ppc64' machine='pseries-rhel7.2.0'>hvm</type>
    <boot dev='hd'/>

4. No ppc64 machine, so the vice versa scenarios can not be tested.
Comment 11 errata-xmlrpc 2015-11-19 01:55:48 EST
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.


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