[libvirt] [PATCH 0/3] libvirt: Fix automatic SCSI controller create in hotplug

Boris Fiuczynski fiuczy at linux.vnet.ibm.com
Mon Nov 30 11:05:58 UTC 2015

Trying to hotplug a SCSI device to a domain without the required SCSI
controller fails.

For hostdev SCSI device hotplug commits 0d8b24f6 and 0785966d rearranged
the automatic creation of the required SCSI controllers from the parsing
xml code into the post parsing code section of virDomainDefParseXML. In
doing so the code will create but not hotplug the missing SCSI controller
and on the hotplug path thru the same code the SCSI controller will not get
hotplugged since it already exits. Then the SCSI hostdev device is
hotplugged and runs into the following internal error

error: Failed to attach device from scsidev.xml
error: internal error: Device alias was not set for scsi controller with index 0

For disk SCSI device hotplug commit 0260506c added in method
qemuBuildDriveDevStr a lookup of the controller alias. The internal error

error: Failed to attach device from scsi_disk.xml
error: internal error: Could not find scsi controller with index 0 required for device

occurs because in method qemuDomainAttachSCSIDisk the automatic creation
of the missing SCSI controller occurs after calling qemuBuildDriveDevStr.

Boris Fiuczynski (3):
  conf: Reposition adding SCSI controller for SCSI hostdev hotplug
  Revert "conf: Try controller add when searching hostdev bus for unit"
  Automatic SCSI controller creation in SCSI disk hotplug broken

 src/conf/domain_conf.c  | 16 ++++------------
 src/qemu/qemu_hotplug.c | 12 ++++++------
 2 files changed, 10 insertions(+), 18 deletions(-)


More information about the libvir-list mailing list