Bug 1591561
Summary: | libvirtd crash when detach serial device using 'virsh detach-device-alias --config' | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yafu <yafu> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.6 | CC: | dyuan, jiyan, lmen, xuzhang, yalzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-4.5.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 09:56:58 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yafu
2018-06-15 02:37:35 UTC
Detaching channel device can hit this issue, too. Version: libvirt-4.4.0-2.el7.x86_64 kernel-3.10.0-902.el7.x86_64 qemu-kvm-rhev-2.12.0-3.el7.x86_64 Steps: # virsh domstate test1 shut off # virsh dumpxml test1 |grep "<channel" -A4 <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <alias name='ua-fb00b3f4-ec4b-4f39-95e8-04b78b405576'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> # virsh start test1 Domain test1 started # virsh detach-device-alias test1 ua-fb00b3f4-ec4b-4f39-95e8-04b78b405576 --config error: Disconnected from qemu:///system due to end of file error: Failed to detach device with alias ua-fb00b3f4-ec4b-4f39-95e8-04b78b405576 error: End of file while reading data: Input/output error Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2018-June/msg01284.html I've just pushed patch upstream: commit edcd3ed4a45689e828a2177e8196a61acc16f6ed Author: Michal Privoznik <mprivozn> AuthorDate: Fri Jun 15 16:16:08 2018 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Mon Jun 18 09:20:38 2018 +0200 qemuDomainDetachDeviceConfig: Don't free device from @dev https://bugzilla.redhat.com/show_bug.cgi?id=1591561 For reasons I don't understand my original patch of 75f0fd51124 freed not only the chardev from domain but also the one from passed virDomainDeviceDefPtr. This caused no troubles until now, because those two pointers were separate, but after I've introduced virDomainDetachDeviceAlias() they became the same resulting in double free on detach. Signed-off-by: Michal Privoznik <mprivozn> Reviewed-by: Ján Tomko <jtomko> v4.4.0-263-gedcd3ed4a4 Version: qemu-kvm-rhev-2.12.0-7.el7.x86_64 libvirt-4.5.0-1.el7.x86_64 kernel-3.10.0-919.el7.x86_64 ======================1. PTY CHARDEV 1-1. pty+isa-serial (Serial/console) and pty+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev pty,id=charua-9874229d-d867-4932-ad28-111111111111 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-111111111111,id=ua-9874229d-d867-4932-ad28-111111111111 -chardev pty,id=charua-9874229d-d867-4932-ad28-111111111112 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-111111111112,id=ua-9874229d-d867-4932-ad28-111111111112,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111111 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111112 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output 1-2. pty +virtio (Channel) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev pty,id=charua-9874229d-d867-4932-ad28-111111111201 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charua-9874229d-d867-4932-ad28-111111111201,id=ua-9874229d-d867-4932-ad28-111111111201,name=arbitrary.virtio.serial.port.name # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111201 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive |grep "<channel" -A5 No output ======================2. File CHARDEV 2-1. file+isa-serial (Serial/console) and file+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev file,id=charua-9874229d-d867-4932-ad28-11111111113,path=/dev/fdset/2,append=on -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111113,id=ua-9874229d-d867-4932-ad28-11111111113 -add-fd set=3,fd=32 -chardev file,id=charua-9874229d-d867-4932-ad28-11111111114,path=/dev/fdset/3,append=on -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111114,id=ua-9874229d-d867-4932-ad28-11111111114,bus=pci.0,addr=0xa # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111113 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111114 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================3. PIPE CHARDEV 3-1. pipe+isa-serial (Serial/console) and pipe+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev pipe,id=charua-9874229d-d867-4932-ad28-11111111115,path=/tmp/mypipe -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111115,id=ua-9874229d-d867-4932-ad28-11111111115 -chardev pipe,id=charua-9874229d-d867-4932-ad28-11111111116,path=/tmp/mypipe1 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111116,id=ua-9874229d-d867-4932-ad28-11111111116,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111115 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111116 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================4. NULL CHARDEV 4-1. null+isa-serial (Serial/console) and null+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev null,id=charua-9874229d-d867-4932-ad28-11111111117 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111117,id=ua-9874229d-d867-4932-ad28-11111111117 -chardev null,id=charua-9874229d-d867-4932-ad28-11111111118 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111118,id=ua-9874229d-d867-4932-ad28-11111111118,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111117 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111118 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:03 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================5. VC CHARDEV 5-1. vc+isa-serial (Serial/console) and vc+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev vc,id=charua-9874229d-d867-4932-ad28-11111111119 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111119,id=ua-9874229d-d867-4932-ad28-11111111119 -chardev vc,id=charua-9874229d-d867-4932-ad28-11111111120 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111120,id=ua-9874229d-d867-4932-ad28-11111111120,bus=pci.0,addr=0xc # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111119 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111120 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:03 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================6. UDP CHARDEV 6-1. udp+isa-serial (Serial/console) and udp+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev udp,id=charua-9874229d-d867-4932-ad28-11111111121,host=0.0.0.0,port=2445,localaddr=0.0.0.0,localport=2445 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111121,id=ua-9874229d-d867-4932-ad28-11111111121 -chardev udp,id=charua-9874229d-d867-4932-ad28-11111111122,host=0.0.0.0,port=2445,localaddr=0.0.0.0,localport=2445 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111122,id=ua-9874229d-d867-4932-ad28-11111111122,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111121 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111122 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 16766 1 0 23:24 ? 00:00:03 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================7. SPICEPORT CHARDEV 7-1. spiceport+isa-serial (Serial/console) and spiceport+pci-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev spiceport,id=charua-9874229d-d867-4932-ad28-11111111123,name=org.qemu.console.serial.0 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111123,id=ua-9874229d-d867-4932-ad28-11111111123 -chardev spiceport,id=charua-9874229d-d867-4932-ad28-11111111124,name=org.qemu.console.serial.0 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111124,id=ua-9874229d-d867-4932-ad28-11111111124,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111123 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111124 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================8. SOCKET CHARDEV 8-1. unix+isa-serial (Serial/console) and unix-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev socket,id=charua-9874229d-d867-4932-ad28-11111111125,fd=30,server,nowait -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111125,id=ua-9874229d-d867-4932-ad28-11111111125 -chardev socket,id=charua-9874229d-d867-4932-ad28-11111111126,fd=31,server,nowait -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111126,id=ua-9874229d-d867-4932-ad28-11111111126,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111125 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111126 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output 8-2. tcp+isa-serial (Serial/console) and tcp-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev socket,id=charua-9874229d-d867-4932-ad28-11111111131,host=127.0.0.1,port=5556,tls-creds=objcharua-9874229d-d867-4932-ad28-11111111131_tls0 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111131,id=ua-9874229d-d867-4932-ad28-11111111131 -object tls-creds-x509,id=objcharua-9874229d-d867-4932-ad28-11111111132_tls0,dir=/etc/pki/libvirt-chardev,endpoint=client,verify-peer=yes -chardev socket,id=charua-9874229d-d867-4932-ad28-11111111132,host=127.0.0.1,port=5556,tls-creds=objcharua-9874229d-d867-4932-ad28-11111111132_tls0 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111132,id=ua-9874229d-d867-4932-ad28-11111111132,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:04 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111131 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111132 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:04 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output 8-3. unix+virtio (Channel) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev socket,id=charua-9874229d-d867-4932-ad28-111111111202,fd=30,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charua-9874229d-d867-4932-ad28-111111111202,id=ua-9874229d-d867-4932-ad28-111111111202,name=org.qemu.guest_agent.0 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111202 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive |grep "<channel" -A5 No output 8-4. tcp+passthrough (Smartcard) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev socket,id=charua-9874229d-d867-4932-ad28-111111111502,host=127.0.0.1,port=2001,server,nowait,tls-creds=objcharua-9874229d-d867-4932-ad28-111111111502_tls0 -device ccid-card-passthru,chardev=charua-9874229d-d867-4932-ad28-111111111502,id=ua-9874229d-d867-4932-ad28-111111111502,bus=ccid0.0 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:07 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111502 --config error: Failed to detach device with alias ua-9874229d-d867-4932-ad28-111111111502 error: Operation not supported: persistent detach of device 'smartcard' is not supported # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:07 /usr/sbin/libvirtd 8-4. tcp+usb (Redir) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev socket,id=charua-9874229d-d867-4932-ad28-111111111602,host=10.66.4.201,port=4000 -device usb-redir,chardev=charua-9874229d-d867-4932-ad28-111111111602,id=ua-9874229d-d867-4932-ad28-111111111602,bus=usb.0,port=2 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:08 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111602 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:08 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive |grep "<redir" -A10 No output ======================9. STDIO CHARDEV 9-1. stdio+isa-serial (Serial/console) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev stdio,id=charua-9874229d-d867-4932-ad28-11111111127 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111127,id=ua-9874229d-d867-4932-ad28-11111111127 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111125 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output 9-2. stdio-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev stdio,id=charua-9874229d-d867-4932-ad28-11111111128 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111128,id=ua-9874229d-d867-4932-ad28-11111111128,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111128 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:02 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output ======================10. TTY CHARDEV 10-1. dev+isa-serial (Serial/console) and dev-serial (Serial) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev tty,id=charua-9874229d-d867-4932-ad28-11111111129,path=/dev/ttyS0 -device isa-serial,chardev=charua-9874229d-d867-4932-ad28-11111111129,id=ua-9874229d-d867-4932-ad28-11111111129 -chardev tty,id=charua-9874229d-d867-4932-ad28-11111111130,path=/dev/ttyS0 -device pci-serial,chardev=charua-9874229d-d867-4932-ad28-11111111130,id=ua-9874229d-d867-4932-ad28-11111111130,bus=pci.0,addr=0x9 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:04 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111129 --config Device detach request sent successfully # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-11111111130 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:04 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive|grep "<serial" -A11 No output # virsh dumpxml b2 --inactive|grep "<console" -A11 No output ======================11. SPICEVMC CHARDEV 11-1. spicevmc+virtio (Channel) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev spicevmc,id=charua-9874229d-d867-4932-ad28-111111111203,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=3,chardev=charua-9874229d-d867-4932-ad28-111111111203,id=ua-9874229d-d867-4932-ad28-111111111203,name=com.redhat.spice.0 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111203 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:05 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive |grep "<channel" -A5 No output 11-2. spicevmc+passthrough (Smartcard) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev spicevmc,id=charua-9874229d-d867-4932-ad28-111111111501,name=smartcard -device ccid-card-passthru,chardev=charua-9874229d-d867-4932-ad28-111111111501,id=ua-9874229d-d867-4932-ad28-111111111501,bus=ccid0.0 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:07 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111501 --config error: Failed to detach device with alias ua-9874229d-d867-4932-ad28-111111111501 error: Operation not supported: persistent detach of device 'smartcard' is not supported # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:07 /usr/sbin/libvirtd 11-3. spicevmc+usb (Redir) # virsh domstate b2 running # ps -ef |grep "b2" |sed 's/-device/\n-device/g' -chardev spicevmc,id=charua-9874229d-d867-4932-ad28-111111111601,name=usbredir -device usb-redir,chardev=charua-9874229d-d867-4932-ad28-111111111601,id=ua-9874229d-d867-4932-ad28-111111111601,bus=usb.0,port=1 # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:08 /usr/sbin/libvirtd # virsh detach-device-alias b2 ua-9874229d-d867-4932-ad28-111111111601 --config Device detach request sent successfully # ps -ef |grep libvirtd |grep -v color root 1842 1 0 01:51 ? 00:00:08 /usr/sbin/libvirtd # virsh dumpxml b2 --inactive |grep "<redir" -A10 No output As all the test results are as expected, move this bug to be verified. BTW, can not test vhost-user socket Chardev now because of the following bug. Will Try until this bug fixed. Bug 1597940 - vhost-user socket path is not recognized by libvirt Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:3113 |