« Previous | Next » 

Revision ff9ec34d

IDff9ec34de8f6a37bd29ac72c0c4c94bd5d43d7b0

Added by Stefan Hajnoczi about 10 years ago

QMP: allow JSON dict arguments in qmp-shell

qmp-shell hides the QMP wire protocol JSON encoding from the user. Most
of the time this is helpful and makes the command-line human-friendly.

Some QMP commands take a dict as an argument. In order to express this
we need to revert back to JSON notation.

This patch allows JSON dict arguments in qmp-shell so commands like
blockdev-add and nbd-server-start can be invoked:

(QEMU) blockdev-add options={"driver":"file","id":"drive1",...}

Note that spaces are not allowed since str.split() is used to break up
the command-line arguments first.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Eric Blake <>
Reviewed-by: Benoit Canet <>
Signed-off-by: Luiz Capitulino <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences