Bug 1005768

Summary: virtio-scsi hotplugging doesn't work on ARM: could not attach disk to libvirt domain: internal error: SCSI controller 0 was missing its PCI address
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-10 14:42:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Richard W.M. Jones 2013-09-09 11:26:26 UTC
Description of problem:

NOTE that I'm using libvirt with Cole's not-yet-upstream patches
to enable ARM & virtio-mmio support (the latest version is here:
http://www.redhat.com/archives/libvir-list/2013-August/msg01627.html )

Although I can add a virtio-scsi disk using a regular domain
definition just fine, trying to hot-add a disk fails with
the error:

  could not attach disk to libvirt domain: internal error: SCSI controller 0 was missing its PCI address [code=1 domain=10]

A simple libguestfs-based reproducer is:

 $ guestfish run : add-drive /dev/null label:foo -v

which, if you have all the right versions of libvirt, libguestfs,
supermin & kernel installed and the Moon is in the right place will
print:

libguestfs: hot-add disk XML:
<?xml version="1.0"?>
<disk device="disk" type="file">
  <source file="/home/rjones/d/libguestfs/tmp/libguestfspMZxoV/devnull2"/>
  <target dev="sdb" bus="scsi"/>
  <driver name="qemu" type="raw" cache="writeback"/>
  <serial>foo</serial>
  <address type="drive" controller="0" bus="0" target="1" unit="0"/>
</disk>
libguestfs: error: could not attach disk to libvirt domain: internal error: SCSI controller 0 was missing its PCI address [code=1 domain=10]
libguestfs: closing guestfs handle 0x11a4e08 (state 2)

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

libvirt from git + Cole's ARM patches.

Comment 1 Cole Robinson 2016-04-10 14:42:34 UTC
I tested this not too long ago and it worked for me, as long as the VM already had a virtio-scsi controller attached (I think we talked about this in a fedora qemu bug too)