提交 7ca5765b 编写于 作者: W Wen Congyang 提交者: Daniel Veillard

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()
上级 53258f3e
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册