Using virt-install fails on ppc64el with "ERROR XML error: No PCI buses available"

Bug #1396595 reported by Breno Leitão
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Currently, if you don't specify the parameter "--arch=ppc64" to virt-install, the virt-install will fail as follows:

  $ virt-install --name breno --memory 4096 --disk size=500,bus=virtio --cdrom mini.iso
  WARNING CDROM media does not print to the text console by default, so you likely will not see text install output. You might
    want to use --location.

  Starting install...
  Allocating 'breno.qcow2' | 500 GB 00:04
  ERROR XML error: No PCI buses available
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start breno
  otherwise, please restart your installation.

On the other side, if the option --arch=ppc64 is passed, it works fine. I generated a diff of both XML generated in both cases, and the result is the following (with some unimportant parts removed):

+ <type arch="ppc64" machine="pseries">hvm</type>
     <boot dev="cdrom"/>
     <boot dev="hd"/>
   </os>
@@ -19,33 +19,33 @@
   <on_reboot>destroy</on_reboot>
   <on_crash>destroy</on_crash>
   <devices>
- <emulator>/usr/bin/qemu-system-ppc64le</emulator>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
     <disk type="file" device="disk">
       <driver name="qemu" type="qcow2"/>
       <driver name="qemu" type="raw"/>
       <source file="/home/brenohl/versions/14.04.2/mini.iso"/>
- <target dev="hda" bus="ide"/>
+ <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>
   <vcpu>1</vcpu>
   <os>
- <type arch="ppc64le">hvm</type>
+ <type arch="ppc64" machine="pseries">hvm</type>
     <boot dev="hd"/>
   </os>
   <features>
@@ -58,19 +58,19 @@
   <on_reboot>restart</on_reboot>
   <on_crash>restart</on_crash>
   <devices>
- <emulator>/usr/bin/qemu-system-ppc64le</emulator>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
     <disk type="file" device="disk">
       <driver name="qemu" type="qcow2"/>
     </disk>
     <disk type="block" device="cdrom">
- <target dev="hda" bus="ide"/>
+ <target dev="sda" bus="scsi"/>
       <readonly/>
     </disk>

I understand that libvirt should consider ppc64le a ppc64 guests for all purposes.

Tags: ppc64el
Revision history for this message
Breno Leitão (breno-leitao) wrote :

I tested it on a Ubuntu 14.10 fully upgraded using libvirt version 1.2.8-0ubuntu11.1, which already contains fixes for #1379346

tags: added: ppc64el
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug.

It looks like virstinst is creating wrong xml, so marking this as affecting the virstinst package.

affects: libvirt (Ubuntu) → virtinst (Ubuntu)
Changed in virtinst (Ubuntu):
importance: Undecided → High
Revision history for this message
Breno Leitão (breno-leitao) wrote :

Any news about this bug? This is affecting Ubuntu running as host on POWER machines.

Revision history for this message
Breno Leitão (breno-leitao) wrote :
Download full text (3.3 KiB)

In order to solve this problem, the following libvirt commits are required. They were also accepted in vivid, as described by bug #1396070

commit 3bc6dda6c55ed2ebc8604b9dc0410639eaede8cb
Author: Cole Robinson <email address hidden>
Date: Tue Sep 23 11:35:57 2014 -0400

    qemu_command: Split qemuBuildCpuArgStr

    Move the CPU mode/model handling to its own function. This is just
    code movement and re-indentation.

commit 445a09bdc96ca6e434bfdcca75752ee316289bbe
Author: Cole Robinson <email address hidden>
Date: Tue Sep 23 13:07:09 2014 -0400

    qemu: Don't compare CPU against host for TCG

    Right now when building the qemu command line, we try to do various
    unconditional validations of the guest CPU against the host CPU. However
    this checks are overly applied. The only time we should use the checks
    are:

commit da636d83dc6b1d070a705786b4daef8644eaca13
Author: Prerna Saxena <email address hidden>
Date: Tue Nov 4 22:51:26 2014 +0530

    Cpu: Add support for Power LE Architecture.

    This adds support for PowerPC Little Endian architecture.,
    and allows libvirt to spawn VMs based on 'ppc64le' architecture.

commit addce06c9221f948072cd222b56ea9c3f70ec066
Author: Prerna Saxena <email address hidden>
Date: Tue Nov 4 22:52:44 2014 +0530

    PowerPC : Add support for launching VM in 'compat' mode.

    PowerISA allows processors to run VMs in binary compatibility ("compat")
    mode supporting an older version of ISA. QEMU has recently added support to
    explicitly denote a VM running in compatibility mode through commit 6d9412ea
    & 8dfa3a5e85. Now, a "compat" mode VM can be run by invoking this qemu
    commandline on a POWER8 host: -cpu host,compat=power7.

commit 1e911742287d964055f33ab76d53e673a9b4477f
Author: Prerna Saxena <email address hidden>
Date: Tue Nov 4 22:58:33 2014 +0530

    PowerPC:Improve PVR handling to fall back to cpu generation.

    IBM Power processors differ uniquely across generations (such as power6,
    power7, power8). Each generation signifies a new PowerISA version
    that exhibits features unique to that generation.
    The higher 16 bits of PVR for IBM Power processors encode the CPU
    generation, while the CPU chip (sub)version is encoded in lower 16 bits.

commit 9265fd19b68d787e478f5e490524da794965a5f1
Author: Prerna Saxena <email address hidden>
Date: Tue Nov 4 23:00:36 2014 +0530

    docs: Add documentation for compat mode.

    Add documentation to explain how compat-mode can be invoked with libvirt
    running on PowerPC architecture.
    It also mentions that this change is available libvirt 1.2.11 onwards.

    Signed-off-by: Prerna Saxena <email address hidden>
    Reviewed-by: Michal Privoznik <email address hidden>

commit 12c381114ce362e49cadb730b5faabbc150a8878
Author: Prerna Saxena <email address hidden>
Date: Tue Nov 4 23:02:15 2014 +0530

    Test: Add a testcase for PowerPC compat mode cpu specification.

    This introduces a testcase for PowerPC compat mode cpu specification.

    Signed-off-by: Prerna Saxena <email address hidden>
    Reviewed-by: Michal Privoznik <email address hidden>

These patches have been tested -- the...

Read more...

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks - base don that comment, I've marked this fix released in Vivid, since those patches are present. I've marked them for SRU into trusty and utopic.

Does this in fact affect trusty, or only utopic?

Changed in libvirt (Ubuntu):
status: New → Fix Released
importance: Undecided → High
no longer affects: virtinst (Ubuntu Utopic)
no longer affects: virtinst (Ubuntu Trusty)
no longer affects: virtinst (Ubuntu)
Changed in libvirt (Ubuntu Trusty):
status: New → Triaged
Changed in libvirt (Ubuntu Utopic):
status: New → Triaged
Changed in libvirt (Ubuntu Trusty):
importance: Undecided → High
Changed in libvirt (Ubuntu Utopic):
importance: Undecided → High
Revision history for this message
Breno Leitão (breno-leitao) wrote :

>Does this in fact affect trusty, or only utopic?
well, trusty doesn't support KVM at the moment, but I am planning to ask for it in 14.04.3, so, it would be good if we have these fixes in trusty also.

Thanks

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

So it sounds like they are not yet useful, so it's hard to say these are appropriate for SRU. Please reply here if/when they become useful (i.e. the feature you need is in 14.04.3).

no longer affects: libvirt (Ubuntu Trusty)
no longer affects: libvirt (Ubuntu Utopic)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.