]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: Automatic SCSI controller creation in SCSI disk hotplug broken
authorBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Mon, 30 Nov 2015 11:06:01 +0000 (12:06 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 4 Dec 2015 18:50:06 +0000 (13:50 -0500)
commit105794cd434d815e483f87732f2084f55ae62c42
tree6d112ff76bbaad2e038049d63da0f305921b5714
parent45c7b9e636a2baf6ca9d138cad1f05943f4c56b7
qemu: Automatic SCSI controller creation in SCSI disk hotplug broken

When a SCSI disk is hotplugged to a domain that does not have the required
SCSI controller already defined and loaded the following internal error occurs

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

Commit 0260506c added in method qemuBuildDriveDevStr a lookup of the controller
alias. The internal error occurs because in method qemuDomainAttachSCSIDisk
the automatic creation of the potentially missing SCSI controller occurs after
calling qemuBuildDriveDevStr.

This patch reverses the calling sequence.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
src/qemu/qemu_hotplug.c