SUSE Support

Here When You Need Us

Error no PCI slots when adding disks to KVM guest

This document (7023670) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
SUSE Linux Enterprise Server 15

Situation

The customer successfully added 26 disks using the command below, but encountered an error when attempting to add the 27th disk.
kvm-host:~ # virsh attach-disk kvm-guest /dev/disk/by-id/dm-uuid-mpath-360000970000298701039736551233146  vdq --cache=none --persistent
error: Failed to attach disk
error: internal error: No more available PCI slots

kvm-host:~ # virsh dumpxml kvm-guest | grep -i pci-bridge

Resolution

Add a PCI Bridge definition to the kvm-guest. The following example assumes a KVM guest with a guest ID of kvm-guest already exists.

1. Power off the kvm-guest and dump the kvm-guest configuration file to kvm-guest.xml.
kvm-host:~ # virsh shutdown kvm-guest
kvm-host:~ # virsh dumpxml kvm-guest > kvm-guest.xml

2. In the <devices> section add the following to the kvm-guest.xml configuration file and save the changes:
  <devices>
    ...
    <controller type='pci' model='pci-bridge'/>
    ...
  </devices>

3. Import the edits to kvm-guest
kvm-host:~ # virsh define kvm-guest.xml
Domain kvm-guest defined from kvm-guest.xml

4. Add the remaining disks with virsh attach-disk.

Cause

The PCI bus for pc-i440fx machines has 31 slots, some of which are used by other devices. Each virtio-blk device takes up a PCI slot, so 26 is about the max. You can plug a PCI bridge into one of the slots, giving another 31 slots, which increases the number of virtio-blk devices that can be plugged.

Additional Information


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023670
  • Creation Date: 24-Jan-2019
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.