diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index c0c3a8ec9f..409f492ec7 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -6219,6 +6219,10 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, info->addr.pci.slot, info->addr.pci.function); return -1; } + } else if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_UNASSIGNED) { + /* Unassigned devices are not exposed to QEMU, so remove the device + * explicitly, just like if we received DEVICE_DELETED event.*/ + return qemuDomainRemoveDevice(driver, vm, &detach); } /*