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(-) -- 2.3.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list