diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 72f550bf8d..df44c3fbd0 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19623,6 +19623,10 @@ qemuDomainSetBlockThreshold(virDomainPtr dom, if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0) goto endjob; + /* we need to remember whether the threshold was registered with an explicit + * index to fire the correct event */ + src->thresholdEventWithIndex = !!strchr(dev, '['); + ret = 0; endjob: diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3693796b06..7487e12640 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1487,7 +1487,8 @@ qemuProcessHandleBlockThreshold(qemuMonitor *mon G_GNUC_UNUSED, if (virStorageSourceIsLocalStorage(src)) path = src->path; - if (src == disk->src) { + if (src == disk->src && + !src->thresholdEventWithIndex) { g_autofree char *dev = qemuDomainDiskBackingStoreGetName(disk, 0); eventDevice = virDomainEventBlockThresholdNewFromObj(vm, dev, path,