On 9/19/19 10:02 AM, Xu Yandong wrote:
Check the disk scsi address only when the disk is scsi type. Signed-off-by: Xu Yandong <xuyandong2@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 62ce7270ca..ff2173da5e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8326,7 +8326,8 @@ static int qemuCheckDiskConfigAgainstDomain(const virDomainDef *def, const virDomainDiskDef *disk) { - if (virDomainSCSIDriveAddressIsUsed(def, &disk->info.addr.drive)) { + if (disk->bus == VIR_DOMAIN_DISK_BUS_SCSI && + virDomainSCSIDriveAddressIsUsed(def, &disk->info.addr.drive)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("Domain already contains a disk with that address")); return -1;
Nice catch! Reviewed-by: Michal Privoznik <mprivozn@xxxxxxxxxx> Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list