Description of problem: Detach a console device from running guest should be rejected. Version-Release number of selected component (if applicable): libvirt-3.2.0-3.el7.x86_64 qemu-kvm-rhev-2.9.0-2.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.Start a guest with console device: #virsh dumpxml rhel7.3-min ... <console type='pty' tty='/dev/pts/13'> <source path='/dev/pts/13'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> ... 2.Prepare the console device xml: #cat console.xml <console type='pty' tty='/dev/pts/13'> <source path='/dev/pts/13'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> 3.Detach the console device from the guest: #virsh detach-device rhel7.3-min console.xml Device detached successfully 4.Check the active xml of the guest, the console device is not detached actually: #virsh dumpxml rhel7.3-min ... <console type='pty' tty='/dev/pts/13'> <source path='/dev/pts/13'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> ... 5.Detach the console device with --config, it failed: # virsh detach-device rhel7.3-min console.xml --config error: Failed to detach device from console.xml error: Requested operation is not valid: detaching serial console is not supported Actual results: Detach a console device from running guest returns successfully, but actually not detached. Expected results: Since detach a console device with --config is rejected, detach from the running guest should also be rejected.
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.