mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
qemuCheckDiskConfigAgainstDomain: Validate disk's SCSI address iff disk is SCSI
Check the disk SCSI address only when the disk actually is of SCSI type. Signed-off-by: Xu Yandong <xuyandong2@huawei.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5f646ffda0
commit
d72ed16ba7
@ -8314,7 +8314,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;
|
||||
|
Loading…
Reference in New Issue
Block a user