Let's turn this around. IIRC libvirt uses an RPC interface for its
clients. How would you estimate the effort to port this interface to
QMP, and adapt all its clients?
The libvirt RPC interface is a binary message based protocol, using XDR
to encode arguments/return values, and emit signals. The libvirt for
handling this is quite complex because it has to deal with TLS, and
SASL for data encryption, as well as alllowing overlapping RPC requests
on a single TCP connection ( to allow multi-threaded clients to have
parallelized method calls without opening multiple connections). So
it would be a fairly significant amount of work, in comparison to the
current QMP proposal.
The existing libvirt code to talk to QEMU's monitor is actually rather
simple by comparison to our native RPC code. The problems we have
historically had with the QEMU monitor were, ill defined data printed
when an error occurs, the changing of monitor commands between QEMU
releases in incompatible ways, the lack of quoting for arguments and
no support for async events.