From: Wen Congyang Date: Mon, 31 Jan 2011 07:55:40 +0000 (+0800) Subject: Initialization error of controller in QEmu SCSI hotplug X-Git-Tag: v0.8.8~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ca5765b912ebd3ec906db5bc42fc72b7907d8e8;p=thirdparty%2Flibvirt.git Initialization error of controller in QEmu SCSI hotplug Bug manifests itself by: 1. # virsh attach-disk --target sdb ... 2. # virsh attach-disk --target sdh ... error: Failed to attach disk error: operation failed: target scsi:0 already exists sdh uses scsi:1, rather than scsi:0. * src/qemu/qemu_hotplug.c: properly set controller idx in qemuDomainFindOrCreateSCSIDiskController() --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index c334f52570..670e7d3a01 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -321,7 +321,7 @@ qemuDomainFindOrCreateSCSIDiskController(struct qemud_driver *driver, return NULL; } cont->type = VIR_DOMAIN_CONTROLLER_TYPE_SCSI; - cont->idx = 0; + cont->idx = controller; cont->model = -1; VIR_INFO0("No SCSI controller present, hotplugging one");