Bug 887415
| Summary: | Provide XML mode to autoallocate unix socket path for char device, helps apps with qemu-ga | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Cole Robinson <crobinso> |
| Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | dyasny, mprivozn |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-05-06 16:57:25 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: | |||
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
|
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.