mirror of https://gitee.com/openkylin/libvirt.git
qemuMonitorTextAddDrive: Fail on unrecognized disk format
Since qemu commit 3ef6c40ad0b it can fail if trying to hotplug a disk that is not qcow2 despite us saying it is. We need to error out in that case. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
2065499b60
commit
8ad01d5cc8
|
@ -1963,6 +1963,12 @@ int qemuMonitorTextAddDrive(qemuMonitorPtr mon,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
if (strstr(reply, "Image is not in")) {
|
||||
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
||||
_("Incorrect disk format"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
|
|
Loading…
Reference in New Issue