Red Hat Bugzilla – Bug 1322210
Fail to hotplug guest agent with libvirt-1.3.2-1.el7
Last modified: 2016-11-03 14:40:55 EDT
Description of problem: Fail to hotplug guest agent with the latest libvirt packet Version-Release number of selected component (if applicable): libvirt-1.3.2-1.el7 How reproducible: 100% Steps to Reproduce: 1.Prepare a running guest without guest agent configured # virsh list --all Id Name State ---------------------------------------------------- 1 virt-tests-vm3 running 2.Prepare a guest agent xml # cat agent.xml <channel type='unix'> <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> 3.Hotplug the guest agent, will report the following error # virsh attach-device virt-tests-vm3 agent.xml error: Failed to attach device from agent.xml error: internal error: unable to execute QEMU command 'chardev-add': Invalid parameter type for 'path', expected: string 4.Check the loginfo, found following messages #cat /var/log/libvirt/libvirtd.log -- 2016-03-25 09:02:22.847+0000: 10269: debug : qemuMonitorJSONCheckError:374 : unable to execute QEMU command {"execute":"chardev-add","arguments":{"id":"charchannel0","backend":{"type":"socket","data":{"addr":{"type":"unix","data":{"path":null}},"wait":false,"server":true}}},"id":"libvirt-12"}: {"id":"libvirt-12","error":{"class":"GenericError","desc":"Invalid parameter type for 'path', expected: string"}} Actual results: Fail to hotplug guest agent Expected results: Should hotplug guest agent successfully Additional info: It works well in RHEL7.2.Z with libvirt-1.2.17-13.el7_2.2.x86_64
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2016-March/msg01454.html
Fixed upstream with v1.3.5-181-gf670008b58b7..v1.3.5-183-g326e5941cd6a: commit f670008b58b7951d0d05c2bd0317cf498bf463c2 Author: Martin Kletzander <mkletzan@redhat.com> Date: Wed Mar 30 16:34:17 2016 +0200 qemu: Move channel path generation out of command creation commit f3717047081455e2b46fbf0d25620fe9ade5b19e Author: Martin Kletzander <mkletzan@redhat.com> Date: Wed Mar 30 09:01:11 2016 +0200 qemuhotplugtest: Test live data commit 326e5941cd6ac00a9aa4149872f71c2403f25db4 Author: Martin Kletzander <mkletzan@redhat.com> Date: Wed Mar 30 16:43:28 2016 +0200 qemu: Generate channel target paths on hotplug as well
Reproduce this bug with libvirt-1.3.2-1.el7.x86_64 Steps and results are as comment 0. Verify this bug with libvirt-2.0.0-2.el7.x86_64 Steps to verify: 1.Prepare a running guest without guest agent configured # virsh list Id Name State ---------------------------------------------------- 3 testvm running # virsh domtime testvm error: argument unsupported: QEMU guest agent is not configured 2.Prepare a guest agent xml # cat agent1.xml <channel type='unix'> <source mode='bind'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> 3.Hotplug the guest agent, can be attached successfully, and guest agent works well. # virsh attach-device testvm agent1.xml Device attached successfully # virsh dumpxml testvm|grep agent -A3 <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-42-testvm/org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/> <alias name='channel1'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> # virsh domtime testvm Time: 1469077961 Since the result is as expected, mark this bug verified.
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://rhn.redhat.com/errata/RHSA-2016-2577.html