[libvirt] Transitioning from HMP to QMP for QEMU

What is the status of QEMU's transition from HMP to the QMP interface? My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output. On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only. Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future. Stefan

On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux

Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage. Kevin

On 2011-12-15 14:33, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
We are also talking about introducing new commands twice, which is a PITA. Also, peoples interest in HMP vs. QMP varies. Some focus on management usability, others on human-machine interaction. So you get suggestions for new command typical either for one, not for both. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux

On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?

On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux

On Thu, Dec 15, 2011 at 1:39 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope.
I wonder if we could shape up qemu/QMP/qmp-shell.py to the level where it provides HMP human-friendliness and then drop HMP. This is a side-discussion though. The main point was to assert that HMP is not a management interface and that we don't add text monitor support new commands to libvirt. It doesn't solve the problem of having to implement each command twice today in libvirt but it at least establishes the flexibility to morph HMP into a layer on top of QMP in the future in QEMU. Stefan

Am 15.12.2011 14:39, schrieb Jan Kiszka:
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope.
Isn't HMP implemented in terms of QMP these days? And yes, strong NACK for removing the functionality. Kevin

On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf <kwolf@redhat.com> wrote:
Am 15.12.2011 14:39, schrieb Jan Kiszka:
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope.
Isn't HMP implemented in terms of QMP these days?
Yes and no, I don't mean writing text manipulation code on to of QMP command handlers the way we're doing now. It's a pain. I meant more along the lines of making qmp-shell more human-friendly. You already can specify the command in a command-line fashion - you don't need to write raw JSON. I think it's a question of improving this and perhaps integrating the documentation for the QMP/QAPI commands right at the prompt so that it's easy to learn about the available commands. This would be a new interactive shell that stays much closer to QMP so that we don't bother with maintaining per-command text formatting functions like we do with HMP today. Stefan

On 2011-12-15 14:53, Stefan Hajnoczi wrote:
On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf <kwolf@redhat.com> wrote:
Am 15.12.2011 14:39, schrieb Jan Kiszka:
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka:
On 2011-12-15 14:02, Stefan Hajnoczi wrote: > What is the status of QEMU's transition from HMP to the QMP interface? > > My current understanding is that QEMU provides new HMP commands for > humans, but HMP is being phased out as an API. Management tools > should rely only on QMP for new commands. That would mean new HMP > commands are not guaranteed to produce backwards-compatible output > because tools are not supposed to parse the output. > > On the libvirt side, new QEMU features should only be supported via > the json monitor in the future (i.e. human monitor patches should not > be sent/merged)? Existing HMP commands will still need the human > monitor support in order to handle old QEMU versions gracefully, but > I'm thinking about new commands only. > > Does everyone agree on this? I think this is an important discussion > if we want our management interface to get better and more consistent > in the future.
To phase out the classic HMP implementation, we need an internal HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console and gdbstub monitors continue to benefit from new commands. Those interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope.
Isn't HMP implemented in terms of QMP these days?
Yes and no, I don't mean writing text manipulation code on to of QMP command handlers the way we're doing now. It's a pain.
I meant more along the lines of making qmp-shell more human-friendly. You already can specify the command in a command-line fashion - you don't need to write raw JSON. I think it's a question of improving this and perhaps integrating the documentation for the QMP/QAPI commands right at the prompt so that it's easy to learn about the available commands. This would be a new interactive shell that stays much closer to QMP so that we don't bother with maintaining per-command text formatting functions like we do with HMP today.
Monitor pass-through via gdbstub requires text formatting on QEMU side. We could start providing a python plugin for gdb at some point that does the pretty printing on the client side, but moving over will be a lengthy process as well. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux

On Thu, 15 Dec 2011 14:57:51 +0100 Jan Kiszka <jan.kiszka@siemens.com> wrote:
On 2011-12-15 14:53, Stefan Hajnoczi wrote:
On Thu, Dec 15, 2011 at 1:49 PM, Kevin Wolf <kwolf@redhat.com> wrote:
Am 15.12.2011 14:39, schrieb Jan Kiszka:
On 2011-12-15 14:38, Lucas Meneghel Rodrigues wrote:
On 12/15/2011 11:33 AM, Kevin Wolf wrote:
Am 15.12.2011 14:18, schrieb Jan Kiszka: > On 2011-12-15 14:02, Stefan Hajnoczi wrote: >> What is the status of QEMU's transition from HMP to the QMP interface? >> >> My current understanding is that QEMU provides new HMP commands for >> humans, but HMP is being phased out as an API. Management tools >> should rely only on QMP for new commands. That would mean new HMP >> commands are not guaranteed to produce backwards-compatible output >> because tools are not supposed to parse the output. >> >> On the libvirt side, new QEMU features should only be supported via >> the json monitor in the future (i.e. human monitor patches should not >> be sent/merged)? Existing HMP commands will still need the human >> monitor support in order to handle old QEMU versions gracefully, but >> I'm thinking about new commands only. >> >> Does everyone agree on this? I think this is an important discussion >> if we want our management interface to get better and more consistent >> in the future. > > To phase out the classic HMP implementation, we need an internal > HMP-over-JSON wrapper (with tab expansion etc.) so that virtual console > and gdbstub monitors continue to benefit from new commands. Those > interfaces will stay for a long time, I'm sure.
I think we're not talking about dropping HMP here, only about how long to support it as a stable API for management tools. I believe that we have been in a transitional phase for long enough now that we can start changing the output format of HMP commands without considering it an API breakage.
Yes, I've got the same impression. But while we are at it, forgive my naiveness, but wouldn't be worthwhile to consider dropping the human monitor in the long run?
Surely not the interface (for virtual console & gdbstub), but the internal implementation I hope.
Isn't HMP implemented in terms of QMP these days?
Yes, if you look at hmp.c you'll see that HMP is using QMP as a client. Of course that there are a lot of commands to be converted, but it's just a matter of time to get this done.
Yes and no, I don't mean writing text manipulation code on to of QMP command handlers the way we're doing now. It's a pain.
I meant more along the lines of making qmp-shell more human-friendly. You already can specify the command in a command-line fashion - you don't need to write raw JSON. I think it's a question of improving this and perhaps integrating the documentation for the QMP/QAPI commands right at the prompt so that it's easy to learn about the available commands. This would be a new interactive shell that stays much closer to QMP so that we don't bother with maintaining per-command text formatting functions like we do with HMP today.
Monitor pass-through via gdbstub requires text formatting on QEMU side. We could start providing a python plugin for gdb at some point that does the pretty printing on the client side, but moving over will be a lengthy process as well.
Yes, I expect some HMP commands to be difficult to port and that will require time. But if anyone is interested, we could start making qmp-shell a decent shell as Stefan suggests above. In the beginning it won't have all commands HMP has today, but in the future it could replace it.
Jan

On 12/15/2011 08:02 AM, Stefan Hajnoczi wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API. Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
HMP is good for a human to interaction with Qemu, QMP mostly for a machine. At least that's my impression. If there are no new HMP commands hopefully there is an alternative for human interaction. Stefan

On Thu, 15 Dec 2011 13:02:40 +0000 Stefan Hajnoczi <stefanha@gmail.com> wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
Depends on what you consider the transition to be. For management tools the transition can be considered done already because we do not support HMP as a stable interface.
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API.
It already did.
Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
Exactly.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Maybe it's a matter of terminology, but I have the impression you're talking about two things here: 1. HMP will always exist, in the meaning that qemu will always provide a human interface. If we move it to a python script or some kind of external process, that's an implementation detail. This means that, if you're adding new functionality to qemu and it does make sense for humans to use it, then it should have a HMP version. 2. If you do add the HMP interface, that's for humans to consume and its output/semantics should make sense for humans, not for management tools.
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
Stefan

On 12/15/2011 07:57 AM, Luiz Capitulino wrote:
On Thu, 15 Dec 2011 13:02:40 +0000 Stefan Hajnoczi<stefanha@gmail.com> wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
Depends on what you consider the transition to be.
For management tools the transition can be considered done already because we do not support HMP as a stable interface.
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API.
It already did.
Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
Exactly.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Maybe it's a matter of terminology, but I have the impression you're talking about two things here:
1. HMP will always exist, in the meaning that qemu will always provide a human interface. If we move it to a python script or some kind of external process, that's an implementation detail.
This means that, if you're adding new functionality to qemu and it does make sense for humans to use it, then it should have a HMP version.
2. If you do add the HMP interface, that's for humans to consume and its output/semantics should make sense for humans, not for management tools.
3. All HMP commands will be implemented in terms of QMP commands (and only in terms of QMP commands). There are still a lot of HMP commands that don't have an QMP analog. Luiz, it might make sense to setup a wiki page which instructions on how to convert an HMP command to a QMP command using QAPI. If we did that, we could probably get more folks involved in the conversion process. Regards, Anthony Liguori
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
Stefan

