summaryrefslogtreecommitdiffstats
path: root/qmp-commands.hx
Commit message (Collapse)AuthorAgeFilesLines
...
* | qapi: Convert migrateLuiz Capitulino2012-03-151-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The migrate command is one of those commands where HMP and QMP completely mix up together. This made the conversion to the QAPI (which separates the command into QMP and HMP parts) a bit difficult. The first important change to be noticed is that this commit completes the removal of the Monitor object from migration code, started by the previous commit. Another important and tricky change is about supporting the non-detached mode. That is, if the user doesn't pass '-d' the migrate command will lock the monitor and will only release it when migration is finished. To support this in the new HMP command (hmp_migrate()), it is necessary to create a timer which runs every second and checks if the migration is still active. If it is, the timer callback will re-schedule itself to run one second in the future. If the migration has already finished, the monitor lock is released and the user can use it normally. All these changes should be transparent to the user. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | qmp: convert blockdev-snapshot-sync to a wrapper around transactionsPaolo Bonzini2012-03-121-0/+2
| | | | | | | | | | | | | | | | | | Simplify the blockdev-snapshot-sync code and gain failsafe operation by turning it into a wrapper around the new transaction command. A new option is also added matching "mode". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | add mode field to blockdev-snapshot-sync transaction itemPaolo Bonzini2012-03-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | The mode field lets a management application create the snapshot destination outside QEMU. Right now, the only modes are "existing" and "absolute-paths". Mirroring introduces "no-backing-file". In the future "relative-paths" could be implemented too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | rename blockdev-group-snapshot-syncPaolo Bonzini2012-03-121-24/+28
| | | | | | | | | | | | | | | | We will add other kinds of operation. Prepare for this by adjusting the schema. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | QMP: Add qmp command for blockdev-group-snapshot-syncJeff Cody2012-02-291-0/+39
|/ | | | | | | | | | | | | | | | This adds the QMP command for blockdev-group-snapshot-sync. It takes an array in as the input, for the argument devlist. The array consists of the following elements: + device: device to snapshot. e.g. "ide-hd0", "virtio0" + snapshot-file: path & file for the snapshot image. e.g. "/tmp/file.img" + format: snapshot format. e.g., "qcow2". Optional There is no HMP equivalent for the command. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* suspend: add system_wakeup monitor commandGerd Hoffmann2012-02-241-0/+21
| | | | | | | | This patch adds the system_wakeup monitor command which will simply wake up suspended guests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add SPICE support to add_client monitor commandDaniel P. Berrange2012-02-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the acceptance of some new APIs to libspice-server.so it is possible to add support for SPICE to the 'add_client' monitor command, bringing parity with VNC. Since SPICE can use TLS or plain connections, the command also gains a new 'tls' parameter to specify whether TLS should be attempted on the injected client sockets. This new feature is only enabled if building against a libspice-server >= 0.10.1 * qmp-commands.hx: Add 'tls' parameter & missing doc for 'skipauth' parameter * monitor.c: Wire up SPICE for 'add_client' command * ui/qemu-spice.h, ui/spice-core.c: Add qemu_spice_display_add_client API to wire up from monitor [1] http://cgit.freedesktop.org/spice/spice/commit/server/spice.h?id=d55b68b6b44f2499278fa860fb47ff22f5011faa http://cgit.freedesktop.org/spice/spice/commit/server/spice.h?id=bd07dde530d9504e1cfe7ed5837fc00c26f36716 Changes in v3: - Added 'optional' flag to new parameters documented - Added no-op impl of qemu_spice_display_add_client when SPICE is disabled during build Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qom: add new command to search for typesAnthony Liguori2012-02-031-0/+5
| | | | | | | | | | | | | | | This adds a command that allows searching for types that implement a property. This allows you to do things like search for all available PCIDevices. In the future, we'll also have a standard interface for things with a BlockDriverState property that a PCIDevice could implement. This will enable search queries like, "any type that implements the BlockDevice interface" which would allow management tools to present available block devices without having to hard code device names. Since an object can implement multiple interfaces, one device could act both as a BlockDevice and a NetworkDevice. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qmp: add query-block-jobsStefan Hajnoczi2012-01-261-0/+6
| | | | | | | | | Add query-block-jobs, which shows the progress of ongoing block device operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: add block_job_cancel commandStefan Hajnoczi2012-01-261-0/+6
| | | | | | | | | | Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: add block_job_set_speed commandStefan Hajnoczi2012-01-261-0/+6
| | | | | | | | | Add block_job_set_speed, which sets the maximum speed for a background block operation. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: add block_stream commandStefan Hajnoczi2012-01-261-0/+6
| | | | | | | | | | | | Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qapi: Convert block_set_io_throttleLuiz Capitulino2012-01-181-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert changeLuiz Capitulino2012-01-181-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Introduce change-vnc-passwordLuiz Capitulino2012-01-181-0/+6
| | | | | | | | | New QMP command to change the VNC password. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert ejectLuiz Capitulino2012-01-181-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert expire_passwordLuiz Capitulino2012-01-181-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert set_passwordLuiz Capitulino2012-01-181-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qom: qom_{get, set} monitor commands (v2)Anthony Liguori2011-12-151-0/+12
| | | | | | | | | | | This allows clients to read and write device model properties through QMP. QAPI doesn't support Visitor types yet and these commands are special in that they don't work with fixed types. I've added a documentation stub to qapi-schema.json so we can keep consistency there. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qmp: add qom-list commandAnthony Liguori2011-12-151-0/+6
| | | | | | This can be used to list properties in the device model. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qapi: Convert migrate_set_speedLuiz Capitulino2011-12-061-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert migrate_set_downtimeLuiz Capitulino2011-12-061-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert migrate_cancelLuiz Capitulino2011-12-061-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert human-monitor-commandLuiz Capitulino2011-12-061-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert blockdev_snapshot_syncLuiz Capitulino2011-12-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | Unfortunately, this conversion required an additional change. In the old QMP command, the 'snapshot-file' argument is specified as optional. The idea is to take the snapshot internally if 'snapshot-file' is not passed. However, internal snapshots are not supported yet so the command returns a MissingParamater error if 'snapshot-file' is not passed. Which makes the argument actually required and will cause compatibility breakage if we change that in the future. To fix this the QAPI converted blockdev_snapshot_sync command makes the 'snapshot-file' argument required. Again, in practice it's actually required, so this is not incompatible. If we do implement internal snapshots someday, we'll need a new argument for it. Note that this discussion doesn't affect HMP. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert block_resizeLuiz Capitulino2011-12-061-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert balloonLuiz Capitulino2011-12-061-5/+1
| | | | | | | | | Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC API, but the new command is a regular synchronous command. There shouldn't be visible differences though, as MONITOR_CMD_ASYNC is internal only. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert block_passwdLuiz Capitulino2011-12-061-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert set_linkLuiz Capitulino2011-12-061-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert inject-nmiLuiz Capitulino2011-12-061-4/+1
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert contLuiz Capitulino2011-12-061-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert pmemsaveLuiz Capitulino2011-12-061-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert memsaveLuiz Capitulino2011-12-061-7/+3
| | | | | | | Please, note that the QMP command has a new 'cpu-index' parameter. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Complete system_powerdown conversionLuiz Capitulino2011-12-061-4/+1
| | | | | | | | Commit 5bc465e4b1b6f4582a400c0a7033a1c841744278 converted only the HMP part of the system_powerdown command to the QAPI, this commit completes it by converting the QMP part too. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* hmp/qmp: add block_set_io_throttleZhi Yong Wu2011-12-051-1/+52
| | | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2011-10-311-4/+56
|\ | | | | | | | | Conflicts: ui/spice-core.c
| * qapi: Convert query-pciLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | | | | | | | | | This also fixes a bug with the old version: QMP would invert device id and vendor id. This would look ok on HMP because it was printing "device:vendor" instead of "vendor:device". Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-balloonLuiz Capitulino2011-10-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Please, note that some of the code supporting memory statistics is still around (eg. virtio_balloon_receive_stats() and reset_stats()). Also, the qmp_query_balloon() function is synchronous and thus doesn't make any use of the (not fully working) monitor's asynchronous command support (the old non-qapi implementation did). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-spiceLuiz Capitulino2011-10-271-0/+8
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-vncLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three important remarks in relation to the non-qapi command: 1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc' commands to return an error when qemu is built without VNC support (ie. --disable-vnc). The non-qapi command would return the OK response in QMP and no response in HMP 2. The qapi version explicitly marks the fields 'host', 'family', 'service' and 'auth' as optional. Their are not documented as optional in the non-qapi command doc, but they would not be returned if vnc support is disabled. The qapi version maintains the same semantics, but documents those fields correctly 3. The 'clients' field, which is a list, is marked as optional but is always returned. If there are no clients connected an empty list is returned. This is not the Right Way to this in the qapi but it's how the non-qapi command used to work Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-blockstatsLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-blockLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-cpusLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert the cpu commandLuiz Capitulino2011-10-271-4/+1
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-migrateLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * qapi: Convert query-miceLuiz Capitulino2011-10-271-0/+6
| | | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | spice: turn client_migrate_info to asyncYonit Halperin2011-10-251-1/+2
|/ | | | | | | | | | | | RHBZ 737921 Spice client is required to connect to the migration target before/as migration starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client we trigger the connection to the target upon client_migrate_info command. client_migrate_info completion cb will be called after spice client has been connected to the target (or a timeout). See following patches and spice patches. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* QMP: Fix blockdev-snapshot-sync doc exampleLuiz Capitulino2011-10-191-4/+4
| | | | | | | Fix wrong command name. Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: query-status: Add 'io-status' keyLuiz Capitulino2011-10-111-0/+6
| | | | | | | | | | | | Contains the I/O status for the given device. The key is only present if the device supports it and the VM is configured to stop on errors. Please, check the documentation being added in this commit for more information. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qapi: Convert system_resetLuiz Capitulino2011-10-041-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud