summaryrefslogtreecommitdiffstats
path: root/qmp-commands.hx
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* qapi: Convert stopLuiz Capitulino2011-10-041-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert quitLuiz Capitulino2011-10-041-4/+1
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-commandsLuiz Capitulino2011-10-041-0/+6
| | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-chardevLuiz Capitulino2011-10-041-0/+6
| | | | | | | Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-uuidLuiz Capitulino2011-10-041-0/+6
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-statusLuiz Capitulino2011-10-041-0/+6
| | | | | | | | | Please, note that the RunState type as defined in sysemu.h and its runstate_as_string() function are being dropped in favor of the RunState type generated by the QAPI. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-kvmLuiz Capitulino2011-10-041-0/+6
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: Convert query-versionLuiz Capitulino2011-10-041-0/+6
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: convert query-nameAnthony Liguori2011-10-041-0/+6
| | | | | | | | A simple example conversion 'info name'. This also adds the new files for QMP and HMP. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: query-status: Introduce 'status' keyLuiz Capitulino2011-09-151-1/+18
| | | | | | | This new key reports the current VM status to clients. Please, check the documentation being added in this commit for more details. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* block: Show whether the virtual tray is open in info blockMarkus Armbruster2011-09-121-0/+2
| | | | | | | | Need to ask the device, so this requires new BlockDevOps member is_tray_open(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: latency accountingChristoph Hellwig2011-08-261-0/+18
| | | | | | | | | Account the total latency for read/write/flush requests. This allows management tools to average it based on a snapshot of the nr ops counters and allow checking for SLAs or provide statistics. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: include flush requests in info blockstatsChristoph Hellwig2011-08-231-0/+6
| | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp: fix efect -> effect typo in qmp-commands.hxZhi Yong Wu2011-07-271-1/+1
| | | | | Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Introduce a 'client_add' monitor command accepting an open FDDaniel P. Berrange2011-07-231-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow client connections for VNC and socket based character devices to be passed in over the monitor using SCM_RIGHTS. One intended usage scenario is to start QEMU with VNC on a UNIX domain socket. An unprivileged user which cannot access the UNIX domain socket, can then connect to QEMU's VNC server by passing an open FD to libvirt, which passes it onto QEMU. { "execute": "get_fd", "arguments": { "fdname": "myclient" } } { "return": {} } { "execute": "add_client", "arguments": { "protocol": "vnc", "fdname": "myclient", "skipauth": true } } { "return": {} } In this case 'protocol' can be 'vnc' or 'spice', or the name of a character device (eg from -chardev id=XXXX) The 'skipauth' parameter can be used to skip any configured VNC authentication scheme, which is useful if the mgmt layer talking to the monitor has already authenticated the client in another way. * console.h: Define 'vnc_display_add_client' method * monitor.c: Implement 'client_add' command * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED * qmp-commands.hx: Declare 'client_add' command * ui/vnc.c: Implement 'vnc_display_add_client' method Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: add snapshot-blkdev-sync commandJes Sorensen2011-07-211-0/+34
| | | | | | | | | | | | | | Add QMP bits for snapshot_blkdev command. This is the same as snapshot_blkdev in the human monitor. The command is synchronous. In the future async commands and or a break down of the functionality into multiple commands might be added. Also change the 'snapshot_file' argument to 'snapshot-file' in the human monitor, so that it matches QMP. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
* HMP: Use QMP inject nmi implementationLuiz Capitulino2011-06-011-1/+1
| | | | | | | | | | | This **CHANGES** the human monitor "nmi" command behavior. Currently it accepts an CPU argument which, when provided, will send the NMI to the specified CPU. This feature is of discussable value though and HMP shouldn't have more features than QMP, so let's use QMP's instead (it's also simpler). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* QMP: add inject-nmi qmp commandLai Jiangshan2011-06-011-0/+27
| | | | | | | | inject-nmi command injects an NMI on all CPUs of guest. It is only supported for x86 guest currently, it will returns "Unsupported" error for non-x86 guest. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* block QMP: Deprecate query-block's "type", drop info block's "type="Markus Armbruster2011-05-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | query-block's specification documents response member "type" with values "hd", "cdrom", "floppy", "unknown". Its value is unreliable: a block device used as floppy has type "floppy" if created with if=floppy, but type "hd" if created with if=none. That's because with if=none, the type is at best a declaration of intent: the drive can be connected to any guest device. Its type is really the guest device's business. Reporting it here is wrong. No known user of QMP uses "type". It's unlikely that any unknown users exist, because its value is useless unless you know how the block device was created. But then you also know the true value. Fixing the broken value risks breaking (hypothetical!) clients that somehow rely on the current behavior. Not fixing the value risks breaking (hypothetical!) clients that rely on the value to be accurate. Can't entirely avoid hypothetical lossage. Change the value to be always "unknown". This makes "info block" always report "type=unknown". Pointless. Change it to not report the type. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qmp-commands.hx: Clean up mess of client_migrate_infoJes Sorensen2011-03-221-34/+34
| | | | | | | | | | client_migrate_info was put into qmp-commands.hx in the middle of migrate_set_speed, between the command and it's description. In addition client_migrate_info put the description before the command itself, which is the wrong order. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Expose thread_id in info cpusJan Kiszka2011-03-161-0/+3
| | | | | | | | | | | Based on patch by Glauber Costa: To allow management applications like libvirt to apply CPU affinities to the VCPU threads, expose their ID via info cpus. This patch provides the pre-existing and used interface from qemu-kvm. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Merge remote branch 'spice/spice.v29.pull' into stagingAnthony Liguori2011-02-011-0/+35
|\ | | | | | | | | Conflicts: trace-events
| * spice/vnc: client migration.Gerd Hoffmann2011-01-241-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Handle spice client migration, i.e. inform a spice client connected about the new host and connection parameters, so it can move over the connection automatically. The monitor command has a not-yet used protocol argument simliar to set_password and expire_password commands. This allows to add a simliar feature to vnc in the future. Daniel Berrange plans to work on this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | block: add block_resize monitor commandChristoph Hellwig2011-01-311-0/+28
|/ | | | | | | | | | | | | | | | | | | | | | Add a monitor command that allows resizing of block devices while qemu is running. It uses the existing bdrv_truncate method already used by qemu-img to do it's work. Compared to qemu-img the size parsing is very simplicistic, but I think having a properly numering object is more useful for non-humand monitor users than having the units and relative resize parsing. For SCSI devices the new size can be updated in Linux guests by doing the following shell command: echo > /sys/class/scsi_device/0:0:0:0/device/rescan For ATA devices I don't know of a way to update the block device size in Linux system, and for virtio-blk the next two patches will provide an automatic update of the size when this command is issued on the host. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud