diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 047c4fc98b..ed8b53f81e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3055,8 +3055,12 @@ int virDomainDiskDefAssignAddress(virCapsPtr caps, virDomainDiskDefPtr def) { int idx = virDiskNameToIndex(def->dst); - if (idx < 0) + if (idx < 0) { + virReportError(VIR_ERR_XML_ERROR, + _("Unknown disk name '%s' and no address specified"), + def->dst); return -1; + } switch (def->bus) { case VIR_DOMAIN_DISK_BUS_SCSI: diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 02e105d9c9..9c9a0ed7e8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8381,8 +8381,12 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps, !disk->dst) goto no_memory; - if (virDomainDiskDefAssignAddress(caps, disk) < 0) + if (virDomainDiskDefAssignAddress(caps, disk) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Cannot assign address for device name '%s'"), + disk->dst); goto error; + } if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0) goto no_memory;