Created attachment 952106 [details] make virDomainDetachDeviceFlags() honor VIR_DOMAIN_DEVICE_MODIFY_FORCE Description of problem: virDomainDetachDeviceFlags() does not support VIR_DOMAIN_DEVICE_MODIFY_FORCE. This means that there is no way to forcefully detach disk from running domain if it does not respond to ACPI unplug request (other then shutting it down). Version-Release number of selected component (if applicable): 1.2.9 Steps to Reproduce: 1. Run linux without acpiphp module 2. detach-disk from virsh Actual results: Disk stays attached and there is no way to detach it. It is possible to use QEMU command 'drive_del' manually but libvirt won't notice that its disk definitions are incorrect. Expected results: Add --force argument to detch-disk and make virDomainDetachDeviceFlags() call drive_del unconditionally if VIR_DOMAIN_DEVICE_MODIFY_FORCE was passed. Additional info: Patch proposal attached. Originally against 1.2.6 but applies to 1.2.9 as well.
Sorry this didn't receive a timely response. Your patch looks okay to me, can you send this libvir-list ?
This was brought upstream at some point, but it wasn't followed up. Just closing the bug, if you'd like to see this in libvirt.git you need to follow up on libvir-list