On Thu, 15 Dec 2011 08:06:41 -0600 Anthony Liguori <anthony@codemonkey.ws> wrote:
On 12/15/2011 07:57 AM, Luiz Capitulino wrote:
On Thu, 15 Dec 2011 13:02:40 +0000 Stefan Hajnoczi<stefanha@gmail.com> wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
Depends on what you consider the transition to be.
For management tools the transition can be considered done already because we do not support HMP as a stable interface.
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API.
It already did.
Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
Exactly.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Maybe it's a matter of terminology, but I have the impression you're talking about two things here:
1. HMP will always exist, in the meaning that qemu will always provide a human interface. If we move it to a python script or some kind of external process, that's an implementation detail.
This means that, if you're adding new functionality to qemu and it does make sense for humans to use it, then it should have a HMP version.
2. If you do add the HMP interface, that's for humans to consume and its output/semantics should make sense for humans, not for management tools.
3. All HMP commands will be implemented in terms of QMP commands (and only in terms of QMP commands).
Right.
There are still a lot of HMP commands that don't have an QMP analog. Luiz, it might make sense to setup a wiki page which instructions on how to convert an HMP command to a QMP command using QAPI.
I wrote on how to write new QMP commands using the QAPI (docs/writing-qmp-commands.txt), going from there to a conversion shouldn't be difficult, but I can write a wiki page. Btw, counting with a series I haven't posted yet, we have less than 10 QMP commands left to be converted to the QAPI. I expect to start working on HMP conversions in January.
If we did that, we could probably get more folks involved in the conversion process.
That would be wonderful.
Regards,
Anthony Liguori
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
Stefan

On 12/15/2011 08:52 AM, Luiz Capitulino wrote:
On Thu, 15 Dec 2011 08:06:41 -0600 Anthony Liguori<anthony@codemonkey.ws> wrote:
There are still a lot of HMP commands that don't have an QMP analog. Luiz, it might make sense to setup a wiki page which instructions on how to convert an HMP command to a QMP command using QAPI.
I wrote on how to write new QMP commands using the QAPI (docs/writing-qmp-commands.txt), going from there to a conversion shouldn't be difficult, but I can write a wiki page.
Btw, counting with a series I haven't posted yet, we have less than 10 QMP commands left to be converted to the QAPI. I expect to start working on HMP conversions in January.
That is awesome! Regards, Anthony Liguori
If we did that, we could probably get more folks involved in the conversion process.
That would be wonderful.
Regards,
Anthony Liguori
Does everyone agree on this? I think this is an important discussion if we want our management interface to get better and more consistent in the future.
Stefan

On Thu, Dec 15, 2011 at 1:57 PM, Luiz Capitulino <lcapitulino@redhat.com> wrote:
On Thu, 15 Dec 2011 13:02:40 +0000 Stefan Hajnoczi <stefanha@gmail.com> wrote:
What is the status of QEMU's transition from HMP to the QMP interface?
Depends on what you consider the transition to be.
For management tools the transition can be considered done already because we do not support HMP as a stable interface.
My current understanding is that QEMU provides new HMP commands for humans, but HMP is being phased out as an API.
It already did.
Management tools should rely only on QMP for new commands. That would mean new HMP commands are not guaranteed to produce backwards-compatible output because tools are not supposed to parse the output.
Exactly.
On the libvirt side, new QEMU features should only be supported via the json monitor in the future (i.e. human monitor patches should not be sent/merged)? Existing HMP commands will still need the human monitor support in order to handle old QEMU versions gracefully, but I'm thinking about new commands only.
Maybe it's a matter of terminology, but I have the impression you're talking about two things here:
1. HMP will always exist, in the meaning that qemu will always provide a human interface. If we move it to a python script or some kind of external process, that's an implementation detail.
This means that, if you're adding new functionality to qemu and it does make sense for humans to use it, then it should have a HMP version.
2. If you do add the HMP interface, that's for humans to consume and its output/semantics should make sense for humans, not for management tools.
This entire email is useful, thanks. It feels like this should be captured somewhere - on the wiki, in qemu/doc/, or as a comment in monitor.c. That way anyone who wishes to contribute new monitor commands will start with the right idea. Stefan
participants (7)
-
Anthony Liguori
-
Jan Kiszka
-
Kevin Wolf
-
Lucas Meneghel Rodrigues
-
Luiz Capitulino
-
Stefan Berger
-
Stefan Hajnoczi