[libvirt] [PATCH] qemu: support qmp on RHEL/CentOS qemu

Eric Blake eblake at redhat.com
Fri Jan 27 15:48:01 UTC 2012


On 01/26/2012 05:09 PM, Laine Stump wrote:
> On 01/25/2012 11:36 PM, Eric Blake wrote:
>> I'm getting tired of remembering to backport RHEL-specific
>> patches when building upstream libvirt on RHEL 6.x or CentOS.
>> All the affected versions of RHEL qemu-kvm have backported
>> enough patches to a) make JSON useful, and b) modify the
>> -help text to mention libvirt as the preferred interface;
> 
> 
> Eww. That's almost as hackish as ... well ... as using help output to
> .... Oh, never mind :-)

LOL.

> 
> (seriously, this seems just as reliable as any of the other stuff - I
> seriously doubt anyone is going to just stick the string "libvirt" into
> the help of an old version of qemu just for the fun of it)

Agreed, which is why I settled on that rather than on:

$ (sleep .1; printf '{"execute": "qmp_capabilities"}\n{"execute":
"quit"}\n') \
  | /usr/libexec/qemu-kvm -qmp stdio -S -nodefaults -nographic \
  | grep human-monitor-command

much faster, and less code, for the same answer, at least for this patch
(of course, we may still want to eventually parse the set of known qmp
commands, but we should first introduce qemu capability caching, rather
than doing it once per every domain startup).

> 
> Assuming that make check passed (and since it's coming from you, I'm
> sure it did :-), ACK.

Thanks, pushed.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120127/e4acd42a/attachment-0001.sig>


More information about the libvir-list mailing list