If you want to configure the qemu guest agent, a user/app has to add an XML block to the guest like: <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/GUEST.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> </channel> Having to hardcode a path like that sucks, because: 1) /var/lib/libvirt/qemu is not guarantee'd to be a correctly permissioned place to drop things, only libvirt knows for sure the best spot 2) All apps would have to duplicate some logic to generate a socket name that doesn't conflict with other VMs, and the app may not even be in a position to guarantee it doesn't conflict with the local FS. It would be helpful if we could do something like <source mode='bind' autopath='on'/> And libvirt would just fill in a path for us. Would also be a useful mode for VNC unix sockets as well.
Yeah, I agree that current way of configuring guest agent sucks. I think we should auto allocate path even without the 'autopath' attribute you are suggesting. Let me see if I can get this over upstream process.
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2013-April/msg00720.html
Patch pushed upstream: commit 297c99a5676c32d3d98c08c24499271c52fbb3fb Author: Michal Privoznik <mprivozn> AuthorDate: Tue Apr 9 19:04:00 2013 +0200 Commit: Michal Privoznik <mprivozn> CommitDate: Thu May 2 16:40:24 2013 +0200 qemu: Generate agent socket path if missing It's not desired to force users imagine path for a socket they are not even supposed to connect to. On the other hand, we already have a release where the qemu agent socket path is exposed to XML, so we cannot silently drop it from there. The new path is generated in form: $LOCALSTATEDIR/lib/libvirt/qemu/channel/target/$domain.$name for qemu system mode, and $XDG_CONFIG_HOME/qemu/lib/channel/target/$domain.$name for qemu session mode. v1.0.5-3-g297c99a