[libvirt] run qemu-agent-command via binding (ruby/python/php)

Hi! Does it possible(featured, planned) to run some qemu-agent-command via libvirt binding (i'm interesting on ruby and php).? I'm understand that i can connect via socket and run it, but it very usable to get this ability inside binding. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru

On 08/28/2014 07:12 AM, Vasiliy Tolstov wrote:
Hi! Does it possible(featured, planned) to run some qemu-agent-command via libvirt binding (i'm interesting on ruby and php).?
I'm not sure the time-schedule of the ruby and php bindings maintainers, but ideally, ALL libvirt API should eventually have exposure in each language binding.
I'm understand that i can connect via socket and run it, but it very usable to get this ability inside binding.
In the meantime, if you can fork out to a shell, you can use 'virsh' from within your language of choice to drive the bindings. Also, it might help to say WHAT you hope to do with qemu-agent-command - that is an explicitly unsupported interface, and if you find yourself having to use it, it means we have a hole in libvirt proper, where we should expose a supported API to get at the same task without going through the backdoor. (As past examples, we added virDomainSetTime because people were previously having to use the agent's back door.) -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

2014-08-28 17:34 GMT+04:00 Eric Blake <eblake@redhat.com>:
On 08/28/2014 07:12 AM, Vasiliy Tolstov wrote:
Hi! Does it possible(featured, planned) to run some qemu-agent-command via libvirt binding (i'm interesting on ruby and php).?
I'm not sure the time-schedule of the ruby and php bindings maintainers, but ideally, ALL libvirt API should eventually have exposure in each language binding.
I'm understand that i can connect via socket and run it, but it very usable to get this ability inside binding.
In the meantime, if you can fork out to a shell, you can use 'virsh' from within your language of choice to drive the bindings.
Also, it might help to say WHAT you hope to do with qemu-agent-command - that is an explicitly unsupported interface, and if you find yourself having to use it, it means we have a hole in libvirt proper, where we should expose a supported API to get at the same task without going through the backdoor. (As past examples, we added virDomainSetTime because people were previously having to use the agent's back door.)
Thanks. I want to use backdoor =) Now i'm need to get memory stats from guest (free memory, used swap) and rewrite 50% of qemu-ga in golang. And feature plans is add ability to get,set,del ip addresses and routes inside virtual machine. In very long feature may be i want to create some control panel backend that works via virtio-serial. Why not add ability to send some json via libvirt api function and get results ? -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru

On Thu, Aug 28, 2014 at 9:34 AM, Eric Blake <eblake@redhat.com> wrote:
On 08/28/2014 07:12 AM, Vasiliy Tolstov wrote:
Hi! Does it possible(featured, planned) to run some qemu-agent-command via libvirt binding (i'm interesting on ruby and php).?
I'm not sure the time-schedule of the ruby and php bindings maintainers, but ideally, ALL libvirt API should eventually have exposure in each language binding.
The ruby bindings support virDomainQemuAgentCommand() since 0.5.2. I haven't really tested it, though, so your mileage may vary. I definitely accept bug reports and patches. Chris

2014-08-28 17:50 GMT+04:00 Chris Lalancette <clalancette@gmail.com>:
The ruby bindings support virDomainQemuAgentCommand() since 0.5.2. I haven't really tested it, though, so your mileage may vary. I definitely accept bug reports and patches.
Thanks! Very nice. Does it possible to request this feature from php libvirt binding maintainer? -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru jabber: vase@selfip.ru
participants (3)
-
Chris Lalancette
-
Eric Blake
-
Vasiliy Tolstov