blob: e075df423ab3faaca4ab3026eaf94a04c3f22674 [file] [log] [blame]
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001HXCOMM QMP dispatch table and documentation
2HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
3HXCOMM does not show up in the other formats.
4
5SQMP
6 QMP Supported Commands
7 ----------------------
8
9This document describes all commands currently supported by QMP.
10
11Most of the time their usage is exactly the same as in the user Monitor, this
12means that any other document which also describe commands (the manpage,
13QEMU's manual, etc) can and should be consulted.
14
15QMP has two types of commands: regular and query commands. Regular commands
16usually change the Virtual Machine's state someway, while query commands just
17return information. The sections below are divided accordingly.
18
19It's important to observe that all communication examples are formatted in
20a reader-friendly way, so that they're easier to understand. However, in real
21protocol usage, they're emitted as a single line.
22
23Also, the following notation is used to denote data flow:
24
25-> data issued by the Client
26<- Server data response
27
28Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29information on the Server command and response formats.
30
31NOTE: This document is temporary and will be replaced soon.
32
331. Stability Considerations
34===========================
35
36The current QMP command set (described in this file) may be useful for a
37number of use cases, however it's limited and several commands have bad
38defined semantics, specially with regard to command completion.
39
40These problems are going to be solved incrementally in the next QEMU releases
41and we're going to establish a deprecation policy for badly defined commands.
42
43If you're planning to adopt QMP, please observe the following:
44
Zhi Yong Wuc20cdf82011-07-27 14:32:56 +080045 1. The deprecation policy will take effect and be documented soon, please
Luiz Capitulino82a56f02010-09-13 12:26:00 -030046 check the documentation of each used command as soon as a new release of
47 QEMU is available
48
49 2. DO NOT rely on anything which is not explicit documented
50
51 3. Errors, in special, are not documented. Applications should NOT check
52 for specific errors classes or data (it's strongly recommended to only
53 check for the "error" key)
54
552. Regular Commands
56===================
57
58Server's responses in the examples below are always a success response, please
59refer to the QMP specification for more details on error responses.
60
61EQMP
62
63 {
64 .name = "quit",
65 .args_type = "",
Luiz Capitulino7a7f3252011-09-15 14:20:28 -030066 .mhandler.cmd_new = qmp_marshal_input_quit,
Luiz Capitulino82a56f02010-09-13 12:26:00 -030067 },
68
69SQMP
70quit
71----
72
73Quit the emulator.
74
75Arguments: None.
76
77Example:
78
79-> { "execute": "quit" }
80<- { "return": {} }
81
82EQMP
83
84 {
85 .name = "eject",
86 .args_type = "force:-f,device:B",
Luiz Capitulinoc245b6a2011-12-07 16:02:36 -020087 .mhandler.cmd_new = qmp_marshal_input_eject,
Luiz Capitulino82a56f02010-09-13 12:26:00 -030088 },
89
90SQMP
91eject
92-----
93
94Eject a removable medium.
95
96Arguments:
97
98- force: force ejection (json-bool, optional)
99- device: device name (json-string)
100
101Example:
102
103-> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104<- { "return": {} }
105
106Note: The "force" argument defaults to false.
107
108EQMP
109
110 {
111 .name = "change",
112 .args_type = "device:B,target:F,arg:s?",
Luiz Capitulino333a96e2011-12-08 11:13:50 -0200113 .mhandler.cmd_new = qmp_marshal_input_change,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300114 },
115
116SQMP
117change
118------
119
120Change a removable medium or VNC configuration.
121
122Arguments:
123
124- "device": device name (json-string)
125- "target": filename or item (json-string)
126- "arg": additional argument (json-string, optional)
127
128Examples:
129
1301. Change a removable medium
131
132-> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135<- { "return": {} }
136
1372. Change VNC password
138
139-> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
141 "arg": "foobar1" } }
142<- { "return": {} }
143
144EQMP
145
146 {
147 .name = "screendump",
148 .args_type = "filename:F",
Luiz Capitulinoad39cf62012-05-24 13:48:23 -0300149 .mhandler.cmd_new = qmp_marshal_input_screendump,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300150 },
151
152SQMP
153screendump
154----------
155
156Save screen into PPM image.
157
158Arguments:
159
160- "filename": file path (json-string)
161
162Example:
163
164-> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165<- { "return": {} }
166
167EQMP
168
169 {
170 .name = "stop",
171 .args_type = "",
Luiz Capitulino5f158f22011-09-15 14:34:39 -0300172 .mhandler.cmd_new = qmp_marshal_input_stop,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300173 },
174
175SQMP
176stop
177----
178
179Stop the emulator.
180
181Arguments: None.
182
183Example:
184
185-> { "execute": "stop" }
186<- { "return": {} }
187
188EQMP
189
190 {
191 .name = "cont",
192 .args_type = "",
Luiz Capitulinoe42e8182011-11-22 17:58:31 -0200193 .mhandler.cmd_new = qmp_marshal_input_cont,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300194 },
195
196SQMP
197cont
198----
199
200Resume emulation.
201
202Arguments: None.
203
204Example:
205
206-> { "execute": "cont" }
207<- { "return": {} }
208
209EQMP
210
211 {
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100212 .name = "system_wakeup",
213 .args_type = "",
214 .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
215 },
216
217SQMP
218system_wakeup
219-------------
220
221Wakeup guest from suspend.
222
223Arguments: None.
224
225Example:
226
227-> { "execute": "system_wakeup" }
228<- { "return": {} }
229
230EQMP
231
232 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300233 .name = "system_reset",
234 .args_type = "",
Luiz Capitulino38d22652011-09-15 14:41:46 -0300235 .mhandler.cmd_new = qmp_marshal_input_system_reset,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300236 },
237
238SQMP
239system_reset
240------------
241
242Reset the system.
243
244Arguments: None.
245
246Example:
247
248-> { "execute": "system_reset" }
249<- { "return": {} }
250
251EQMP
252
253 {
254 .name = "system_powerdown",
255 .args_type = "",
Luiz Capitulino22e1bb92011-11-27 22:40:03 -0200256 .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300257 },
258
259SQMP
260system_powerdown
261----------------
262
263Send system power down event.
264
265Arguments: None.
266
267Example:
268
269-> { "execute": "system_powerdown" }
270<- { "return": {} }
271
272EQMP
273
274 {
275 .name = "device_add",
276 .args_type = "device:O",
277 .params = "driver[,prop=value][,...]",
278 .help = "add device, like -device on the command line",
279 .user_print = monitor_user_noop,
280 .mhandler.cmd_new = do_device_add,
281 },
282
283SQMP
284device_add
285----------
286
287Add a device.
288
289Arguments:
290
291- "driver": the name of the new device's driver (json-string)
292- "bus": the device's parent bus (device tree path, json-string, optional)
293- "id": the device's ID, must be unique (json-string)
294- device properties
295
296Example:
297
298-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
299<- { "return": {} }
300
301Notes:
302
303(1) For detailed information about this command, please refer to the
304 'docs/qdev-device-use.txt' file.
305
306(2) It's possible to list device properties by running QEMU with the
307 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
308
309EQMP
310
311 {
312 .name = "device_del",
313 .args_type = "id:s",
Luiz Capitulinoa15fef22012-03-29 12:38:50 -0300314 .mhandler.cmd_new = qmp_marshal_input_device_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300315 },
316
317SQMP
318device_del
319----------
320
321Remove a device.
322
323Arguments:
324
325- "id": the device's ID (json-string)
326
327Example:
328
329-> { "execute": "device_del", "arguments": { "id": "net1" } }
330<- { "return": {} }
331
332EQMP
333
334 {
Amos Konge4c8f002012-08-31 10:56:26 +0800335 .name = "send-key",
336 .args_type = "keys:O,hold-time:i?",
337 .mhandler.cmd_new = qmp_marshal_input_send_key,
338 },
339
340SQMP
341send-key
342----------
343
344Send keys to VM.
345
346Arguments:
347
348keys array:
349 - "key": key sequence (a json-array of key enum values)
350
351- hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
353
354Example:
355
356-> { "execute": "send-key",
357 "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
358<- { "return": {} }
359
360EQMP
361
362 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300363 .name = "cpu",
364 .args_type = "index:i",
Luiz Capitulino755f1962011-10-06 14:31:39 -0300365 .mhandler.cmd_new = qmp_marshal_input_cpu,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300366 },
367
368SQMP
369cpu
370---
371
372Set the default CPU.
373
374Arguments:
375
376- "index": the CPU's index (json-int)
377
378Example:
379
380-> { "execute": "cpu", "arguments": { "index": 0 } }
381<- { "return": {} }
382
383Note: CPUs' indexes are obtained with the 'query-cpus' command.
384
385EQMP
386
387 {
Igor Mammedov69ca3ea2013-04-30 15:41:25 +0200388 .name = "cpu-add",
389 .args_type = "id:i",
390 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
391 },
392
393SQMP
394cpu-add
395-------
396
397Adds virtual cpu
398
399Arguments:
400
401- "id": cpu id (json-int)
402
403Example:
404
405-> { "execute": "cpu-add", "arguments": { "id": 2 } }
406<- { "return": {} }
407
408EQMP
409
410 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300411 .name = "memsave",
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200412 .args_type = "val:l,size:i,filename:s,cpu:i?",
413 .mhandler.cmd_new = qmp_marshal_input_memsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300414 },
415
416SQMP
417memsave
418-------
419
420Save to disk virtual memory dump starting at 'val' of size 'size'.
421
422Arguments:
423
424- "val": the starting address (json-int)
425- "size": the memory size, in bytes (json-int)
426- "filename": file path (json-string)
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200427- "cpu": virtual CPU index (json-int, optional)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300428
429Example:
430
431-> { "execute": "memsave",
432 "arguments": { "val": 10,
433 "size": 100,
434 "filename": "/tmp/virtual-mem-dump" } }
435<- { "return": {} }
436
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300437EQMP
438
439 {
440 .name = "pmemsave",
441 .args_type = "val:l,size:i,filename:s",
Luiz Capitulino6d3962b2011-11-22 17:26:46 -0200442 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300443 },
444
445SQMP
446pmemsave
447--------
448
449Save to disk physical memory dump starting at 'val' of size 'size'.
450
451Arguments:
452
453- "val": the starting address (json-int)
454- "size": the memory size, in bytes (json-int)
455- "filename": file path (json-string)
456
457Example:
458
459-> { "execute": "pmemsave",
460 "arguments": { "val": 10,
461 "size": 100,
462 "filename": "/tmp/physical-mem-dump" } }
463<- { "return": {} }
464
465EQMP
466
467 {
Lai Jiangshana4046662011-03-07 17:05:15 +0800468 .name = "inject-nmi",
469 .args_type = "",
Luiz Capitulinoab49ab52011-11-23 12:55:53 -0200470 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
Lai Jiangshana4046662011-03-07 17:05:15 +0800471 },
472
473SQMP
474inject-nmi
475----------
476
477Inject an NMI on guest's CPUs.
478
479Arguments: None.
480
481Example:
482
483-> { "execute": "inject-nmi" }
484<- { "return": {} }
485
Luiz Capitulinode253f12012-07-27 16:18:16 -0300486Note: inject-nmi fails when the guest doesn't support injecting.
487 Currently, only x86 guests do.
Lai Jiangshana4046662011-03-07 17:05:15 +0800488
489EQMP
490
491 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100492 .name = "ringbuf-write",
Markus Armbruster82e59a62013-02-06 21:27:14 +0100493 .args_type = "device:s,data:s,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100494 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
Lei Li1f590cf2013-01-25 00:03:20 +0800495 },
496
497SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100498ringbuf-write
Lei Li1f590cf2013-01-25 00:03:20 +0800499-------------
500
Markus Armbruster3949e592013-02-06 21:27:24 +0100501Write to a ring buffer character device.
Lei Li1f590cf2013-01-25 00:03:20 +0800502
503Arguments:
504
Markus Armbruster3949e592013-02-06 21:27:24 +0100505- "device": ring buffer character device name (json-string)
506- "data": data to write (json-string)
507- "format": data format (json-string, optional)
508 - Possible values: "utf8" (default), "base64"
509 Bug: invalid base64 is currently not rejected.
510 Whitespace *is* invalid.
Lei Li1f590cf2013-01-25 00:03:20 +0800511
512Example:
513
Markus Armbruster3949e592013-02-06 21:27:24 +0100514-> { "execute": "ringbuf-write",
515 "arguments": { "device": "foo",
Lei Li1f590cf2013-01-25 00:03:20 +0800516 "data": "abcdefgh",
517 "format": "utf8" } }
518<- { "return": {} }
519
520EQMP
521
522 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100523 .name = "ringbuf-read",
Lei Li49b6d722013-01-25 00:03:21 +0800524 .args_type = "device:s,size:i,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100525 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
Lei Li49b6d722013-01-25 00:03:21 +0800526 },
527
528SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100529ringbuf-read
Lei Li49b6d722013-01-25 00:03:21 +0800530-------------
531
Markus Armbruster3949e592013-02-06 21:27:24 +0100532Read from a ring buffer character device.
Lei Li49b6d722013-01-25 00:03:21 +0800533
534Arguments:
535
Markus Armbruster3949e592013-02-06 21:27:24 +0100536- "device": ring buffer character device name (json-string)
537- "size": how many bytes to read at most (json-int)
538 - Number of data bytes, not number of characters in encoded data
539- "format": data format (json-string, optional)
540 - Possible values: "utf8" (default), "base64"
541 - Naturally, format "utf8" works only when the ring buffer
542 contains valid UTF-8 text. Invalid UTF-8 sequences get
543 replaced. Bug: replacement doesn't work. Bug: can screw
544 up on encountering NUL characters, after the ring buffer
545 lost data, and when reading stops because the size limit
546 is reached.
Lei Li49b6d722013-01-25 00:03:21 +0800547
548Example:
549
Markus Armbruster3949e592013-02-06 21:27:24 +0100550-> { "execute": "ringbuf-read",
551 "arguments": { "device": "foo",
Lei Li49b6d722013-01-25 00:03:21 +0800552 "size": 1000,
553 "format": "utf8" } }
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100554<- {"return": "abcdefgh"}
Lei Li49b6d722013-01-25 00:03:21 +0800555
556EQMP
557
558 {
Stefano Stabellinia7ae8352012-01-25 12:24:51 +0000559 .name = "xen-save-devices-state",
560 .args_type = "filename:F",
561 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
562 },
563
564SQMP
565xen-save-devices-state
566-------
567
568Save the state of all devices to file. The RAM and the block devices
569of the VM are not saved by this command.
570
571Arguments:
572
573- "filename": the file to save the state of the devices to as binary
574data. See xen-save-devices-state.txt for a description of the binary
575format.
576
577Example:
578
579-> { "execute": "xen-save-devices-state",
580 "arguments": { "filename": "/tmp/save" } }
581<- { "return": {} }
582
583EQMP
584
585 {
Anthony PERARD39f42432012-10-03 13:48:19 +0000586 .name = "xen-set-global-dirty-log",
587 .args_type = "enable:b",
588 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
589 },
590
591SQMP
592xen-set-global-dirty-log
593-------
594
595Enable or disable the global dirty log mode.
596
597Arguments:
598
599- "enable": Enable it or disable it.
600
601Example:
602
603-> { "execute": "xen-set-global-dirty-log",
604 "arguments": { "enable": true } }
605<- { "return": {} }
606
607EQMP
608
609 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300610 .name = "migrate",
611 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -0200612 .mhandler.cmd_new = qmp_marshal_input_migrate,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300613 },
614
615SQMP
616migrate
617-------
618
619Migrate to URI.
620
621Arguments:
622
623- "blk": block migration, full disk copy (json-bool, optional)
624- "inc": incremental disk copy (json-bool, optional)
625- "uri": Destination URI (json-string)
626
627Example:
628
629-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
630<- { "return": {} }
631
632Notes:
633
634(1) The 'query-migrate' command should be used to check migration's progress
635 and final result (this information is provided by the 'status' member)
636(2) All boolean arguments default to false
637(3) The user Monitor's "detach" argument is invalid in QMP and should not
638 be used
639
640EQMP
641
642 {
643 .name = "migrate_cancel",
644 .args_type = "",
Luiz Capitulino6cdedb02011-11-27 22:54:09 -0200645 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300646 },
647
648SQMP
649migrate_cancel
650--------------
651
652Cancel the current migration.
653
654Arguments: None.
655
656Example:
657
658-> { "execute": "migrate_cancel" }
659<- { "return": {} }
660
661EQMP
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300662{
663 .name = "migrate-set-cache-size",
664 .args_type = "value:o",
665 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
666 },
667
668SQMP
669migrate-set-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100670----------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300671
672Set cache size to be used by XBZRLE migration, the cache size will be rounded
673down to the nearest power of 2
674
675Arguments:
676
677- "value": cache size in bytes (json-int)
678
679Example:
680
681-> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
682<- { "return": {} }
683
684EQMP
685 {
686 .name = "query-migrate-cache-size",
687 .args_type = "",
688 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
689 },
690
691SQMP
692query-migrate-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100693------------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300694
695Show cache size to be used by XBZRLE migration
696
697returns a json-object with the following information:
698- "size" : json-int
699
700Example:
701
702-> { "execute": "query-migrate-cache-size" }
703<- { "return": 67108864 }
704
705EQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300706
707 {
708 .name = "migrate_set_speed",
Wen Congyang3a019b62010-11-25 09:06:05 +0800709 .args_type = "value:o",
Luiz Capitulino3dc85382011-11-28 11:59:37 -0200710 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300711 },
712
713SQMP
714migrate_set_speed
715-----------------
716
717Set maximum speed for migrations.
718
719Arguments:
720
Luiz Capitulino5569fd72010-12-15 17:56:18 -0200721- "value": maximum speed, in bytes per second (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300722
723Example:
724
725-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
726<- { "return": {} }
727
728EQMP
729
730 {
731 .name = "migrate_set_downtime",
732 .args_type = "value:T",
Luiz Capitulino4f0a9932011-11-27 23:18:01 -0200733 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300734 },
735
736SQMP
737migrate_set_downtime
738--------------------
739
740Set maximum tolerated downtime (in seconds) for migrations.
741
742Arguments:
743
744- "value": maximum downtime (json-number)
745
746Example:
747
748-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
749<- { "return": {} }
750
751EQMP
752
753 {
Jes Sorensenff73edf2011-03-09 14:31:06 +0100754 .name = "client_migrate_info",
755 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
756 .params = "protocol hostname port tls-port cert-subject",
757 .help = "send migration info to spice/vnc client",
758 .user_print = monitor_user_noop,
Yonit Halperinedc5cb12011-10-17 10:03:18 +0200759 .mhandler.cmd_async = client_migrate_info,
760 .flags = MONITOR_CMD_ASYNC,
Jes Sorensenff73edf2011-03-09 14:31:06 +0100761 },
762
763SQMP
764client_migrate_info
765------------------
766
767Set the spice/vnc connection info for the migration target. The spice/vnc
768server will ask the spice/vnc client to automatically reconnect using the
769new parameters (if specified) once the vm migration finished successfully.
770
771Arguments:
772
773- "protocol": protocol: "spice" or "vnc" (json-string)
774- "hostname": migration target hostname (json-string)
775- "port": spice/vnc tcp port for plaintext channels (json-int, optional)
776- "tls-port": spice tcp port for tls-secured channels (json-int, optional)
777- "cert-subject": server certificate subject (json-string, optional)
778
779Example:
780
781-> { "execute": "client_migrate_info",
782 "arguments": { "protocol": "spice",
783 "hostname": "virt42.lab.kraxel.org",
784 "port": 1234 } }
785<- { "return": {} }
786
787EQMP
788
789 {
Wen Congyang783e9b42012-05-07 12:10:47 +0800790 .name = "dump-guest-memory",
791 .args_type = "paging:b,protocol:s,begin:i?,end:i?",
792 .params = "-p protocol [begin] [length]",
793 .help = "dump guest memory to file",
794 .user_print = monitor_user_noop,
795 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
796 },
797
798SQMP
799dump
800
801
802Dump guest memory to file. The file can be processed with crash or gdb.
803
804Arguments:
805
806- "paging": do paging to get guest's memory mapping (json-bool)
807- "protocol": destination file(started with "file:") or destination file
808 descriptor (started with "fd:") (json-string)
809- "begin": the starting physical address. It's optional, and should be specified
810 with length together (json-int)
811- "length": the memory size, in bytes. It's optional, and should be specified
812 with begin together (json-int)
813
814Example:
815
816-> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
817<- { "return": {} }
818
819Notes:
820
821(1) All boolean arguments default to false
822
823EQMP
824
825 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300826 .name = "netdev_add",
827 .args_type = "netdev:O",
Luiz Capitulino928059a2012-04-18 17:34:15 -0300828 .mhandler.cmd_new = qmp_netdev_add,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300829 },
830
831SQMP
832netdev_add
833----------
834
835Add host network device.
836
837Arguments:
838
839- "type": the device type, "tap", "user", ... (json-string)
840- "id": the device's ID, must be unique (json-string)
841- device options
842
843Example:
844
845-> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
846<- { "return": {} }
847
Markus Armbrusteraf347aa2013-02-22 18:31:51 +0100848Note: The supported device options are the same ones supported by the '-netdev'
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300849 command-line argument, which are listed in the '-help' output or QEMU's
850 manual
851
852EQMP
853
854 {
855 .name = "netdev_del",
856 .args_type = "id:s",
Luiz Capitulino5f964152012-04-16 14:36:32 -0300857 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300858 },
859
860SQMP
861netdev_del
862----------
863
864Remove host network device.
865
866Arguments:
867
868- "id": the device's ID, must be unique (json-string)
869
870Example:
871
872-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
873<- { "return": {} }
874
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100875
876EQMP
877
878 {
879 .name = "block_resize",
880 .args_type = "device:B,size:o",
Luiz Capitulino5e7caac2011-11-25 14:57:10 -0200881 .mhandler.cmd_new = qmp_marshal_input_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100882 },
883
884SQMP
885block_resize
886------------
887
888Resize a block image while a guest is running.
889
890Arguments:
891
892- "device": the device's ID, must be unique (json-string)
893- "size": new size
894
895Example:
896
897-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
898<- { "return": {} }
899
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300900EQMP
901
902 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +0100903 .name = "block-stream",
Paolo Bonzini1d809092012-09-28 17:22:59 +0200904 .args_type = "device:B,base:s?,speed:o?,on-error:s?",
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +0000905 .mhandler.cmd_new = qmp_marshal_input_block_stream,
906 },
907
908 {
Jeff Codyed61fc12012-09-27 13:29:16 -0400909 .name = "block-commit",
910 .args_type = "device:B,base:s?,top:s,speed:o?",
911 .mhandler.cmd_new = qmp_marshal_input_block_commit,
912 },
913
914 {
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +0200915 .name = "drive-backup",
Stefan Hajnoczib53169e2013-06-26 14:11:57 +0200916 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +0200917 "on-source-error:s?,on-target-error:s?",
918 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
919 },
920
921SQMP
922drive-backup
923------------
924
925Start a point-in-time copy of a block device to a new destination. The
926status of ongoing drive-backup operations can be checked with
927query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
928The operation can be stopped before it has completed using the
929block-job-cancel command.
930
931Arguments:
932
933- "device": the name of the device which should be copied.
934 (json-string)
935- "target": the target of the new image. If the file exists, or if it is a
936 device, the existing file/device will be used as the new
937 destination. If it does not exist, a new file will be created.
938 (json-string)
939- "format": the format of the new destination, default is to probe if 'mode' is
940 'existing', else the format of the source
941 (json-string, optional)
Stefan Hajnoczib53169e2013-06-26 14:11:57 +0200942- "sync": what parts of the disk image should be copied to the destination;
943 possibilities include "full" for all the disk, "top" for only the sectors
944 allocated in the topmost image, or "none" to only replicate new I/O
945 (MirrorSyncMode).
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +0200946- "mode": whether and how QEMU should create a new image
947 (NewImageMode, optional, default 'absolute-paths')
948- "speed": the maximum speed, in bytes per second (json-int, optional)
949- "on-source-error": the action to take on an error on the source, default
950 'report'. 'stop' and 'enospc' can only be used
951 if the block device supports io-status.
952 (BlockdevOnError, optional)
953- "on-target-error": the action to take on an error on the target, default
954 'report' (no limitations, since this applies to
955 a different block device than device).
956 (BlockdevOnError, optional)
957
958Example:
959-> { "execute": "drive-backup", "arguments": { "device": "drive0",
960 "target": "backup.img" } }
961<- { "return": {} }
962EQMP
963
964 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +0100965 .name = "block-job-set-speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +0100966 .args_type = "device:B,speed:o",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000967 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
968 },
969
970 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +0100971 .name = "block-job-cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200972 .args_type = "device:B,force:b?",
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000973 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
974 },
Jeff Codyc1864022012-02-28 15:54:07 -0500975 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200976 .name = "block-job-pause",
977 .args_type = "device:B",
978 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
979 },
980 {
981 .name = "block-job-resume",
982 .args_type = "device:B",
983 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
984 },
985 {
Paolo Bonziniaeae8832012-10-18 16:49:21 +0200986 .name = "block-job-complete",
987 .args_type = "device:B",
988 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
989 },
990 {
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100991 .name = "transaction",
Paolo Bonzinib9f89782012-03-22 12:51:11 +0100992 .args_type = "actions:q",
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100993 .mhandler.cmd_new = qmp_marshal_input_transaction,
Jeff Codyc1864022012-02-28 15:54:07 -0500994 },
995
996SQMP
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100997transaction
998-----------
Jeff Codyc1864022012-02-28 15:54:07 -0500999
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001000Atomically operate on one or more block devices. The only supported
1001operation for now is snapshotting. If there is any failure performing
1002any of the operations, all snapshots for the group are abandoned, and
1003the original disks pre-snapshot attempt are used.
Jeff Codyc1864022012-02-28 15:54:07 -05001004
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001005A list of dictionaries is accepted, that contains the actions to be performed.
1006For snapshots this is the device, the file to use for the new snapshot,
1007and the format. The default format, if not specified, is qcow2.
Jeff Codyc1864022012-02-28 15:54:07 -05001008
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001009Each new snapshot defaults to being created by QEMU (wiping any
1010contents if the file already exists), but it is also possible to reuse
1011an externally-created file. In the latter case, you should ensure that
1012the new image file has the same contents as the current one; QEMU cannot
1013perform any meaningful check. Typically this is achieved by using the
1014current image file as the backing file for the new image.
1015
Jeff Codyc1864022012-02-28 15:54:07 -05001016Arguments:
1017
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001018actions array:
1019 - "type": the operation to perform. The only supported
1020 value is "blockdev-snapshot-sync". (json-string)
1021 - "data": a dictionary. The contents depend on the value
1022 of "type". When "type" is "blockdev-snapshot-sync":
1023 - "device": device name to snapshot (json-string)
1024 - "snapshot-file": name of new image file (json-string)
1025 - "format": format of new image (json-string, optional)
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001026 - "mode": whether and how QEMU should create the snapshot file
1027 (NewImageMode, optional, default "absolute-paths")
Jeff Codyc1864022012-02-28 15:54:07 -05001028
1029Example:
1030
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001031-> { "execute": "transaction",
1032 "arguments": { "actions": [
1033 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
1034 "snapshot-file": "/some/place/my-image",
1035 "format": "qcow2" } },
1036 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
1037 "snapshot-file": "/some/place/my-image2",
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001038 "mode": "existing",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001039 "format": "qcow2" } } ] } }
Jeff Codyc1864022012-02-28 15:54:07 -05001040<- { "return": {} }
1041
1042EQMP
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001043
1044 {
Jes Sorensend967b2f2011-07-11 20:01:09 +02001045 .name = "blockdev-snapshot-sync",
Paolo Bonzini31155b92012-04-12 14:00:58 +02001046 .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
Luiz Capitulino6106e242011-11-25 16:15:19 -02001047 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
Jes Sorensend967b2f2011-07-11 20:01:09 +02001048 },
1049
1050SQMP
1051blockdev-snapshot-sync
1052----------------------
1053
1054Synchronous snapshot of a block device. snapshot-file specifies the
1055target of the new image. If the file exists, or if it is a device, the
1056snapshot will be created in the existing file/device. If does not
1057exist, a new file will be created. format specifies the format of the
1058snapshot image, default is qcow2.
1059
1060Arguments:
1061
1062- "device": device name to snapshot (json-string)
1063- "snapshot-file": name of new image file (json-string)
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001064- "mode": whether and how QEMU should create the snapshot file
1065 (NewImageMode, optional, default "absolute-paths")
Jes Sorensend967b2f2011-07-11 20:01:09 +02001066- "format": format of new image (json-string, optional)
1067
1068Example:
1069
Luiz Capitulino7f3850c2011-10-10 17:30:08 -03001070-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1071 "snapshot-file":
1072 "/some/place/my-image",
1073 "format": "qcow2" } }
Jes Sorensend967b2f2011-07-11 20:01:09 +02001074<- { "return": {} }
1075
1076EQMP
1077
1078 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001079 .name = "drive-mirror",
Paolo Bonzinib952b552012-10-18 16:49:28 +02001080 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001081 "on-source-error:s?,on-target-error:s?,"
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001082 "granularity:i?,buf-size:i?",
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001083 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1084 },
1085
1086SQMP
1087drive-mirror
1088------------
1089
1090Start mirroring a block device's writes to a new destination. target
1091specifies the target of the new image. If the file exists, or if it is
1092a device, it will be used as the new destination for writes. If it does not
1093exist, a new file will be created. format specifies the format of the
1094mirror image, default is to probe if mode='existing', else the format
1095of the source.
1096
1097Arguments:
1098
1099- "device": device name to operate on (json-string)
1100- "target": name of new image file (json-string)
1101- "format": format of new image (json-string, optional)
1102- "mode": how an image file should be created into the target
1103 file/device (NewImageMode, optional, default 'absolute-paths')
1104- "speed": maximum speed of the streaming job, in bytes per second
1105 (json-int)
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001106- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001107- "buf_size": maximum amount of data in flight from source to target, in bytes
1108 (json-int, default 10M)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001109- "sync": what parts of the disk image should be copied to the destination;
1110 possibilities include "full" for all the disk, "top" for only the sectors
1111 allocated in the topmost image, or "none" to only replicate new I/O
1112 (MirrorSyncMode).
Paolo Bonzinib952b552012-10-18 16:49:28 +02001113- "on-source-error": the action to take on an error on the source
1114 (BlockdevOnError, default 'report')
1115- "on-target-error": the action to take on an error on the target
1116 (BlockdevOnError, default 'report')
1117
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001118The default value of the granularity is the image cluster size clamped
1119between 4096 and 65536, if the image format defines one. If the format
1120does not define a cluster size, the default value of the granularity
1121is 65536.
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001122
1123
1124Example:
1125
1126-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1127 "target": "/some/place/my-image",
1128 "sync": "full",
1129 "format": "qcow2" } }
1130<- { "return": {} }
1131
1132EQMP
1133
1134 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001135 .name = "balloon",
1136 .args_type = "value:M",
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001137 .mhandler.cmd_new = qmp_marshal_input_balloon,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001138 },
1139
1140SQMP
1141balloon
1142-------
1143
1144Request VM to change its memory allocation (in bytes).
1145
1146Arguments:
1147
1148- "value": New memory allocation (json-int)
1149
1150Example:
1151
1152-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1153<- { "return": {} }
1154
1155EQMP
1156
1157 {
1158 .name = "set_link",
1159 .args_type = "name:s,up:b",
Luiz Capitulino4b371562011-11-23 13:11:55 -02001160 .mhandler.cmd_new = qmp_marshal_input_set_link,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001161 },
1162
1163SQMP
1164set_link
1165--------
1166
1167Change the link status of a network adapter.
1168
1169Arguments:
1170
1171- "name": network device name (json-string)
1172- "up": status is up (json-bool)
1173
1174Example:
1175
1176-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1177<- { "return": {} }
1178
1179EQMP
1180
1181 {
1182 .name = "getfd",
1183 .args_type = "fdname:s",
1184 .params = "getfd name",
1185 .help = "receive a file descriptor via SCM rights and assign it a name",
Corey Bryant208c9d12012-06-22 14:36:09 -04001186 .mhandler.cmd_new = qmp_marshal_input_getfd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001187 },
1188
1189SQMP
1190getfd
1191-----
1192
1193Receive a file descriptor via SCM rights and assign it a name.
1194
1195Arguments:
1196
1197- "fdname": file descriptor name (json-string)
1198
1199Example:
1200
1201-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1202<- { "return": {} }
1203
Corey Bryant208c9d12012-06-22 14:36:09 -04001204Notes:
1205
1206(1) If the name specified by the "fdname" argument already exists,
1207 the file descriptor assigned to it will be closed and replaced
1208 by the received file descriptor.
1209(2) The 'closefd' command can be used to explicitly close the file
1210 descriptor when it is no longer needed.
1211
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001212EQMP
1213
1214 {
1215 .name = "closefd",
1216 .args_type = "fdname:s",
1217 .params = "closefd name",
1218 .help = "close a file descriptor previously passed via SCM rights",
Corey Bryant208c9d12012-06-22 14:36:09 -04001219 .mhandler.cmd_new = qmp_marshal_input_closefd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001220 },
1221
1222SQMP
1223closefd
1224-------
1225
1226Close a file descriptor previously passed via SCM rights.
1227
1228Arguments:
1229
1230- "fdname": file descriptor name (json-string)
1231
1232Example:
1233
1234-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1235<- { "return": {} }
1236
1237EQMP
1238
Corey Bryantba1c0482012-08-14 16:43:43 -04001239 {
1240 .name = "add-fd",
1241 .args_type = "fdset-id:i?,opaque:s?",
1242 .params = "add-fd fdset-id opaque",
1243 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1244 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1245 },
1246
1247SQMP
1248add-fd
1249-------
1250
1251Add a file descriptor, that was passed via SCM rights, to an fd set.
1252
1253Arguments:
1254
1255- "fdset-id": The ID of the fd set to add the file descriptor to.
1256 (json-int, optional)
1257- "opaque": A free-form string that can be used to describe the fd.
1258 (json-string, optional)
1259
1260Return a json-object with the following information:
1261
1262- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1263- "fd": The file descriptor that was received via SCM rights and added to the
1264 fd set. (json-int)
1265
1266Example:
1267
1268-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1269<- { "return": { "fdset-id": 1, "fd": 3 } }
1270
1271Notes:
1272
1273(1) The list of fd sets is shared by all monitor connections.
1274(2) If "fdset-id" is not specified, a new fd set will be created.
1275
1276EQMP
1277
1278 {
1279 .name = "remove-fd",
1280 .args_type = "fdset-id:i,fd:i?",
1281 .params = "remove-fd fdset-id fd",
1282 .help = "Remove a file descriptor from an fd set",
1283 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1284 },
1285
1286SQMP
1287remove-fd
1288---------
1289
1290Remove a file descriptor from an fd set.
1291
1292Arguments:
1293
1294- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1295 (json-int)
1296- "fd": The file descriptor that is to be removed. (json-int, optional)
1297
1298Example:
1299
1300-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1301<- { "return": {} }
1302
1303Notes:
1304
1305(1) The list of fd sets is shared by all monitor connections.
1306(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1307 removed.
1308
1309EQMP
1310
1311 {
1312 .name = "query-fdsets",
1313 .args_type = "",
1314 .help = "Return information describing all fd sets",
1315 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1316 },
1317
1318SQMP
1319query-fdsets
1320-------------
1321
1322Return information describing all fd sets.
1323
1324Arguments: None
1325
1326Example:
1327
1328-> { "execute": "query-fdsets" }
1329<- { "return": [
1330 {
1331 "fds": [
1332 {
1333 "fd": 30,
1334 "opaque": "rdonly:/path/to/file"
1335 },
1336 {
1337 "fd": 24,
1338 "opaque": "rdwr:/path/to/file"
1339 }
1340 ],
1341 "fdset-id": 1
1342 },
1343 {
1344 "fds": [
1345 {
1346 "fd": 28
1347 },
1348 {
1349 "fd": 29
1350 }
1351 ],
1352 "fdset-id": 0
1353 }
1354 ]
1355 }
1356
1357Note: The list of fd sets is shared by all monitor connections.
1358
1359EQMP
1360
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001361 {
1362 .name = "block_passwd",
1363 .args_type = "device:B,password:s",
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001364 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001365 },
1366
1367SQMP
1368block_passwd
1369------------
1370
1371Set the password of encrypted block devices.
1372
1373Arguments:
1374
1375- "device": device name (json-string)
1376- "password": password (json-string)
1377
1378Example:
1379
1380-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1381 "password": "12345" } }
1382<- { "return": {} }
1383
1384EQMP
1385
1386 {
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001387 .name = "block_set_io_throttle",
1388 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
Luiz Capitulino80047da2011-12-14 16:49:14 -02001389 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001390 },
1391
1392SQMP
1393block_set_io_throttle
1394------------
1395
1396Change I/O throttle limits for a block drive.
1397
1398Arguments:
1399
1400- "device": device name (json-string)
1401- "bps": total throughput limit in bytes per second(json-int)
1402- "bps_rd": read throughput limit in bytes per second(json-int)
1403- "bps_wr": read throughput limit in bytes per second(json-int)
1404- "iops": total I/O operations per second(json-int)
1405- "iops_rd": read I/O operations per second(json-int)
1406- "iops_wr": write I/O operations per second(json-int)
1407
1408Example:
1409
1410-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1411 "bps": "1000000",
1412 "bps_rd": "0",
1413 "bps_wr": "0",
1414 "iops": "0",
1415 "iops_rd": "0",
1416 "iops_wr": "0" } }
1417<- { "return": {} }
1418
1419EQMP
1420
1421 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001422 .name = "set_password",
1423 .args_type = "protocol:s,password:s,connected:s?",
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001424 .mhandler.cmd_new = qmp_marshal_input_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001425 },
1426
1427SQMP
1428set_password
1429------------
1430
1431Set the password for vnc/spice protocols.
1432
1433Arguments:
1434
1435- "protocol": protocol name (json-string)
1436- "password": password (json-string)
1437- "connected": [ keep | disconnect | fail ] (josn-string, optional)
1438
1439Example:
1440
1441-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1442 "password": "secret" } }
1443<- { "return": {} }
1444
1445EQMP
1446
1447 {
1448 .name = "expire_password",
1449 .args_type = "protocol:s,time:s",
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001450 .mhandler.cmd_new = qmp_marshal_input_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001451 },
1452
1453SQMP
1454expire_password
1455---------------
1456
1457Set the password expire time for vnc/spice protocols.
1458
1459Arguments:
1460
1461- "protocol": protocol name (json-string)
1462- "time": [ now | never | +secs | secs ] (json-string)
1463
1464Example:
1465
1466-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1467 "time": "+60" } }
1468<- { "return": {} }
1469
1470EQMP
1471
1472 {
Daniel P. Berrange13661082011-06-23 13:31:42 +01001473 .name = "add_client",
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001474 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
Luiz Capitulinob224e5e2012-09-13 16:52:20 -03001475 .mhandler.cmd_new = qmp_marshal_input_add_client,
Daniel P. Berrange13661082011-06-23 13:31:42 +01001476 },
1477
1478SQMP
1479add_client
1480----------
1481
1482Add a graphics client
1483
1484Arguments:
1485
1486- "protocol": protocol name (json-string)
1487- "fdname": file descriptor name (json-string)
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001488- "skipauth": whether to skip authentication (json-bool, optional)
1489- "tls": whether to perform TLS (json-bool, optional)
Daniel P. Berrange13661082011-06-23 13:31:42 +01001490
1491Example:
1492
1493-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1494 "fdname": "myclient" } }
1495<- { "return": {} }
1496
1497EQMP
1498 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001499 .name = "qmp_capabilities",
1500 .args_type = "",
1501 .params = "",
1502 .help = "enable QMP capabilities",
1503 .user_print = monitor_user_noop,
1504 .mhandler.cmd_new = do_qmp_capabilities,
1505 },
1506
1507SQMP
1508qmp_capabilities
1509----------------
1510
1511Enable QMP capabilities.
1512
1513Arguments: None.
1514
1515Example:
1516
1517-> { "execute": "qmp_capabilities" }
1518<- { "return": {} }
1519
1520Note: This command must be issued before issuing any other command.
1521
Luiz Capitulino0268d972010-10-22 10:08:02 -02001522EQMP
1523
1524 {
1525 .name = "human-monitor-command",
1526 .args_type = "command-line:s,cpu-index:i?",
Luiz Capitulinod51a67b2011-11-25 17:52:45 -02001527 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
Luiz Capitulino0268d972010-10-22 10:08:02 -02001528 },
1529
1530SQMP
1531human-monitor-command
1532---------------------
1533
1534Execute a Human Monitor command.
1535
1536Arguments:
1537
1538- command-line: the command name and its arguments, just like the
1539 Human Monitor's shell (json-string)
1540- cpu-index: select the CPU number to be used by commands which access CPU
1541 data, like 'info registers'. The Monitor selects CPU 0 if this
1542 argument is not provided (json-int, optional)
1543
1544Example:
1545
1546-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1547<- { "return": "kvm support: enabled\r\n" }
1548
1549Notes:
1550
1551(1) The Human Monitor is NOT an stable interface, this means that command
1552 names, arguments and responses can change or be removed at ANY time.
1553 Applications that rely on long term stability guarantees should NOT
1554 use this command
1555
1556(2) Limitations:
1557
1558 o This command is stateless, this means that commands that depend
1559 on state information (such as getfd) might not work
1560
1561 o Commands that prompt the user for data (eg. 'cont' when the block
1562 device is encrypted) don't currently work
1563
Luiz Capitulino82a56f02010-09-13 12:26:00 -030015643. Query Commands
1565=================
1566
1567HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1568HXCOMM this! We will possibly move query commands definitions inside those
1569HXCOMM sections, just like regular commands.
1570
1571EQMP
1572
1573SQMP
1574query-version
1575-------------
1576
1577Show QEMU version.
1578
1579Return a json-object with the following information:
1580
1581- "qemu": A json-object containing three integer values:
1582 - "major": QEMU's major version (json-int)
1583 - "minor": QEMU's minor version (json-int)
1584 - "micro": QEMU's micro version (json-int)
1585- "package": package's version (json-string)
1586
1587Example:
1588
1589-> { "execute": "query-version" }
1590<- {
1591 "return":{
1592 "qemu":{
1593 "major":0,
1594 "minor":11,
1595 "micro":5
1596 },
1597 "package":""
1598 }
1599 }
1600
1601EQMP
1602
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03001603 {
1604 .name = "query-version",
1605 .args_type = "",
1606 .mhandler.cmd_new = qmp_marshal_input_query_version,
1607 },
1608
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001609SQMP
1610query-commands
1611--------------
1612
1613List QMP available commands.
1614
1615Each command is represented by a json-object, the returned value is a json-array
1616of all commands.
1617
1618Each json-object contain:
1619
1620- "name": command's name (json-string)
1621
1622Example:
1623
1624-> { "execute": "query-commands" }
1625<- {
1626 "return":[
1627 {
1628 "name":"query-balloon"
1629 },
1630 {
1631 "name":"system_powerdown"
1632 }
1633 ]
1634 }
1635
1636Note: This example has been shortened as the real response is too long.
1637
1638EQMP
1639
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03001640 {
1641 .name = "query-commands",
1642 .args_type = "",
1643 .mhandler.cmd_new = qmp_marshal_input_query_commands,
1644 },
1645
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001646SQMP
Daniel P. Berrange48608532012-05-21 17:59:51 +01001647query-events
1648--------------
1649
1650List QMP available events.
1651
1652Each event is represented by a json-object, the returned value is a json-array
1653of all events.
1654
1655Each json-object contains:
1656
1657- "name": event's name (json-string)
1658
1659Example:
1660
1661-> { "execute": "query-events" }
1662<- {
1663 "return":[
1664 {
1665 "name":"SHUTDOWN"
1666 },
1667 {
1668 "name":"RESET"
1669 }
1670 ]
1671 }
1672
1673Note: This example has been shortened as the real response is too long.
1674
1675EQMP
1676
1677 {
1678 .name = "query-events",
1679 .args_type = "",
1680 .mhandler.cmd_new = qmp_marshal_input_query_events,
1681 },
1682
1683SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001684query-chardev
1685-------------
1686
1687Each device is represented by a json-object. The returned value is a json-array
1688of all devices.
1689
1690Each json-object contain the following:
1691
1692- "label": device's label (json-string)
1693- "filename": device's file (json-string)
1694
1695Example:
1696
1697-> { "execute": "query-chardev" }
1698<- {
1699 "return":[
1700 {
1701 "label":"monitor",
1702 "filename":"stdio"
1703 },
1704 {
1705 "label":"serial0",
1706 "filename":"vc"
1707 }
1708 ]
1709 }
1710
1711EQMP
1712
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03001713 {
1714 .name = "query-chardev",
1715 .args_type = "",
1716 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1717 },
1718
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001719SQMP
1720query-block
1721-----------
1722
1723Show the block devices.
1724
1725Each block device information is stored in a json-object and the returned value
1726is a json-array of all devices.
1727
1728Each json-object contain the following:
1729
1730- "device": device name (json-string)
1731- "type": device type (json-string)
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001732 - deprecated, retained for backward compatibility
1733 - Possible values: "unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001734- "removable": true if the device is removable, false otherwise (json-bool)
1735- "locked": true if the device is locked, false otherwise (json-bool)
Michal Privoznik99f42802013-01-29 17:58:41 +01001736- "tray_open": only present if removable, true if the device has a tray,
Markus Armbrustere4def802011-09-06 18:58:53 +02001737 and it is open (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001738- "inserted": only present if the device is inserted, it is a json-object
1739 containing the following:
1740 - "file": device file name (json-string)
1741 - "ro": true if read-only, false otherwise (json-bool)
1742 - "drv": driver format name (json-string)
1743 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1744 "file", "file", "ftp", "ftps", "host_cdrom",
1745 "host_device", "host_floppy", "http", "https",
1746 "nbd", "parallels", "qcow", "qcow2", "raw",
1747 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1748 - "backing_file": backing file name (json-string, optional)
Benoît Canet2e3e3312012-08-02 10:22:48 +02001749 - "backing_file_depth": number of files in the backing file chain (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001750 - "encrypted": true if encrypted, false otherwise (json-bool)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001751 - "bps": limit total bytes per second (json-int)
1752 - "bps_rd": limit read bytes per second (json-int)
1753 - "bps_wr": limit write bytes per second (json-int)
1754 - "iops": limit total I/O operations per second (json-int)
1755 - "iops_rd": limit read operations per second (json-int)
1756 - "iops_wr": limit write operations per second (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08001757 - "image": the detail of the image, it is a json-object containing
1758 the following:
1759 - "filename": image file name (json-string)
1760 - "format": image format (json-string)
1761 - "virtual-size": image capacity in bytes (json-int)
1762 - "dirty-flag": true if image is not cleanly closed, not present
1763 means clean (json-bool, optional)
1764 - "actual-size": actual size on disk in bytes of the image, not
1765 present when image does not support thin
1766 provision (json-int, optional)
1767 - "cluster-size": size of a cluster in bytes, not present if image
1768 format does not support it (json-int, optional)
1769 - "encrypted": true if the image is encrypted, not present means
1770 false or the image format does not support
1771 encryption (json-bool, optional)
1772 - "backing_file": backing file name, not present means no backing
1773 file is used or the image format does not
1774 support backing file chain
1775 (json-string, optional)
1776 - "full-backing-filename": full path of the backing file, not
1777 present if it equals backing_file or no
1778 backing file is used
1779 (json-string, optional)
1780 - "backing-filename-format": the format of the backing file, not
1781 present means unknown or no backing
1782 file (json-string, optional)
1783 - "snapshots": the internal snapshot info, it is an optional list
1784 of json-object containing the following:
1785 - "id": unique snapshot id (json-string)
1786 - "name": snapshot name (json-string)
1787 - "vm-state-size": size of the VM state in bytes (json-int)
1788 - "date-sec": UTC date of the snapshot in seconds (json-int)
1789 - "date-nsec": fractional part in nanoseconds to be used with
1790 date-sec(json-int)
1791 - "vm-clock-sec": VM clock relative to boot in seconds
1792 (json-int)
1793 - "vm-clock-nsec": fractional part in nanoseconds to be used
1794 with vm-clock-sec (json-int)
1795 - "backing-image": the detail of the backing image, it is an
1796 optional json-object only present when a
1797 backing image present for this image
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001798
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001799- "io-status": I/O operation status, only present if the device supports it
1800 and the VM is configured to stop on errors. It's always reset
1801 to "ok" when the "cont" command is issued (json_string, optional)
1802 - Possible values: "ok", "failed", "nospace"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001803
1804Example:
1805
1806-> { "execute": "query-block" }
1807<- {
1808 "return":[
1809 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001810 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001811 "device":"ide0-hd0",
1812 "locked":false,
1813 "removable":false,
1814 "inserted":{
1815 "ro":false,
1816 "drv":"qcow2",
1817 "encrypted":false,
Wenchao Xia553a7e82013-06-06 12:27:59 +08001818 "file":"disks/test.qcow2",
1819 "backing_file_depth":1,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001820 "bps":1000000,
1821 "bps_rd":0,
1822 "bps_wr":0,
1823 "iops":1000000,
1824 "iops_rd":0,
1825 "iops_wr":0,
Wenchao Xia553a7e82013-06-06 12:27:59 +08001826 "image":{
1827 "filename":"disks/test.qcow2",
1828 "format":"qcow2",
1829 "virtual-size":2048000,
1830 "backing_file":"base.qcow2",
1831 "full-backing-filename":"disks/base.qcow2",
1832 "backing-filename-format:"qcow2",
1833 "snapshots":[
1834 {
1835 "id": "1",
1836 "name": "snapshot1",
1837 "vm-state-size": 0,
1838 "date-sec": 10000200,
1839 "date-nsec": 12,
1840 "vm-clock-sec": 206,
1841 "vm-clock-nsec": 30
1842 }
1843 ],
1844 "backing-image":{
1845 "filename":"disks/base.qcow2",
1846 "format":"qcow2",
1847 "virtual-size":2048000
1848 }
1849 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001850 },
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001851 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001852 },
1853 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001854 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001855 "device":"ide1-cd0",
1856 "locked":false,
1857 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001858 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001859 },
1860 {
1861 "device":"floppy0",
1862 "locked":false,
1863 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001864 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001865 },
1866 {
1867 "device":"sd0",
1868 "locked":false,
1869 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001870 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001871 }
1872 ]
1873 }
1874
1875EQMP
1876
Luiz Capitulinob2023812011-09-21 17:16:47 -03001877 {
1878 .name = "query-block",
1879 .args_type = "",
1880 .mhandler.cmd_new = qmp_marshal_input_query_block,
1881 },
1882
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001883SQMP
1884query-blockstats
1885----------------
1886
1887Show block device statistics.
1888
1889Each device statistic information is stored in a json-object and the returned
1890value is a json-array of all devices.
1891
1892Each json-object contain the following:
1893
1894- "device": device name (json-string)
1895- "stats": A json-object with the statistics information, it contains:
1896 - "rd_bytes": bytes read (json-int)
1897 - "wr_bytes": bytes written (json-int)
1898 - "rd_operations": read operations (json-int)
1899 - "wr_operations": write operations (json-int)
Christoph Hellwige8045d62011-08-22 00:25:58 +02001900 - "flush_operations": cache flush operations (json-int)
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001901 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1902 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1903 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001904 - "wr_highest_offset": Highest offset of a sector written since the
1905 BlockDriverState has been opened (json-int)
1906- "parent": Contains recursively the statistics of the underlying
1907 protocol (e.g. the host file for a qcow2 image). If there is
1908 no underlying protocol, this field is omitted
1909 (json-object, optional)
1910
1911Example:
1912
1913-> { "execute": "query-blockstats" }
1914<- {
1915 "return":[
1916 {
1917 "device":"ide0-hd0",
1918 "parent":{
1919 "stats":{
1920 "wr_highest_offset":3686448128,
1921 "wr_bytes":9786368,
1922 "wr_operations":751,
1923 "rd_bytes":122567168,
1924 "rd_operations":36772
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001925 "wr_total_times_ns":313253456
1926 "rd_total_times_ns":3465673657
1927 "flush_total_times_ns":49653
Christoph Hellwige8045d62011-08-22 00:25:58 +02001928 "flush_operations":61,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001929 }
1930 },
1931 "stats":{
1932 "wr_highest_offset":2821110784,
1933 "wr_bytes":9786368,
1934 "wr_operations":692,
1935 "rd_bytes":122739200,
1936 "rd_operations":36604
Christoph Hellwige8045d62011-08-22 00:25:58 +02001937 "flush_operations":51,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001938 "wr_total_times_ns":313253456
1939 "rd_total_times_ns":3465673657
1940 "flush_total_times_ns":49653
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001941 }
1942 },
1943 {
1944 "device":"ide1-cd0",
1945 "stats":{
1946 "wr_highest_offset":0,
1947 "wr_bytes":0,
1948 "wr_operations":0,
1949 "rd_bytes":0,
1950 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001951 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001952 "wr_total_times_ns":0
1953 "rd_total_times_ns":0
1954 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001955 }
1956 },
1957 {
1958 "device":"floppy0",
1959 "stats":{
1960 "wr_highest_offset":0,
1961 "wr_bytes":0,
1962 "wr_operations":0,
1963 "rd_bytes":0,
1964 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001965 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001966 "wr_total_times_ns":0
1967 "rd_total_times_ns":0
1968 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001969 }
1970 },
1971 {
1972 "device":"sd0",
1973 "stats":{
1974 "wr_highest_offset":0,
1975 "wr_bytes":0,
1976 "wr_operations":0,
1977 "rd_bytes":0,
1978 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001979 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001980 "wr_total_times_ns":0
1981 "rd_total_times_ns":0
1982 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001983 }
1984 }
1985 ]
1986 }
1987
1988EQMP
1989
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03001990 {
1991 .name = "query-blockstats",
1992 .args_type = "",
1993 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
1994 },
1995
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001996SQMP
1997query-cpus
1998----------
1999
2000Show CPU information.
2001
2002Return a json-array. Each CPU is represented by a json-object, which contains:
2003
2004- "CPU": CPU index (json-int)
2005- "current": true if this is the current CPU, false otherwise (json-bool)
2006- "halted": true if the cpu is halted, false otherwise (json-bool)
2007- Current program counter. The key's name depends on the architecture:
2008 "pc": i386/x86_64 (json-int)
2009 "nip": PPC (json-int)
2010 "pc" and "npc": sparc (json-int)
2011 "PC": mips (json-int)
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002012- "thread_id": ID of the underlying host thread (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002013
2014Example:
2015
2016-> { "execute": "query-cpus" }
2017<- {
2018 "return":[
2019 {
2020 "CPU":0,
2021 "current":true,
2022 "halted":false,
2023 "pc":3227107138
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002024 "thread_id":3134
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002025 },
2026 {
2027 "CPU":1,
2028 "current":false,
2029 "halted":true,
2030 "pc":7108165
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002031 "thread_id":3135
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002032 }
2033 ]
2034 }
2035
2036EQMP
2037
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03002038 {
2039 .name = "query-cpus",
2040 .args_type = "",
2041 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2042 },
2043
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002044SQMP
2045query-pci
2046---------
2047
2048PCI buses and devices information.
2049
2050The returned value is a json-array of all buses. Each bus is represented by
2051a json-object, which has a key with a json-array of all PCI devices attached
2052to it. Each device is represented by a json-object.
2053
2054The bus json-object contains the following:
2055
2056- "bus": bus number (json-int)
2057- "devices": a json-array of json-objects, each json-object represents a
2058 PCI device
2059
2060The PCI device json-object contains the following:
2061
2062- "bus": identical to the parent's bus number (json-int)
2063- "slot": slot number (json-int)
2064- "function": function number (json-int)
2065- "class_info": a json-object containing:
2066 - "desc": device class description (json-string, optional)
2067 - "class": device class number (json-int)
2068- "id": a json-object containing:
2069 - "device": device ID (json-int)
2070 - "vendor": vendor ID (json-int)
2071- "irq": device's IRQ if assigned (json-int, optional)
2072- "qdev_id": qdev id string (json-string)
2073- "pci_bridge": It's a json-object, only present if this device is a
2074 PCI bridge, contains:
2075 - "bus": bus number (json-int)
2076 - "secondary": secondary bus number (json-int)
2077 - "subordinate": subordinate bus number (json-int)
2078 - "io_range": I/O memory range information, a json-object with the
2079 following members:
2080 - "base": base address, in bytes (json-int)
2081 - "limit": limit address, in bytes (json-int)
2082 - "memory_range": memory range information, a json-object with the
2083 following members:
2084 - "base": base address, in bytes (json-int)
2085 - "limit": limit address, in bytes (json-int)
2086 - "prefetchable_range": Prefetchable memory range information, a
2087 json-object with the following members:
2088 - "base": base address, in bytes (json-int)
2089 - "limit": limit address, in bytes (json-int)
2090 - "devices": a json-array of PCI devices if there's any attached, each
2091 each element is represented by a json-object, which contains
2092 the same members of the 'PCI device json-object' described
2093 above (optional)
2094- "regions": a json-array of json-objects, each json-object represents a
2095 memory region of this device
2096
2097The memory range json-object contains the following:
2098
2099- "base": base memory address (json-int)
2100- "limit": limit value (json-int)
2101
2102The region json-object can be an I/O region or a memory region, an I/O region
2103json-object contains the following:
2104
2105- "type": "io" (json-string, fixed)
2106- "bar": BAR number (json-int)
2107- "address": memory address (json-int)
2108- "size": memory size (json-int)
2109
2110A memory region json-object contains the following:
2111
2112- "type": "memory" (json-string, fixed)
2113- "bar": BAR number (json-int)
2114- "address": memory address (json-int)
2115- "size": memory size (json-int)
2116- "mem_type_64": true or false (json-bool)
2117- "prefetch": true or false (json-bool)
2118
2119Example:
2120
2121-> { "execute": "query-pci" }
2122<- {
2123 "return":[
2124 {
2125 "bus":0,
2126 "devices":[
2127 {
2128 "bus":0,
2129 "qdev_id":"",
2130 "slot":0,
2131 "class_info":{
2132 "class":1536,
2133 "desc":"Host bridge"
2134 },
2135 "id":{
2136 "device":32902,
2137 "vendor":4663
2138 },
2139 "function":0,
2140 "regions":[
2141
2142 ]
2143 },
2144 {
2145 "bus":0,
2146 "qdev_id":"",
2147 "slot":1,
2148 "class_info":{
2149 "class":1537,
2150 "desc":"ISA bridge"
2151 },
2152 "id":{
2153 "device":32902,
2154 "vendor":28672
2155 },
2156 "function":0,
2157 "regions":[
2158
2159 ]
2160 },
2161 {
2162 "bus":0,
2163 "qdev_id":"",
2164 "slot":1,
2165 "class_info":{
2166 "class":257,
2167 "desc":"IDE controller"
2168 },
2169 "id":{
2170 "device":32902,
2171 "vendor":28688
2172 },
2173 "function":1,
2174 "regions":[
2175 {
2176 "bar":4,
2177 "size":16,
2178 "address":49152,
2179 "type":"io"
2180 }
2181 ]
2182 },
2183 {
2184 "bus":0,
2185 "qdev_id":"",
2186 "slot":2,
2187 "class_info":{
2188 "class":768,
2189 "desc":"VGA controller"
2190 },
2191 "id":{
2192 "device":4115,
2193 "vendor":184
2194 },
2195 "function":0,
2196 "regions":[
2197 {
2198 "prefetch":true,
2199 "mem_type_64":false,
2200 "bar":0,
2201 "size":33554432,
2202 "address":4026531840,
2203 "type":"memory"
2204 },
2205 {
2206 "prefetch":false,
2207 "mem_type_64":false,
2208 "bar":1,
2209 "size":4096,
2210 "address":4060086272,
2211 "type":"memory"
2212 },
2213 {
2214 "prefetch":false,
2215 "mem_type_64":false,
2216 "bar":6,
2217 "size":65536,
2218 "address":-1,
2219 "type":"memory"
2220 }
2221 ]
2222 },
2223 {
2224 "bus":0,
2225 "qdev_id":"",
2226 "irq":11,
2227 "slot":4,
2228 "class_info":{
2229 "class":1280,
2230 "desc":"RAM controller"
2231 },
2232 "id":{
2233 "device":6900,
2234 "vendor":4098
2235 },
2236 "function":0,
2237 "regions":[
2238 {
2239 "bar":0,
2240 "size":32,
2241 "address":49280,
2242 "type":"io"
2243 }
2244 ]
2245 }
2246 ]
2247 }
2248 ]
2249 }
2250
2251Note: This example has been shortened as the real response is too long.
2252
2253EQMP
2254
Luiz Capitulino79627472011-10-21 14:15:33 -02002255 {
2256 .name = "query-pci",
2257 .args_type = "",
2258 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2259 },
2260
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002261SQMP
2262query-kvm
2263---------
2264
2265Show KVM information.
2266
2267Return a json-object with the following information:
2268
2269- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2270- "present": true if QEMU has KVM support, false otherwise (json-bool)
2271
2272Example:
2273
2274-> { "execute": "query-kvm" }
2275<- { "return": { "enabled": true, "present": true } }
2276
2277EQMP
2278
Luiz Capitulino292a2602011-09-12 15:10:53 -03002279 {
2280 .name = "query-kvm",
2281 .args_type = "",
2282 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2283 },
2284
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002285SQMP
2286query-status
2287------------
2288
2289Return a json-object with the following information:
2290
2291- "running": true if the VM is running, or false if it is paused (json-bool)
2292- "singlestep": true if the VM is in single step mode,
2293 false otherwise (json-bool)
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002294- "status": one of the following values (json-string)
2295 "debug" - QEMU is running on a debugger
2296 "inmigrate" - guest is paused waiting for an incoming migration
2297 "internal-error" - An internal error that prevents further guest
2298 execution has occurred
2299 "io-error" - the last IOP has failed and the device is configured
2300 to pause on I/O errors
2301 "paused" - guest has been paused via the 'stop' command
2302 "postmigrate" - guest is paused following a successful 'migrate'
2303 "prelaunch" - QEMU was started with -S and guest has not started
2304 "finish-migrate" - guest is paused to finish the migration process
2305 "restore-vm" - guest is paused to restore VM state
2306 "running" - guest is actively running
2307 "save-vm" - guest is paused to save the VM state
2308 "shutdown" - guest is shut down (and -no-shutdown is in use)
2309 "watchdog" - the watchdog action is configured to pause and
2310 has been triggered
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002311
2312Example:
2313
2314-> { "execute": "query-status" }
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002315<- { "return": { "running": true, "singlestep": false, "status": "running" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002316
2317EQMP
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002318
2319 {
2320 .name = "query-status",
2321 .args_type = "",
2322 .mhandler.cmd_new = qmp_marshal_input_query_status,
2323 },
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002324
2325SQMP
2326query-mice
2327----------
2328
2329Show VM mice information.
2330
2331Each mouse is represented by a json-object, the returned value is a json-array
2332of all mice.
2333
2334The mouse json-object contains the following:
2335
2336- "name": mouse's name (json-string)
2337- "index": mouse's index (json-int)
2338- "current": true if this mouse is receiving events, false otherwise (json-bool)
2339- "absolute": true if the mouse generates absolute input events (json-bool)
2340
2341Example:
2342
2343-> { "execute": "query-mice" }
2344<- {
2345 "return":[
2346 {
2347 "name":"QEMU Microsoft Mouse",
2348 "index":0,
2349 "current":false,
2350 "absolute":false
2351 },
2352 {
2353 "name":"QEMU PS/2 Mouse",
2354 "index":1,
2355 "current":true,
2356 "absolute":true
2357 }
2358 ]
2359 }
2360
2361EQMP
2362
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03002363 {
2364 .name = "query-mice",
2365 .args_type = "",
2366 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2367 },
2368
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002369SQMP
2370query-vnc
2371---------
2372
2373Show VNC server information.
2374
2375Return a json-object with server information. Connected clients are returned
2376as a json-array of json-objects.
2377
2378The main json-object contains the following:
2379
2380- "enabled": true or false (json-bool)
2381- "host": server's IP address (json-string)
2382- "family": address family (json-string)
2383 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2384- "service": server's port number (json-string)
2385- "auth": authentication method (json-string)
2386 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2387 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2388 "vencrypt+plain", "vencrypt+tls+none",
2389 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2390 "vencrypt+tls+vnc", "vencrypt+x509+none",
2391 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2392 "vencrypt+x509+vnc", "vnc"
2393- "clients": a json-array of all connected clients
2394
2395Clients are described by a json-object, each one contain the following:
2396
2397- "host": client's IP address (json-string)
2398- "family": address family (json-string)
2399 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2400- "service": client's port number (json-string)
2401- "x509_dname": TLS dname (json-string, optional)
2402- "sasl_username": SASL username (json-string, optional)
2403
2404Example:
2405
2406-> { "execute": "query-vnc" }
2407<- {
2408 "return":{
2409 "enabled":true,
2410 "host":"0.0.0.0",
2411 "service":"50402",
2412 "auth":"vnc",
2413 "family":"ipv4",
2414 "clients":[
2415 {
2416 "host":"127.0.0.1",
2417 "service":"50401",
2418 "family":"ipv4"
2419 }
2420 ]
2421 }
2422 }
2423
2424EQMP
2425
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002426 {
2427 .name = "query-vnc",
2428 .args_type = "",
2429 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2430 },
2431
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002432SQMP
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002433query-spice
2434-----------
2435
2436Show SPICE server information.
2437
2438Return a json-object with server information. Connected clients are returned
2439as a json-array of json-objects.
2440
2441The main json-object contains the following:
2442
2443- "enabled": true or false (json-bool)
2444- "host": server's IP address (json-string)
2445- "port": server's port number (json-int, optional)
2446- "tls-port": server's port number (json-int, optional)
2447- "auth": authentication method (json-string)
2448 - Possible values: "none", "spice"
2449- "channels": a json-array of all active channels clients
2450
2451Channels are described by a json-object, each one contain the following:
2452
2453- "host": client's IP address (json-string)
2454- "family": address family (json-string)
2455 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2456- "port": client's port number (json-string)
2457- "connection-id": spice connection id. All channels with the same id
2458 belong to the same spice session (json-int)
2459- "channel-type": channel type. "1" is the main control channel, filter for
2460 this one if you want track spice sessions only (json-int)
2461- "channel-id": channel id. Usually "0", might be different needed when
2462 multiple channels of the same type exist, such as multiple
2463 display channels in a multihead setup (json-int)
2464- "tls": whevener the channel is encrypted (json-bool)
2465
2466Example:
2467
2468-> { "execute": "query-spice" }
2469<- {
2470 "return": {
2471 "enabled": true,
2472 "auth": "spice",
2473 "port": 5920,
2474 "tls-port": 5921,
2475 "host": "0.0.0.0",
2476 "channels": [
2477 {
2478 "port": "54924",
2479 "family": "ipv4",
2480 "channel-type": 1,
2481 "connection-id": 1804289383,
2482 "host": "127.0.0.1",
2483 "channel-id": 0,
2484 "tls": true
2485 },
2486 {
2487 "port": "36710",
2488 "family": "ipv4",
2489 "channel-type": 4,
2490 "connection-id": 1804289383,
2491 "host": "127.0.0.1",
2492 "channel-id": 0,
2493 "tls": false
2494 },
2495 [ ... more channels follow ... ]
2496 ]
2497 }
2498 }
2499
2500EQMP
2501
Luiz Capitulinod1f29642011-10-20 17:01:33 -02002502#if defined(CONFIG_SPICE)
2503 {
2504 .name = "query-spice",
2505 .args_type = "",
2506 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2507 },
2508#endif
2509
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002510SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002511query-name
2512----------
2513
2514Show VM name.
2515
2516Return a json-object with the following information:
2517
2518- "name": VM's name (json-string, optional)
2519
2520Example:
2521
2522-> { "execute": "query-name" }
2523<- { "return": { "name": "qemu-name" } }
2524
2525EQMP
2526
Anthony Liguori48a32be2011-09-02 12:34:48 -05002527 {
2528 .name = "query-name",
2529 .args_type = "",
2530 .mhandler.cmd_new = qmp_marshal_input_query_name,
2531 },
2532
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002533SQMP
2534query-uuid
2535----------
2536
2537Show VM UUID.
2538
2539Return a json-object with the following information:
2540
2541- "UUID": Universally Unique Identifier (json-string)
2542
2543Example:
2544
2545-> { "execute": "query-uuid" }
2546<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2547
2548EQMP
2549
Luiz Capitulinoefab7672011-09-13 17:16:25 -03002550 {
2551 .name = "query-uuid",
2552 .args_type = "",
2553 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2554 },
2555
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002556SQMP
Amos Kong1f8f9872013-04-25 17:50:35 +08002557query-command-line-options
2558--------------------------
2559
2560Show command line option schema.
2561
2562Return a json-array of command line option schema for all options (or for
2563the given option), returning an error if the given option doesn't exist.
2564
2565Each array entry contains the following:
2566
2567- "option": option name (json-string)
2568- "parameters": a json-array describes all parameters of the option:
2569 - "name": parameter name (json-string)
2570 - "type": parameter type (one of 'string', 'boolean', 'number',
2571 or 'size')
2572 - "help": human readable description of the parameter
2573 (json-string, optional)
2574
2575Example:
2576
2577-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2578<- { "return": [
2579 {
2580 "parameters": [
2581 {
2582 "name": "romfile",
2583 "type": "string"
2584 },
2585 {
2586 "name": "bootindex",
2587 "type": "number"
2588 }
2589 ],
2590 "option": "option-rom"
2591 }
2592 ]
2593 }
2594
2595EQMP
2596
2597 {
2598 .name = "query-command-line-options",
2599 .args_type = "option:s?",
2600 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
2601 },
2602
2603SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002604query-migrate
2605-------------
2606
2607Migration status.
2608
2609Return a json-object. If migration is active there will be another json-object
2610with RAM migration status and if block migration is active another one with
2611block migration status.
2612
2613The main json-object contains the following:
2614
2615- "status": migration status (json-string)
2616 - Possible values: "active", "completed", "failed", "cancelled"
Juan Quintela7aa939a2012-08-18 13:17:10 +02002617- "total-time": total amount of ms since migration started. If
2618 migration has ended, it returns the total migration
Juan Quintela817c6042013-02-11 15:11:10 +01002619 time (json-int)
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02002620- "downtime": only present when migration has finished correctly
2621 total amount in ms for downtime that happened (json-int)
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002622- "expected-downtime": only present while migration is active
2623 total amount in ms for downtime that was calculated on
Juan Quintela817c6042013-02-11 15:11:10 +01002624 the last bitmap round (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002625- "ram": only present if "status" is "active", it is a json-object with the
Juan Quintela817c6042013-02-11 15:11:10 +01002626 following RAM information:
2627 - "transferred": amount transferred in bytes (json-int)
2628 - "remaining": amount remaining to transfer in bytes (json-int)
2629 - "total": total amount of memory in bytes (json-int)
2630 - "duplicate": number of pages filled entirely with the same
2631 byte (json-int)
2632 These are sent over the wire much more efficiently.
Peter Lievenf1c72792013-03-26 10:58:37 +01002633 - "skipped": number of skipped zero pages (json-int)
Stefan Weil805a2502013-04-28 11:49:57 +02002634 - "normal" : number of whole pages transferred. I.e. they
Juan Quintela817c6042013-02-11 15:11:10 +01002635 were not sent as duplicate or xbzrle pages (json-int)
2636 - "normal-bytes" : number of bytes transferred in whole
2637 pages. This is just normal pages times size of one page,
2638 but this way upper levels don't need to care about page
2639 size (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002640- "disk": only present if "status" is "active" and it is a block migration,
Juan Quintela817c6042013-02-11 15:11:10 +01002641 it is a json-object with the following disk information:
2642 - "transferred": amount transferred in bytes (json-int)
2643 - "remaining": amount remaining to transfer in bytes json-int)
2644 - "total": total disk size in bytes (json-int)
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002645- "xbzrle-cache": only present if XBZRLE is active.
2646 It is a json-object with the following XBZRLE information:
Juan Quintela817c6042013-02-11 15:11:10 +01002647 - "cache-size": XBZRLE cache size in bytes
2648 - "bytes": number of bytes transferred for XBZRLE compressed pages
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002649 - "pages": number of XBZRLE compressed pages
Juan Quintela817c6042013-02-11 15:11:10 +01002650 - "cache-miss": number of XBRZRLE page cache misses
2651 - "overflow": number of times XBZRLE overflows. This means
2652 that the XBZRLE encoding was bigger than just sent the
2653 whole page, and then we sent the whole page instead (as as
2654 normal page).
2655
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002656Examples:
2657
26581. Before the first migration
2659
2660-> { "execute": "query-migrate" }
2661<- { "return": {} }
2662
26632. Migration is done and has succeeded
2664
2665-> { "execute": "query-migrate" }
Orit Wasserman004d4c12012-08-06 21:42:56 +03002666<- { "return": {
2667 "status": "completed",
2668 "ram":{
2669 "transferred":123,
2670 "remaining":123,
2671 "total":246,
2672 "total-time":12345,
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02002673 "downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002674 "duplicate":123,
2675 "normal":123,
2676 "normal-bytes":123456
2677 }
2678 }
2679 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002680
26813. Migration is done and has failed
2682
2683-> { "execute": "query-migrate" }
2684<- { "return": { "status": "failed" } }
2685
26864. Migration is being performed and is not a block migration:
2687
2688-> { "execute": "query-migrate" }
2689<- {
2690 "return":{
2691 "status":"active",
2692 "ram":{
2693 "transferred":123,
2694 "remaining":123,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03002695 "total":246,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002696 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002697 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002698 "duplicate":123,
2699 "normal":123,
2700 "normal-bytes":123456
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002701 }
2702 }
2703 }
2704
27055. Migration is being performed and is a block migration:
2706
2707-> { "execute": "query-migrate" }
2708<- {
2709 "return":{
2710 "status":"active",
2711 "ram":{
2712 "total":1057024,
2713 "remaining":1053304,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03002714 "transferred":3720,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002715 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002716 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002717 "duplicate":123,
2718 "normal":123,
2719 "normal-bytes":123456
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002720 },
2721 "disk":{
2722 "total":20971520,
2723 "remaining":20880384,
2724 "transferred":91136
2725 }
2726 }
2727 }
2728
Orit Wassermanf36d55a2012-08-06 21:42:57 +030027296. Migration is being performed and XBZRLE is active:
2730
2731-> { "execute": "query-migrate" }
2732<- {
2733 "return":{
2734 "status":"active",
2735 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2736 "ram":{
2737 "total":1057024,
2738 "remaining":1053304,
2739 "transferred":3720,
2740 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002741 "expected-downtime":12345,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002742 "duplicate":10,
2743 "normal":3333,
2744 "normal-bytes":3412992
2745 },
2746 "xbzrle-cache":{
2747 "cache-size":67108864,
2748 "bytes":20971520,
2749 "pages":2444343,
2750 "cache-miss":2244,
2751 "overflow":34434
2752 }
2753 }
2754 }
2755
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002756EQMP
2757
Luiz Capitulino791e7c82011-09-13 17:37:16 -03002758 {
2759 .name = "query-migrate",
2760 .args_type = "",
2761 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2762 },
2763
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002764SQMP
Orit Wasserman00458432012-08-06 21:42:48 +03002765migrate-set-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01002766------------------------
Orit Wasserman00458432012-08-06 21:42:48 +03002767
2768Enable/Disable migration capabilities
2769
Juan Quintela817c6042013-02-11 15:11:10 +01002770- "xbzrle": XBZRLE support
Orit Wasserman00458432012-08-06 21:42:48 +03002771
2772Arguments:
2773
2774Example:
2775
2776-> { "execute": "migrate-set-capabilities" , "arguments":
2777 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2778
2779EQMP
2780
2781 {
2782 .name = "migrate-set-capabilities",
2783 .args_type = "capabilities:O",
2784 .params = "capability:s,state:b",
2785 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2786 },
2787SQMP
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002788query-migrate-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01002789--------------------------
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002790
2791Query current migration capabilities
2792
2793- "capabilities": migration capabilities state
2794 - "xbzrle" : XBZRLE state (json-bool)
2795
2796Arguments:
2797
2798Example:
2799
2800-> { "execute": "query-migrate-capabilities" }
Orit Wassermandbca1b32013-01-31 09:12:17 +02002801<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2802
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002803EQMP
2804
2805 {
2806 .name = "query-migrate-capabilities",
2807 .args_type = "",
2808 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2809 },
2810
2811SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002812query-balloon
2813-------------
2814
2815Show balloon information.
2816
2817Make an asynchronous request for balloon info. When the request completes a
2818json-object will be returned containing the following data:
2819
2820- "actual": current balloon value in bytes (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002821
2822Example:
2823
2824-> { "execute": "query-balloon" }
2825<- {
2826 "return":{
2827 "actual":1073741824,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002828 }
2829 }
2830
2831EQMP
2832
Luiz Capitulino96637bc2011-10-21 11:41:37 -02002833 {
2834 .name = "query-balloon",
2835 .args_type = "",
2836 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2837 },
Anthony Liguorib4b12c62011-12-12 14:29:34 -06002838
2839 {
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00002840 .name = "query-block-jobs",
2841 .args_type = "",
2842 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2843 },
2844
2845 {
Anthony Liguorib4b12c62011-12-12 14:29:34 -06002846 .name = "qom-list",
2847 .args_type = "path:s",
2848 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2849 },
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06002850
2851 {
2852 .name = "qom-set",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01002853 .args_type = "path:s,property:s,value:q",
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06002854 .mhandler.cmd_new = qmp_qom_set,
2855 },
2856
2857 {
2858 .name = "qom-get",
2859 .args_type = "path:s,property:s",
2860 .mhandler.cmd_new = qmp_qom_get,
2861 },
Luiz Capitulino270b2432011-12-08 11:45:55 -02002862
2863 {
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02002864 .name = "nbd-server-start",
2865 .args_type = "addr:q",
2866 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2867 },
2868 {
2869 .name = "nbd-server-add",
2870 .args_type = "device:B,writable:b?",
2871 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2872 },
2873 {
2874 .name = "nbd-server-stop",
2875 .args_type = "",
2876 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2877 },
2878
2879 {
Luiz Capitulino270b2432011-12-08 11:45:55 -02002880 .name = "change-vnc-password",
2881 .args_type = "password:s",
2882 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2883 },
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06002884 {
2885 .name = "qom-list-types",
2886 .args_type = "implements:s?,abstract:b?",
2887 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2888 },
Anthony Liguori1daa31b2012-08-10 11:04:09 -05002889
2890 {
2891 .name = "device-list-properties",
2892 .args_type = "typename:s",
2893 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2894 },
2895
Anthony Liguori01d3c802012-08-10 11:04:11 -05002896 {
2897 .name = "query-machines",
2898 .args_type = "",
2899 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2900 },
2901
Anthony Liguorie4e31c62012-08-10 11:04:13 -05002902 {
2903 .name = "query-cpu-definitions",
2904 .args_type = "",
2905 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2906 },
2907
Daniel P. Berrange99afc912012-08-20 15:31:38 +01002908 {
2909 .name = "query-target",
2910 .args_type = "",
2911 .mhandler.cmd_new = qmp_marshal_input_query_target,
2912 },
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002913
2914 {
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002915 .name = "query-tpm",
2916 .args_type = "",
2917 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2918 },
2919
Corey Bryant28c4fa32013-03-20 12:34:49 -04002920SQMP
2921query-tpm
2922---------
2923
2924Return information about the TPM device.
2925
2926Arguments: None
2927
2928Example:
2929
2930-> { "execute": "query-tpm" }
2931<- { "return":
2932 [
2933 { "model": "tpm-tis",
2934 "options":
2935 { "type": "passthrough",
2936 "data":
2937 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2938 "path": "/dev/tpm0"
2939 }
2940 },
2941 "id": "tpm0"
2942 }
2943 ]
2944 }
2945
2946EQMP
2947
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002948 {
2949 .name = "query-tpm-models",
2950 .args_type = "",
2951 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2952 },
2953
Corey Bryant28c4fa32013-03-20 12:34:49 -04002954SQMP
2955query-tpm-models
2956----------------
2957
2958Return a list of supported TPM models.
2959
2960Arguments: None
2961
2962Example:
2963
2964-> { "execute": "query-tpm-models" }
2965<- { "return": [ "tpm-tis" ] }
2966
2967EQMP
2968
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002969 {
2970 .name = "query-tpm-types",
2971 .args_type = "",
2972 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2973 },
2974
Corey Bryant28c4fa32013-03-20 12:34:49 -04002975SQMP
2976query-tpm-types
2977---------------
2978
2979Return a list of supported TPM types.
2980
2981Arguments: None
2982
2983Example:
2984
2985-> { "execute": "query-tpm-types" }
2986<- { "return": [ "passthrough" ] }
2987
2988EQMP
2989
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002990 {
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002991 .name = "chardev-add",
2992 .args_type = "id:s,backend:q",
2993 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
2994 },
2995
2996SQMP
2997chardev-add
2998----------------
2999
3000Add a chardev.
3001
3002Arguments:
3003
3004- "id": the chardev's ID, must be unique (json-string)
3005- "backend": chardev backend type + parameters
3006
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003007Examples:
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003008
3009-> { "execute" : "chardev-add",
3010 "arguments" : { "id" : "foo",
3011 "backend" : { "type" : "null", "data" : {} } } }
3012<- { "return": {} }
3013
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003014-> { "execute" : "chardev-add",
3015 "arguments" : { "id" : "bar",
3016 "backend" : { "type" : "file",
3017 "data" : { "out" : "/tmp/bar.log" } } } }
3018<- { "return": {} }
3019
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003020-> { "execute" : "chardev-add",
3021 "arguments" : { "id" : "baz",
3022 "backend" : { "type" : "pty", "data" : {} } } }
3023<- { "return": { "pty" : "/dev/pty/42" } }
3024
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003025EQMP
3026
3027 {
3028 .name = "chardev-remove",
3029 .args_type = "id:s",
3030 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3031 },
3032
3033
3034SQMP
3035chardev-remove
3036--------------
3037
3038Remove a chardev.
3039
3040Arguments:
3041
3042- "id": the chardev's ID, must exist and not be in use (json-string)
3043
3044Example:
3045
3046-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3047<- { "return": {} }
3048
3049EQMP