diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 98cf06bd68..013add5e9b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5749,6 +5749,16 @@ qemuDomainDelIOThreadCheck(virDomainDefPtr def, } } + for (i = 0; i < def->ncontrollers; i++) { + if (def->controllers[i]->iothread == iothread_id) { + virReportError(VIR_ERR_INVALID_ARG, + _("cannot remove IOThread '%u' since it " + "is being used by controller"), + iothread_id); + return -1; + } + } + return 0; }