QMP can be fairly trivially extended for some of these things, but
JSON is a limiting factor in some cases. We can't maintain strong
typing of data across the transport for instance, since JSON only
allows for a generic number type, whereas with XMLRPC we can
explicitly specify the machine representation. But whether this really
matters is hard to say with the limited set of RPCs we have right now.
In terms of using QMP all the way through...that sounds really cool,
but with the bi-directional client/server data being multiplexed over
a single channel, and increased potential for weird states resulting
from guest/guest agent restarts, there's a need for some additional
synchronization that might end up being fairly intrusive/undesirable
to work into QMP.
What concrete use-cases are there?
* Reboot support on x86. A QMP command can invoke guest-initiated
reboot via virtagent.
* ?
* viewfile
The ability to do a quick peek at guest stats via, say, /proc, is a
use case that seems to be fairly generally desirable. It's what
essentially started all this work, actually. That's also why I think a
simple/limited viewfile RPC for relatively small text files is
warranted regardless of whatever approach we end up taking for
handling large/binary file transfers.
* getdmesg
Really useful for trouble-shooting things like soft-lockups.
* ping
Heartbeat monitoring has also been a fairly re-occurring approach to
identifying potential problems in our cloud, and it's not even
something we're capable of accomplishing in a production environment
due to having limited network access to the guests. Being able to do
it without relying on custom/network-based daemons would be pretty
useful.
* exec (planned)
Internally and externally I've seen interest in guest-initiated
snapshots, but that would tie into exec or some other, higher-level,
RPC, which isn't yet well-defined.
* copyfile (planned)
Nothing solid, but I think it's generally desirable. Quick access to
coredumps and such would be useful. Lots of discussion on how to
implement this and I think we have some good potential approaches to
adding this soon.
* writefile (planned)
Nothing solid. But guest activation is probably a big potential use
case for this one. Managing various guest kernel params is another.
Another would be deploying custom scripts to run via exec.
Will virtagent be extensible by host administrators or end-users? For
example, can I drop in a custom command to collect statistics and
invoke it across VMs on my hosts? Do I need to recompile QEMU and/or
the virtagent daemon?
writefile + exec would probably be the best way to achieve this. I
don't think there are any plans to make the supported set of RPCs
pluggable/extendable.
Stefan