blob: 8cea5e554cbaa8274f602c08b6f148a4963c8e50 [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 Hajnoczidb58f9c2012-04-11 16:27:10 +0100915 .name = "block-job-set-speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +0100916 .args_type = "device:B,speed:o",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +0000917 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
918 },
919
920 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +0100921 .name = "block-job-cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200922 .args_type = "device:B,force:b?",
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000923 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
924 },
Jeff Codyc1864022012-02-28 15:54:07 -0500925 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +0200926 .name = "block-job-pause",
927 .args_type = "device:B",
928 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
929 },
930 {
931 .name = "block-job-resume",
932 .args_type = "device:B",
933 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
934 },
935 {
Paolo Bonziniaeae8832012-10-18 16:49:21 +0200936 .name = "block-job-complete",
937 .args_type = "device:B",
938 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
939 },
940 {
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100941 .name = "transaction",
Paolo Bonzinib9f89782012-03-22 12:51:11 +0100942 .args_type = "actions:q",
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100943 .mhandler.cmd_new = qmp_marshal_input_transaction,
Jeff Codyc1864022012-02-28 15:54:07 -0500944 },
945
946SQMP
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100947transaction
948-----------
Jeff Codyc1864022012-02-28 15:54:07 -0500949
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100950Atomically operate on one or more block devices. The only supported
951operation for now is snapshotting. If there is any failure performing
952any of the operations, all snapshots for the group are abandoned, and
953the original disks pre-snapshot attempt are used.
Jeff Codyc1864022012-02-28 15:54:07 -0500954
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100955A list of dictionaries is accepted, that contains the actions to be performed.
956For snapshots this is the device, the file to use for the new snapshot,
957and the format. The default format, if not specified, is qcow2.
Jeff Codyc1864022012-02-28 15:54:07 -0500958
Paolo Bonzinibc8b0942012-03-06 18:55:58 +0100959Each new snapshot defaults to being created by QEMU (wiping any
960contents if the file already exists), but it is also possible to reuse
961an externally-created file. In the latter case, you should ensure that
962the new image file has the same contents as the current one; QEMU cannot
963perform any meaningful check. Typically this is achieved by using the
964current image file as the backing file for the new image.
965
Jeff Codyc1864022012-02-28 15:54:07 -0500966Arguments:
967
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100968actions array:
969 - "type": the operation to perform. The only supported
970 value is "blockdev-snapshot-sync". (json-string)
971 - "data": a dictionary. The contents depend on the value
972 of "type". When "type" is "blockdev-snapshot-sync":
973 - "device": device name to snapshot (json-string)
974 - "snapshot-file": name of new image file (json-string)
975 - "format": format of new image (json-string, optional)
Paolo Bonzinibc8b0942012-03-06 18:55:58 +0100976 - "mode": whether and how QEMU should create the snapshot file
977 (NewImageMode, optional, default "absolute-paths")
Jeff Codyc1864022012-02-28 15:54:07 -0500978
979Example:
980
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100981-> { "execute": "transaction",
982 "arguments": { "actions": [
983 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
984 "snapshot-file": "/some/place/my-image",
985 "format": "qcow2" } },
986 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
987 "snapshot-file": "/some/place/my-image2",
Paolo Bonzinibc8b0942012-03-06 18:55:58 +0100988 "mode": "existing",
Paolo Bonzini52e7c242012-03-06 18:55:57 +0100989 "format": "qcow2" } } ] } }
Jeff Codyc1864022012-02-28 15:54:07 -0500990<- { "return": {} }
991
992EQMP
Stefan Hajnoczi370521a2012-01-18 14:40:48 +0000993
994 {
Jes Sorensend967b2f2011-07-11 20:01:09 +0200995 .name = "blockdev-snapshot-sync",
Paolo Bonzini31155b92012-04-12 14:00:58 +0200996 .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
Luiz Capitulino6106e242011-11-25 16:15:19 -0200997 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
Jes Sorensend967b2f2011-07-11 20:01:09 +0200998 },
999
1000SQMP
1001blockdev-snapshot-sync
1002----------------------
1003
1004Synchronous snapshot of a block device. snapshot-file specifies the
1005target of the new image. If the file exists, or if it is a device, the
1006snapshot will be created in the existing file/device. If does not
1007exist, a new file will be created. format specifies the format of the
1008snapshot image, default is qcow2.
1009
1010Arguments:
1011
1012- "device": device name to snapshot (json-string)
1013- "snapshot-file": name of new image file (json-string)
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001014- "mode": whether and how QEMU should create the snapshot file
1015 (NewImageMode, optional, default "absolute-paths")
Jes Sorensend967b2f2011-07-11 20:01:09 +02001016- "format": format of new image (json-string, optional)
1017
1018Example:
1019
Luiz Capitulino7f3850c2011-10-10 17:30:08 -03001020-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1021 "snapshot-file":
1022 "/some/place/my-image",
1023 "format": "qcow2" } }
Jes Sorensend967b2f2011-07-11 20:01:09 +02001024<- { "return": {} }
1025
1026EQMP
1027
1028 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001029 .name = "drive-mirror",
Paolo Bonzinib952b552012-10-18 16:49:28 +02001030 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001031 "on-source-error:s?,on-target-error:s?,"
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001032 "granularity:i?,buf-size:i?",
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001033 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1034 },
1035
1036SQMP
1037drive-mirror
1038------------
1039
1040Start mirroring a block device's writes to a new destination. target
1041specifies the target of the new image. If the file exists, or if it is
1042a device, it will be used as the new destination for writes. If it does not
1043exist, a new file will be created. format specifies the format of the
1044mirror image, default is to probe if mode='existing', else the format
1045of the source.
1046
1047Arguments:
1048
1049- "device": device name to operate on (json-string)
1050- "target": name of new image file (json-string)
1051- "format": format of new image (json-string, optional)
1052- "mode": how an image file should be created into the target
1053 file/device (NewImageMode, optional, default 'absolute-paths')
1054- "speed": maximum speed of the streaming job, in bytes per second
1055 (json-int)
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001056- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001057- "buf_size": maximum amount of data in flight from source to target, in bytes
1058 (json-int, default 10M)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001059- "sync": what parts of the disk image should be copied to the destination;
1060 possibilities include "full" for all the disk, "top" for only the sectors
1061 allocated in the topmost image, or "none" to only replicate new I/O
1062 (MirrorSyncMode).
Paolo Bonzinib952b552012-10-18 16:49:28 +02001063- "on-source-error": the action to take on an error on the source
1064 (BlockdevOnError, default 'report')
1065- "on-target-error": the action to take on an error on the target
1066 (BlockdevOnError, default 'report')
1067
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001068The default value of the granularity is the image cluster size clamped
1069between 4096 and 65536, if the image format defines one. If the format
1070does not define a cluster size, the default value of the granularity
1071is 65536.
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001072
1073
1074Example:
1075
1076-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1077 "target": "/some/place/my-image",
1078 "sync": "full",
1079 "format": "qcow2" } }
1080<- { "return": {} }
1081
1082EQMP
1083
1084 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001085 .name = "balloon",
1086 .args_type = "value:M",
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001087 .mhandler.cmd_new = qmp_marshal_input_balloon,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001088 },
1089
1090SQMP
1091balloon
1092-------
1093
1094Request VM to change its memory allocation (in bytes).
1095
1096Arguments:
1097
1098- "value": New memory allocation (json-int)
1099
1100Example:
1101
1102-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1103<- { "return": {} }
1104
1105EQMP
1106
1107 {
1108 .name = "set_link",
1109 .args_type = "name:s,up:b",
Luiz Capitulino4b371562011-11-23 13:11:55 -02001110 .mhandler.cmd_new = qmp_marshal_input_set_link,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001111 },
1112
1113SQMP
1114set_link
1115--------
1116
1117Change the link status of a network adapter.
1118
1119Arguments:
1120
1121- "name": network device name (json-string)
1122- "up": status is up (json-bool)
1123
1124Example:
1125
1126-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1127<- { "return": {} }
1128
1129EQMP
1130
1131 {
1132 .name = "getfd",
1133 .args_type = "fdname:s",
1134 .params = "getfd name",
1135 .help = "receive a file descriptor via SCM rights and assign it a name",
Corey Bryant208c9d12012-06-22 14:36:09 -04001136 .mhandler.cmd_new = qmp_marshal_input_getfd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001137 },
1138
1139SQMP
1140getfd
1141-----
1142
1143Receive a file descriptor via SCM rights and assign it a name.
1144
1145Arguments:
1146
1147- "fdname": file descriptor name (json-string)
1148
1149Example:
1150
1151-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1152<- { "return": {} }
1153
Corey Bryant208c9d12012-06-22 14:36:09 -04001154Notes:
1155
1156(1) If the name specified by the "fdname" argument already exists,
1157 the file descriptor assigned to it will be closed and replaced
1158 by the received file descriptor.
1159(2) The 'closefd' command can be used to explicitly close the file
1160 descriptor when it is no longer needed.
1161
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001162EQMP
1163
1164 {
1165 .name = "closefd",
1166 .args_type = "fdname:s",
1167 .params = "closefd name",
1168 .help = "close a file descriptor previously passed via SCM rights",
Corey Bryant208c9d12012-06-22 14:36:09 -04001169 .mhandler.cmd_new = qmp_marshal_input_closefd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001170 },
1171
1172SQMP
1173closefd
1174-------
1175
1176Close a file descriptor previously passed via SCM rights.
1177
1178Arguments:
1179
1180- "fdname": file descriptor name (json-string)
1181
1182Example:
1183
1184-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1185<- { "return": {} }
1186
1187EQMP
1188
Corey Bryantba1c0482012-08-14 16:43:43 -04001189 {
1190 .name = "add-fd",
1191 .args_type = "fdset-id:i?,opaque:s?",
1192 .params = "add-fd fdset-id opaque",
1193 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1194 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1195 },
1196
1197SQMP
1198add-fd
1199-------
1200
1201Add a file descriptor, that was passed via SCM rights, to an fd set.
1202
1203Arguments:
1204
1205- "fdset-id": The ID of the fd set to add the file descriptor to.
1206 (json-int, optional)
1207- "opaque": A free-form string that can be used to describe the fd.
1208 (json-string, optional)
1209
1210Return a json-object with the following information:
1211
1212- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1213- "fd": The file descriptor that was received via SCM rights and added to the
1214 fd set. (json-int)
1215
1216Example:
1217
1218-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1219<- { "return": { "fdset-id": 1, "fd": 3 } }
1220
1221Notes:
1222
1223(1) The list of fd sets is shared by all monitor connections.
1224(2) If "fdset-id" is not specified, a new fd set will be created.
1225
1226EQMP
1227
1228 {
1229 .name = "remove-fd",
1230 .args_type = "fdset-id:i,fd:i?",
1231 .params = "remove-fd fdset-id fd",
1232 .help = "Remove a file descriptor from an fd set",
1233 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1234 },
1235
1236SQMP
1237remove-fd
1238---------
1239
1240Remove a file descriptor from an fd set.
1241
1242Arguments:
1243
1244- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1245 (json-int)
1246- "fd": The file descriptor that is to be removed. (json-int, optional)
1247
1248Example:
1249
1250-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1251<- { "return": {} }
1252
1253Notes:
1254
1255(1) The list of fd sets is shared by all monitor connections.
1256(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1257 removed.
1258
1259EQMP
1260
1261 {
1262 .name = "query-fdsets",
1263 .args_type = "",
1264 .help = "Return information describing all fd sets",
1265 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1266 },
1267
1268SQMP
1269query-fdsets
1270-------------
1271
1272Return information describing all fd sets.
1273
1274Arguments: None
1275
1276Example:
1277
1278-> { "execute": "query-fdsets" }
1279<- { "return": [
1280 {
1281 "fds": [
1282 {
1283 "fd": 30,
1284 "opaque": "rdonly:/path/to/file"
1285 },
1286 {
1287 "fd": 24,
1288 "opaque": "rdwr:/path/to/file"
1289 }
1290 ],
1291 "fdset-id": 1
1292 },
1293 {
1294 "fds": [
1295 {
1296 "fd": 28
1297 },
1298 {
1299 "fd": 29
1300 }
1301 ],
1302 "fdset-id": 0
1303 }
1304 ]
1305 }
1306
1307Note: The list of fd sets is shared by all monitor connections.
1308
1309EQMP
1310
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001311 {
1312 .name = "block_passwd",
1313 .args_type = "device:B,password:s",
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001314 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001315 },
1316
1317SQMP
1318block_passwd
1319------------
1320
1321Set the password of encrypted block devices.
1322
1323Arguments:
1324
1325- "device": device name (json-string)
1326- "password": password (json-string)
1327
1328Example:
1329
1330-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1331 "password": "12345" } }
1332<- { "return": {} }
1333
1334EQMP
1335
1336 {
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001337 .name = "block_set_io_throttle",
1338 .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 -02001339 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001340 },
1341
1342SQMP
1343block_set_io_throttle
1344------------
1345
1346Change I/O throttle limits for a block drive.
1347
1348Arguments:
1349
1350- "device": device name (json-string)
1351- "bps": total throughput limit in bytes per second(json-int)
1352- "bps_rd": read throughput limit in bytes per second(json-int)
1353- "bps_wr": read throughput limit in bytes per second(json-int)
1354- "iops": total I/O operations per second(json-int)
1355- "iops_rd": read I/O operations per second(json-int)
1356- "iops_wr": write I/O operations per second(json-int)
1357
1358Example:
1359
1360-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1361 "bps": "1000000",
1362 "bps_rd": "0",
1363 "bps_wr": "0",
1364 "iops": "0",
1365 "iops_rd": "0",
1366 "iops_wr": "0" } }
1367<- { "return": {} }
1368
1369EQMP
1370
1371 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001372 .name = "set_password",
1373 .args_type = "protocol:s,password:s,connected:s?",
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001374 .mhandler.cmd_new = qmp_marshal_input_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001375 },
1376
1377SQMP
1378set_password
1379------------
1380
1381Set the password for vnc/spice protocols.
1382
1383Arguments:
1384
1385- "protocol": protocol name (json-string)
1386- "password": password (json-string)
1387- "connected": [ keep | disconnect | fail ] (josn-string, optional)
1388
1389Example:
1390
1391-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1392 "password": "secret" } }
1393<- { "return": {} }
1394
1395EQMP
1396
1397 {
1398 .name = "expire_password",
1399 .args_type = "protocol:s,time:s",
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001400 .mhandler.cmd_new = qmp_marshal_input_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001401 },
1402
1403SQMP
1404expire_password
1405---------------
1406
1407Set the password expire time for vnc/spice protocols.
1408
1409Arguments:
1410
1411- "protocol": protocol name (json-string)
1412- "time": [ now | never | +secs | secs ] (json-string)
1413
1414Example:
1415
1416-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1417 "time": "+60" } }
1418<- { "return": {} }
1419
1420EQMP
1421
1422 {
Daniel P. Berrange13661082011-06-23 13:31:42 +01001423 .name = "add_client",
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001424 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
Luiz Capitulinob224e5e2012-09-13 16:52:20 -03001425 .mhandler.cmd_new = qmp_marshal_input_add_client,
Daniel P. Berrange13661082011-06-23 13:31:42 +01001426 },
1427
1428SQMP
1429add_client
1430----------
1431
1432Add a graphics client
1433
1434Arguments:
1435
1436- "protocol": protocol name (json-string)
1437- "fdname": file descriptor name (json-string)
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001438- "skipauth": whether to skip authentication (json-bool, optional)
1439- "tls": whether to perform TLS (json-bool, optional)
Daniel P. Berrange13661082011-06-23 13:31:42 +01001440
1441Example:
1442
1443-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1444 "fdname": "myclient" } }
1445<- { "return": {} }
1446
1447EQMP
1448 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001449 .name = "qmp_capabilities",
1450 .args_type = "",
1451 .params = "",
1452 .help = "enable QMP capabilities",
1453 .user_print = monitor_user_noop,
1454 .mhandler.cmd_new = do_qmp_capabilities,
1455 },
1456
1457SQMP
1458qmp_capabilities
1459----------------
1460
1461Enable QMP capabilities.
1462
1463Arguments: None.
1464
1465Example:
1466
1467-> { "execute": "qmp_capabilities" }
1468<- { "return": {} }
1469
1470Note: This command must be issued before issuing any other command.
1471
Luiz Capitulino0268d972010-10-22 10:08:02 -02001472EQMP
1473
1474 {
1475 .name = "human-monitor-command",
1476 .args_type = "command-line:s,cpu-index:i?",
Luiz Capitulinod51a67b2011-11-25 17:52:45 -02001477 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
Luiz Capitulino0268d972010-10-22 10:08:02 -02001478 },
1479
1480SQMP
1481human-monitor-command
1482---------------------
1483
1484Execute a Human Monitor command.
1485
1486Arguments:
1487
1488- command-line: the command name and its arguments, just like the
1489 Human Monitor's shell (json-string)
1490- cpu-index: select the CPU number to be used by commands which access CPU
1491 data, like 'info registers'. The Monitor selects CPU 0 if this
1492 argument is not provided (json-int, optional)
1493
1494Example:
1495
1496-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1497<- { "return": "kvm support: enabled\r\n" }
1498
1499Notes:
1500
1501(1) The Human Monitor is NOT an stable interface, this means that command
1502 names, arguments and responses can change or be removed at ANY time.
1503 Applications that rely on long term stability guarantees should NOT
1504 use this command
1505
1506(2) Limitations:
1507
1508 o This command is stateless, this means that commands that depend
1509 on state information (such as getfd) might not work
1510
1511 o Commands that prompt the user for data (eg. 'cont' when the block
1512 device is encrypted) don't currently work
1513
Luiz Capitulino82a56f02010-09-13 12:26:00 -030015143. Query Commands
1515=================
1516
1517HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1518HXCOMM this! We will possibly move query commands definitions inside those
1519HXCOMM sections, just like regular commands.
1520
1521EQMP
1522
1523SQMP
1524query-version
1525-------------
1526
1527Show QEMU version.
1528
1529Return a json-object with the following information:
1530
1531- "qemu": A json-object containing three integer values:
1532 - "major": QEMU's major version (json-int)
1533 - "minor": QEMU's minor version (json-int)
1534 - "micro": QEMU's micro version (json-int)
1535- "package": package's version (json-string)
1536
1537Example:
1538
1539-> { "execute": "query-version" }
1540<- {
1541 "return":{
1542 "qemu":{
1543 "major":0,
1544 "minor":11,
1545 "micro":5
1546 },
1547 "package":""
1548 }
1549 }
1550
1551EQMP
1552
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03001553 {
1554 .name = "query-version",
1555 .args_type = "",
1556 .mhandler.cmd_new = qmp_marshal_input_query_version,
1557 },
1558
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001559SQMP
1560query-commands
1561--------------
1562
1563List QMP available commands.
1564
1565Each command is represented by a json-object, the returned value is a json-array
1566of all commands.
1567
1568Each json-object contain:
1569
1570- "name": command's name (json-string)
1571
1572Example:
1573
1574-> { "execute": "query-commands" }
1575<- {
1576 "return":[
1577 {
1578 "name":"query-balloon"
1579 },
1580 {
1581 "name":"system_powerdown"
1582 }
1583 ]
1584 }
1585
1586Note: This example has been shortened as the real response is too long.
1587
1588EQMP
1589
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03001590 {
1591 .name = "query-commands",
1592 .args_type = "",
1593 .mhandler.cmd_new = qmp_marshal_input_query_commands,
1594 },
1595
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001596SQMP
Daniel P. Berrange48608532012-05-21 17:59:51 +01001597query-events
1598--------------
1599
1600List QMP available events.
1601
1602Each event is represented by a json-object, the returned value is a json-array
1603of all events.
1604
1605Each json-object contains:
1606
1607- "name": event's name (json-string)
1608
1609Example:
1610
1611-> { "execute": "query-events" }
1612<- {
1613 "return":[
1614 {
1615 "name":"SHUTDOWN"
1616 },
1617 {
1618 "name":"RESET"
1619 }
1620 ]
1621 }
1622
1623Note: This example has been shortened as the real response is too long.
1624
1625EQMP
1626
1627 {
1628 .name = "query-events",
1629 .args_type = "",
1630 .mhandler.cmd_new = qmp_marshal_input_query_events,
1631 },
1632
1633SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001634query-chardev
1635-------------
1636
1637Each device is represented by a json-object. The returned value is a json-array
1638of all devices.
1639
1640Each json-object contain the following:
1641
1642- "label": device's label (json-string)
1643- "filename": device's file (json-string)
1644
1645Example:
1646
1647-> { "execute": "query-chardev" }
1648<- {
1649 "return":[
1650 {
1651 "label":"monitor",
1652 "filename":"stdio"
1653 },
1654 {
1655 "label":"serial0",
1656 "filename":"vc"
1657 }
1658 ]
1659 }
1660
1661EQMP
1662
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03001663 {
1664 .name = "query-chardev",
1665 .args_type = "",
1666 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1667 },
1668
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001669SQMP
1670query-block
1671-----------
1672
1673Show the block devices.
1674
1675Each block device information is stored in a json-object and the returned value
1676is a json-array of all devices.
1677
1678Each json-object contain the following:
1679
1680- "device": device name (json-string)
1681- "type": device type (json-string)
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001682 - deprecated, retained for backward compatibility
1683 - Possible values: "unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001684- "removable": true if the device is removable, false otherwise (json-bool)
1685- "locked": true if the device is locked, false otherwise (json-bool)
Michal Privoznik99f42802013-01-29 17:58:41 +01001686- "tray_open": only present if removable, true if the device has a tray,
Markus Armbrustere4def802011-09-06 18:58:53 +02001687 and it is open (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001688- "inserted": only present if the device is inserted, it is a json-object
1689 containing the following:
1690 - "file": device file name (json-string)
1691 - "ro": true if read-only, false otherwise (json-bool)
1692 - "drv": driver format name (json-string)
1693 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1694 "file", "file", "ftp", "ftps", "host_cdrom",
1695 "host_device", "host_floppy", "http", "https",
1696 "nbd", "parallels", "qcow", "qcow2", "raw",
1697 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1698 - "backing_file": backing file name (json-string, optional)
Benoît Canet2e3e3312012-08-02 10:22:48 +02001699 - "backing_file_depth": number of files in the backing file chain (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001700 - "encrypted": true if encrypted, false otherwise (json-bool)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001701 - "bps": limit total bytes per second (json-int)
1702 - "bps_rd": limit read bytes per second (json-int)
1703 - "bps_wr": limit write bytes per second (json-int)
1704 - "iops": limit total I/O operations per second (json-int)
1705 - "iops_rd": limit read operations per second (json-int)
1706 - "iops_wr": limit write operations per second (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08001707 - "image": the detail of the image, it is a json-object containing
1708 the following:
1709 - "filename": image file name (json-string)
1710 - "format": image format (json-string)
1711 - "virtual-size": image capacity in bytes (json-int)
1712 - "dirty-flag": true if image is not cleanly closed, not present
1713 means clean (json-bool, optional)
1714 - "actual-size": actual size on disk in bytes of the image, not
1715 present when image does not support thin
1716 provision (json-int, optional)
1717 - "cluster-size": size of a cluster in bytes, not present if image
1718 format does not support it (json-int, optional)
1719 - "encrypted": true if the image is encrypted, not present means
1720 false or the image format does not support
1721 encryption (json-bool, optional)
1722 - "backing_file": backing file name, not present means no backing
1723 file is used or the image format does not
1724 support backing file chain
1725 (json-string, optional)
1726 - "full-backing-filename": full path of the backing file, not
1727 present if it equals backing_file or no
1728 backing file is used
1729 (json-string, optional)
1730 - "backing-filename-format": the format of the backing file, not
1731 present means unknown or no backing
1732 file (json-string, optional)
1733 - "snapshots": the internal snapshot info, it is an optional list
1734 of json-object containing the following:
1735 - "id": unique snapshot id (json-string)
1736 - "name": snapshot name (json-string)
1737 - "vm-state-size": size of the VM state in bytes (json-int)
1738 - "date-sec": UTC date of the snapshot in seconds (json-int)
1739 - "date-nsec": fractional part in nanoseconds to be used with
1740 date-sec(json-int)
1741 - "vm-clock-sec": VM clock relative to boot in seconds
1742 (json-int)
1743 - "vm-clock-nsec": fractional part in nanoseconds to be used
1744 with vm-clock-sec (json-int)
1745 - "backing-image": the detail of the backing image, it is an
1746 optional json-object only present when a
1747 backing image present for this image
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001748
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001749- "io-status": I/O operation status, only present if the device supports it
1750 and the VM is configured to stop on errors. It's always reset
1751 to "ok" when the "cont" command is issued (json_string, optional)
1752 - Possible values: "ok", "failed", "nospace"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001753
1754Example:
1755
1756-> { "execute": "query-block" }
1757<- {
1758 "return":[
1759 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001760 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001761 "device":"ide0-hd0",
1762 "locked":false,
1763 "removable":false,
1764 "inserted":{
1765 "ro":false,
1766 "drv":"qcow2",
1767 "encrypted":false,
Wenchao Xia553a7e82013-06-06 12:27:59 +08001768 "file":"disks/test.qcow2",
1769 "backing_file_depth":1,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001770 "bps":1000000,
1771 "bps_rd":0,
1772 "bps_wr":0,
1773 "iops":1000000,
1774 "iops_rd":0,
1775 "iops_wr":0,
Wenchao Xia553a7e82013-06-06 12:27:59 +08001776 "image":{
1777 "filename":"disks/test.qcow2",
1778 "format":"qcow2",
1779 "virtual-size":2048000,
1780 "backing_file":"base.qcow2",
1781 "full-backing-filename":"disks/base.qcow2",
1782 "backing-filename-format:"qcow2",
1783 "snapshots":[
1784 {
1785 "id": "1",
1786 "name": "snapshot1",
1787 "vm-state-size": 0,
1788 "date-sec": 10000200,
1789 "date-nsec": 12,
1790 "vm-clock-sec": 206,
1791 "vm-clock-nsec": 30
1792 }
1793 ],
1794 "backing-image":{
1795 "filename":"disks/base.qcow2",
1796 "format":"qcow2",
1797 "virtual-size":2048000
1798 }
1799 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001800 },
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001801 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001802 },
1803 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03001804 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001805 "device":"ide1-cd0",
1806 "locked":false,
1807 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001808 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001809 },
1810 {
1811 "device":"floppy0",
1812 "locked":false,
1813 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001814 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001815 },
1816 {
1817 "device":"sd0",
1818 "locked":false,
1819 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02001820 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001821 }
1822 ]
1823 }
1824
1825EQMP
1826
Luiz Capitulinob2023812011-09-21 17:16:47 -03001827 {
1828 .name = "query-block",
1829 .args_type = "",
1830 .mhandler.cmd_new = qmp_marshal_input_query_block,
1831 },
1832
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001833SQMP
1834query-blockstats
1835----------------
1836
1837Show block device statistics.
1838
1839Each device statistic information is stored in a json-object and the returned
1840value is a json-array of all devices.
1841
1842Each json-object contain the following:
1843
1844- "device": device name (json-string)
1845- "stats": A json-object with the statistics information, it contains:
1846 - "rd_bytes": bytes read (json-int)
1847 - "wr_bytes": bytes written (json-int)
1848 - "rd_operations": read operations (json-int)
1849 - "wr_operations": write operations (json-int)
Christoph Hellwige8045d62011-08-22 00:25:58 +02001850 - "flush_operations": cache flush operations (json-int)
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001851 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1852 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1853 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001854 - "wr_highest_offset": Highest offset of a sector written since the
1855 BlockDriverState has been opened (json-int)
1856- "parent": Contains recursively the statistics of the underlying
1857 protocol (e.g. the host file for a qcow2 image). If there is
1858 no underlying protocol, this field is omitted
1859 (json-object, optional)
1860
1861Example:
1862
1863-> { "execute": "query-blockstats" }
1864<- {
1865 "return":[
1866 {
1867 "device":"ide0-hd0",
1868 "parent":{
1869 "stats":{
1870 "wr_highest_offset":3686448128,
1871 "wr_bytes":9786368,
1872 "wr_operations":751,
1873 "rd_bytes":122567168,
1874 "rd_operations":36772
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001875 "wr_total_times_ns":313253456
1876 "rd_total_times_ns":3465673657
1877 "flush_total_times_ns":49653
Christoph Hellwige8045d62011-08-22 00:25:58 +02001878 "flush_operations":61,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001879 }
1880 },
1881 "stats":{
1882 "wr_highest_offset":2821110784,
1883 "wr_bytes":9786368,
1884 "wr_operations":692,
1885 "rd_bytes":122739200,
1886 "rd_operations":36604
Christoph Hellwige8045d62011-08-22 00:25:58 +02001887 "flush_operations":51,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001888 "wr_total_times_ns":313253456
1889 "rd_total_times_ns":3465673657
1890 "flush_total_times_ns":49653
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001891 }
1892 },
1893 {
1894 "device":"ide1-cd0",
1895 "stats":{
1896 "wr_highest_offset":0,
1897 "wr_bytes":0,
1898 "wr_operations":0,
1899 "rd_bytes":0,
1900 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001901 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001902 "wr_total_times_ns":0
1903 "rd_total_times_ns":0
1904 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001905 }
1906 },
1907 {
1908 "device":"floppy0",
1909 "stats":{
1910 "wr_highest_offset":0,
1911 "wr_bytes":0,
1912 "wr_operations":0,
1913 "rd_bytes":0,
1914 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001915 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001916 "wr_total_times_ns":0
1917 "rd_total_times_ns":0
1918 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001919 }
1920 },
1921 {
1922 "device":"sd0",
1923 "stats":{
1924 "wr_highest_offset":0,
1925 "wr_bytes":0,
1926 "wr_operations":0,
1927 "rd_bytes":0,
1928 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02001929 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02001930 "wr_total_times_ns":0
1931 "rd_total_times_ns":0
1932 "flush_total_times_ns":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001933 }
1934 }
1935 ]
1936 }
1937
1938EQMP
1939
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03001940 {
1941 .name = "query-blockstats",
1942 .args_type = "",
1943 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
1944 },
1945
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001946SQMP
1947query-cpus
1948----------
1949
1950Show CPU information.
1951
1952Return a json-array. Each CPU is represented by a json-object, which contains:
1953
1954- "CPU": CPU index (json-int)
1955- "current": true if this is the current CPU, false otherwise (json-bool)
1956- "halted": true if the cpu is halted, false otherwise (json-bool)
1957- Current program counter. The key's name depends on the architecture:
1958 "pc": i386/x86_64 (json-int)
1959 "nip": PPC (json-int)
1960 "pc" and "npc": sparc (json-int)
1961 "PC": mips (json-int)
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01001962- "thread_id": ID of the underlying host thread (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001963
1964Example:
1965
1966-> { "execute": "query-cpus" }
1967<- {
1968 "return":[
1969 {
1970 "CPU":0,
1971 "current":true,
1972 "halted":false,
1973 "pc":3227107138
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01001974 "thread_id":3134
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001975 },
1976 {
1977 "CPU":1,
1978 "current":false,
1979 "halted":true,
1980 "pc":7108165
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01001981 "thread_id":3135
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001982 }
1983 ]
1984 }
1985
1986EQMP
1987
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03001988 {
1989 .name = "query-cpus",
1990 .args_type = "",
1991 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
1992 },
1993
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001994SQMP
1995query-pci
1996---------
1997
1998PCI buses and devices information.
1999
2000The returned value is a json-array of all buses. Each bus is represented by
2001a json-object, which has a key with a json-array of all PCI devices attached
2002to it. Each device is represented by a json-object.
2003
2004The bus json-object contains the following:
2005
2006- "bus": bus number (json-int)
2007- "devices": a json-array of json-objects, each json-object represents a
2008 PCI device
2009
2010The PCI device json-object contains the following:
2011
2012- "bus": identical to the parent's bus number (json-int)
2013- "slot": slot number (json-int)
2014- "function": function number (json-int)
2015- "class_info": a json-object containing:
2016 - "desc": device class description (json-string, optional)
2017 - "class": device class number (json-int)
2018- "id": a json-object containing:
2019 - "device": device ID (json-int)
2020 - "vendor": vendor ID (json-int)
2021- "irq": device's IRQ if assigned (json-int, optional)
2022- "qdev_id": qdev id string (json-string)
2023- "pci_bridge": It's a json-object, only present if this device is a
2024 PCI bridge, contains:
2025 - "bus": bus number (json-int)
2026 - "secondary": secondary bus number (json-int)
2027 - "subordinate": subordinate bus number (json-int)
2028 - "io_range": I/O memory range information, a json-object with the
2029 following members:
2030 - "base": base address, in bytes (json-int)
2031 - "limit": limit address, in bytes (json-int)
2032 - "memory_range": memory range information, a json-object with the
2033 following members:
2034 - "base": base address, in bytes (json-int)
2035 - "limit": limit address, in bytes (json-int)
2036 - "prefetchable_range": Prefetchable memory range information, a
2037 json-object with the following members:
2038 - "base": base address, in bytes (json-int)
2039 - "limit": limit address, in bytes (json-int)
2040 - "devices": a json-array of PCI devices if there's any attached, each
2041 each element is represented by a json-object, which contains
2042 the same members of the 'PCI device json-object' described
2043 above (optional)
2044- "regions": a json-array of json-objects, each json-object represents a
2045 memory region of this device
2046
2047The memory range json-object contains the following:
2048
2049- "base": base memory address (json-int)
2050- "limit": limit value (json-int)
2051
2052The region json-object can be an I/O region or a memory region, an I/O region
2053json-object contains the following:
2054
2055- "type": "io" (json-string, fixed)
2056- "bar": BAR number (json-int)
2057- "address": memory address (json-int)
2058- "size": memory size (json-int)
2059
2060A memory region json-object contains the following:
2061
2062- "type": "memory" (json-string, fixed)
2063- "bar": BAR number (json-int)
2064- "address": memory address (json-int)
2065- "size": memory size (json-int)
2066- "mem_type_64": true or false (json-bool)
2067- "prefetch": true or false (json-bool)
2068
2069Example:
2070
2071-> { "execute": "query-pci" }
2072<- {
2073 "return":[
2074 {
2075 "bus":0,
2076 "devices":[
2077 {
2078 "bus":0,
2079 "qdev_id":"",
2080 "slot":0,
2081 "class_info":{
2082 "class":1536,
2083 "desc":"Host bridge"
2084 },
2085 "id":{
2086 "device":32902,
2087 "vendor":4663
2088 },
2089 "function":0,
2090 "regions":[
2091
2092 ]
2093 },
2094 {
2095 "bus":0,
2096 "qdev_id":"",
2097 "slot":1,
2098 "class_info":{
2099 "class":1537,
2100 "desc":"ISA bridge"
2101 },
2102 "id":{
2103 "device":32902,
2104 "vendor":28672
2105 },
2106 "function":0,
2107 "regions":[
2108
2109 ]
2110 },
2111 {
2112 "bus":0,
2113 "qdev_id":"",
2114 "slot":1,
2115 "class_info":{
2116 "class":257,
2117 "desc":"IDE controller"
2118 },
2119 "id":{
2120 "device":32902,
2121 "vendor":28688
2122 },
2123 "function":1,
2124 "regions":[
2125 {
2126 "bar":4,
2127 "size":16,
2128 "address":49152,
2129 "type":"io"
2130 }
2131 ]
2132 },
2133 {
2134 "bus":0,
2135 "qdev_id":"",
2136 "slot":2,
2137 "class_info":{
2138 "class":768,
2139 "desc":"VGA controller"
2140 },
2141 "id":{
2142 "device":4115,
2143 "vendor":184
2144 },
2145 "function":0,
2146 "regions":[
2147 {
2148 "prefetch":true,
2149 "mem_type_64":false,
2150 "bar":0,
2151 "size":33554432,
2152 "address":4026531840,
2153 "type":"memory"
2154 },
2155 {
2156 "prefetch":false,
2157 "mem_type_64":false,
2158 "bar":1,
2159 "size":4096,
2160 "address":4060086272,
2161 "type":"memory"
2162 },
2163 {
2164 "prefetch":false,
2165 "mem_type_64":false,
2166 "bar":6,
2167 "size":65536,
2168 "address":-1,
2169 "type":"memory"
2170 }
2171 ]
2172 },
2173 {
2174 "bus":0,
2175 "qdev_id":"",
2176 "irq":11,
2177 "slot":4,
2178 "class_info":{
2179 "class":1280,
2180 "desc":"RAM controller"
2181 },
2182 "id":{
2183 "device":6900,
2184 "vendor":4098
2185 },
2186 "function":0,
2187 "regions":[
2188 {
2189 "bar":0,
2190 "size":32,
2191 "address":49280,
2192 "type":"io"
2193 }
2194 ]
2195 }
2196 ]
2197 }
2198 ]
2199 }
2200
2201Note: This example has been shortened as the real response is too long.
2202
2203EQMP
2204
Luiz Capitulino79627472011-10-21 14:15:33 -02002205 {
2206 .name = "query-pci",
2207 .args_type = "",
2208 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2209 },
2210
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002211SQMP
2212query-kvm
2213---------
2214
2215Show KVM information.
2216
2217Return a json-object with the following information:
2218
2219- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2220- "present": true if QEMU has KVM support, false otherwise (json-bool)
2221
2222Example:
2223
2224-> { "execute": "query-kvm" }
2225<- { "return": { "enabled": true, "present": true } }
2226
2227EQMP
2228
Luiz Capitulino292a2602011-09-12 15:10:53 -03002229 {
2230 .name = "query-kvm",
2231 .args_type = "",
2232 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2233 },
2234
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002235SQMP
2236query-status
2237------------
2238
2239Return a json-object with the following information:
2240
2241- "running": true if the VM is running, or false if it is paused (json-bool)
2242- "singlestep": true if the VM is in single step mode,
2243 false otherwise (json-bool)
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002244- "status": one of the following values (json-string)
2245 "debug" - QEMU is running on a debugger
2246 "inmigrate" - guest is paused waiting for an incoming migration
2247 "internal-error" - An internal error that prevents further guest
2248 execution has occurred
2249 "io-error" - the last IOP has failed and the device is configured
2250 to pause on I/O errors
2251 "paused" - guest has been paused via the 'stop' command
2252 "postmigrate" - guest is paused following a successful 'migrate'
2253 "prelaunch" - QEMU was started with -S and guest has not started
2254 "finish-migrate" - guest is paused to finish the migration process
2255 "restore-vm" - guest is paused to restore VM state
2256 "running" - guest is actively running
2257 "save-vm" - guest is paused to save the VM state
2258 "shutdown" - guest is shut down (and -no-shutdown is in use)
2259 "watchdog" - the watchdog action is configured to pause and
2260 has been triggered
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002261
2262Example:
2263
2264-> { "execute": "query-status" }
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002265<- { "return": { "running": true, "singlestep": false, "status": "running" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002266
2267EQMP
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002268
2269 {
2270 .name = "query-status",
2271 .args_type = "",
2272 .mhandler.cmd_new = qmp_marshal_input_query_status,
2273 },
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002274
2275SQMP
2276query-mice
2277----------
2278
2279Show VM mice information.
2280
2281Each mouse is represented by a json-object, the returned value is a json-array
2282of all mice.
2283
2284The mouse json-object contains the following:
2285
2286- "name": mouse's name (json-string)
2287- "index": mouse's index (json-int)
2288- "current": true if this mouse is receiving events, false otherwise (json-bool)
2289- "absolute": true if the mouse generates absolute input events (json-bool)
2290
2291Example:
2292
2293-> { "execute": "query-mice" }
2294<- {
2295 "return":[
2296 {
2297 "name":"QEMU Microsoft Mouse",
2298 "index":0,
2299 "current":false,
2300 "absolute":false
2301 },
2302 {
2303 "name":"QEMU PS/2 Mouse",
2304 "index":1,
2305 "current":true,
2306 "absolute":true
2307 }
2308 ]
2309 }
2310
2311EQMP
2312
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03002313 {
2314 .name = "query-mice",
2315 .args_type = "",
2316 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2317 },
2318
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002319SQMP
2320query-vnc
2321---------
2322
2323Show VNC server information.
2324
2325Return a json-object with server information. Connected clients are returned
2326as a json-array of json-objects.
2327
2328The main json-object contains the following:
2329
2330- "enabled": true or false (json-bool)
2331- "host": server's IP address (json-string)
2332- "family": address family (json-string)
2333 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2334- "service": server's port number (json-string)
2335- "auth": authentication method (json-string)
2336 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2337 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2338 "vencrypt+plain", "vencrypt+tls+none",
2339 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2340 "vencrypt+tls+vnc", "vencrypt+x509+none",
2341 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2342 "vencrypt+x509+vnc", "vnc"
2343- "clients": a json-array of all connected clients
2344
2345Clients are described by a json-object, each one contain the following:
2346
2347- "host": client's IP address (json-string)
2348- "family": address family (json-string)
2349 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2350- "service": client's port number (json-string)
2351- "x509_dname": TLS dname (json-string, optional)
2352- "sasl_username": SASL username (json-string, optional)
2353
2354Example:
2355
2356-> { "execute": "query-vnc" }
2357<- {
2358 "return":{
2359 "enabled":true,
2360 "host":"0.0.0.0",
2361 "service":"50402",
2362 "auth":"vnc",
2363 "family":"ipv4",
2364 "clients":[
2365 {
2366 "host":"127.0.0.1",
2367 "service":"50401",
2368 "family":"ipv4"
2369 }
2370 ]
2371 }
2372 }
2373
2374EQMP
2375
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002376 {
2377 .name = "query-vnc",
2378 .args_type = "",
2379 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2380 },
2381
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002382SQMP
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002383query-spice
2384-----------
2385
2386Show SPICE server information.
2387
2388Return a json-object with server information. Connected clients are returned
2389as a json-array of json-objects.
2390
2391The main json-object contains the following:
2392
2393- "enabled": true or false (json-bool)
2394- "host": server's IP address (json-string)
2395- "port": server's port number (json-int, optional)
2396- "tls-port": server's port number (json-int, optional)
2397- "auth": authentication method (json-string)
2398 - Possible values: "none", "spice"
2399- "channels": a json-array of all active channels clients
2400
2401Channels are described by a json-object, each one contain the following:
2402
2403- "host": client's IP address (json-string)
2404- "family": address family (json-string)
2405 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2406- "port": client's port number (json-string)
2407- "connection-id": spice connection id. All channels with the same id
2408 belong to the same spice session (json-int)
2409- "channel-type": channel type. "1" is the main control channel, filter for
2410 this one if you want track spice sessions only (json-int)
2411- "channel-id": channel id. Usually "0", might be different needed when
2412 multiple channels of the same type exist, such as multiple
2413 display channels in a multihead setup (json-int)
2414- "tls": whevener the channel is encrypted (json-bool)
2415
2416Example:
2417
2418-> { "execute": "query-spice" }
2419<- {
2420 "return": {
2421 "enabled": true,
2422 "auth": "spice",
2423 "port": 5920,
2424 "tls-port": 5921,
2425 "host": "0.0.0.0",
2426 "channels": [
2427 {
2428 "port": "54924",
2429 "family": "ipv4",
2430 "channel-type": 1,
2431 "connection-id": 1804289383,
2432 "host": "127.0.0.1",
2433 "channel-id": 0,
2434 "tls": true
2435 },
2436 {
2437 "port": "36710",
2438 "family": "ipv4",
2439 "channel-type": 4,
2440 "connection-id": 1804289383,
2441 "host": "127.0.0.1",
2442 "channel-id": 0,
2443 "tls": false
2444 },
2445 [ ... more channels follow ... ]
2446 ]
2447 }
2448 }
2449
2450EQMP
2451
Luiz Capitulinod1f29642011-10-20 17:01:33 -02002452#if defined(CONFIG_SPICE)
2453 {
2454 .name = "query-spice",
2455 .args_type = "",
2456 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2457 },
2458#endif
2459
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002460SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002461query-name
2462----------
2463
2464Show VM name.
2465
2466Return a json-object with the following information:
2467
2468- "name": VM's name (json-string, optional)
2469
2470Example:
2471
2472-> { "execute": "query-name" }
2473<- { "return": { "name": "qemu-name" } }
2474
2475EQMP
2476
Anthony Liguori48a32be2011-09-02 12:34:48 -05002477 {
2478 .name = "query-name",
2479 .args_type = "",
2480 .mhandler.cmd_new = qmp_marshal_input_query_name,
2481 },
2482
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002483SQMP
2484query-uuid
2485----------
2486
2487Show VM UUID.
2488
2489Return a json-object with the following information:
2490
2491- "UUID": Universally Unique Identifier (json-string)
2492
2493Example:
2494
2495-> { "execute": "query-uuid" }
2496<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2497
2498EQMP
2499
Luiz Capitulinoefab7672011-09-13 17:16:25 -03002500 {
2501 .name = "query-uuid",
2502 .args_type = "",
2503 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2504 },
2505
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002506SQMP
Amos Kong1f8f9872013-04-25 17:50:35 +08002507query-command-line-options
2508--------------------------
2509
2510Show command line option schema.
2511
2512Return a json-array of command line option schema for all options (or for
2513the given option), returning an error if the given option doesn't exist.
2514
2515Each array entry contains the following:
2516
2517- "option": option name (json-string)
2518- "parameters": a json-array describes all parameters of the option:
2519 - "name": parameter name (json-string)
2520 - "type": parameter type (one of 'string', 'boolean', 'number',
2521 or 'size')
2522 - "help": human readable description of the parameter
2523 (json-string, optional)
2524
2525Example:
2526
2527-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2528<- { "return": [
2529 {
2530 "parameters": [
2531 {
2532 "name": "romfile",
2533 "type": "string"
2534 },
2535 {
2536 "name": "bootindex",
2537 "type": "number"
2538 }
2539 ],
2540 "option": "option-rom"
2541 }
2542 ]
2543 }
2544
2545EQMP
2546
2547 {
2548 .name = "query-command-line-options",
2549 .args_type = "option:s?",
2550 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
2551 },
2552
2553SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002554query-migrate
2555-------------
2556
2557Migration status.
2558
2559Return a json-object. If migration is active there will be another json-object
2560with RAM migration status and if block migration is active another one with
2561block migration status.
2562
2563The main json-object contains the following:
2564
2565- "status": migration status (json-string)
2566 - Possible values: "active", "completed", "failed", "cancelled"
Juan Quintela7aa939a2012-08-18 13:17:10 +02002567- "total-time": total amount of ms since migration started. If
2568 migration has ended, it returns the total migration
Juan Quintela817c6042013-02-11 15:11:10 +01002569 time (json-int)
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02002570- "downtime": only present when migration has finished correctly
2571 total amount in ms for downtime that happened (json-int)
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002572- "expected-downtime": only present while migration is active
2573 total amount in ms for downtime that was calculated on
Juan Quintela817c6042013-02-11 15:11:10 +01002574 the last bitmap round (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002575- "ram": only present if "status" is "active", it is a json-object with the
Juan Quintela817c6042013-02-11 15:11:10 +01002576 following RAM information:
2577 - "transferred": amount transferred in bytes (json-int)
2578 - "remaining": amount remaining to transfer in bytes (json-int)
2579 - "total": total amount of memory in bytes (json-int)
2580 - "duplicate": number of pages filled entirely with the same
2581 byte (json-int)
2582 These are sent over the wire much more efficiently.
Peter Lievenf1c72792013-03-26 10:58:37 +01002583 - "skipped": number of skipped zero pages (json-int)
Stefan Weil805a2502013-04-28 11:49:57 +02002584 - "normal" : number of whole pages transferred. I.e. they
Juan Quintela817c6042013-02-11 15:11:10 +01002585 were not sent as duplicate or xbzrle pages (json-int)
2586 - "normal-bytes" : number of bytes transferred in whole
2587 pages. This is just normal pages times size of one page,
2588 but this way upper levels don't need to care about page
2589 size (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002590- "disk": only present if "status" is "active" and it is a block migration,
Juan Quintela817c6042013-02-11 15:11:10 +01002591 it is a json-object with the following disk information:
2592 - "transferred": amount transferred in bytes (json-int)
2593 - "remaining": amount remaining to transfer in bytes json-int)
2594 - "total": total disk size in bytes (json-int)
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002595- "xbzrle-cache": only present if XBZRLE is active.
2596 It is a json-object with the following XBZRLE information:
Juan Quintela817c6042013-02-11 15:11:10 +01002597 - "cache-size": XBZRLE cache size in bytes
2598 - "bytes": number of bytes transferred for XBZRLE compressed pages
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002599 - "pages": number of XBZRLE compressed pages
Juan Quintela817c6042013-02-11 15:11:10 +01002600 - "cache-miss": number of XBRZRLE page cache misses
2601 - "overflow": number of times XBZRLE overflows. This means
2602 that the XBZRLE encoding was bigger than just sent the
2603 whole page, and then we sent the whole page instead (as as
2604 normal page).
2605
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002606Examples:
2607
26081. Before the first migration
2609
2610-> { "execute": "query-migrate" }
2611<- { "return": {} }
2612
26132. Migration is done and has succeeded
2614
2615-> { "execute": "query-migrate" }
Orit Wasserman004d4c12012-08-06 21:42:56 +03002616<- { "return": {
2617 "status": "completed",
2618 "ram":{
2619 "transferred":123,
2620 "remaining":123,
2621 "total":246,
2622 "total-time":12345,
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02002623 "downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002624 "duplicate":123,
2625 "normal":123,
2626 "normal-bytes":123456
2627 }
2628 }
2629 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002630
26313. Migration is done and has failed
2632
2633-> { "execute": "query-migrate" }
2634<- { "return": { "status": "failed" } }
2635
26364. Migration is being performed and is not a block migration:
2637
2638-> { "execute": "query-migrate" }
2639<- {
2640 "return":{
2641 "status":"active",
2642 "ram":{
2643 "transferred":123,
2644 "remaining":123,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03002645 "total":246,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002646 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002647 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002648 "duplicate":123,
2649 "normal":123,
2650 "normal-bytes":123456
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002651 }
2652 }
2653 }
2654
26555. Migration is being performed and is a block migration:
2656
2657-> { "execute": "query-migrate" }
2658<- {
2659 "return":{
2660 "status":"active",
2661 "ram":{
2662 "total":1057024,
2663 "remaining":1053304,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03002664 "transferred":3720,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002665 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002666 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03002667 "duplicate":123,
2668 "normal":123,
2669 "normal-bytes":123456
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002670 },
2671 "disk":{
2672 "total":20971520,
2673 "remaining":20880384,
2674 "transferred":91136
2675 }
2676 }
2677 }
2678
Orit Wassermanf36d55a2012-08-06 21:42:57 +030026796. Migration is being performed and XBZRLE is active:
2680
2681-> { "execute": "query-migrate" }
2682<- {
2683 "return":{
2684 "status":"active",
2685 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2686 "ram":{
2687 "total":1057024,
2688 "remaining":1053304,
2689 "transferred":3720,
2690 "total-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02002691 "expected-downtime":12345,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03002692 "duplicate":10,
2693 "normal":3333,
2694 "normal-bytes":3412992
2695 },
2696 "xbzrle-cache":{
2697 "cache-size":67108864,
2698 "bytes":20971520,
2699 "pages":2444343,
2700 "cache-miss":2244,
2701 "overflow":34434
2702 }
2703 }
2704 }
2705
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002706EQMP
2707
Luiz Capitulino791e7c82011-09-13 17:37:16 -03002708 {
2709 .name = "query-migrate",
2710 .args_type = "",
2711 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2712 },
2713
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002714SQMP
Orit Wasserman00458432012-08-06 21:42:48 +03002715migrate-set-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01002716------------------------
Orit Wasserman00458432012-08-06 21:42:48 +03002717
2718Enable/Disable migration capabilities
2719
Juan Quintela817c6042013-02-11 15:11:10 +01002720- "xbzrle": XBZRLE support
Orit Wasserman00458432012-08-06 21:42:48 +03002721
2722Arguments:
2723
2724Example:
2725
2726-> { "execute": "migrate-set-capabilities" , "arguments":
2727 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2728
2729EQMP
2730
2731 {
2732 .name = "migrate-set-capabilities",
2733 .args_type = "capabilities:O",
2734 .params = "capability:s,state:b",
2735 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2736 },
2737SQMP
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002738query-migrate-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01002739--------------------------
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002740
2741Query current migration capabilities
2742
2743- "capabilities": migration capabilities state
2744 - "xbzrle" : XBZRLE state (json-bool)
2745
2746Arguments:
2747
2748Example:
2749
2750-> { "execute": "query-migrate-capabilities" }
Orit Wassermandbca1b32013-01-31 09:12:17 +02002751<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2752
Orit Wassermanbbf6da32012-08-06 21:42:47 +03002753EQMP
2754
2755 {
2756 .name = "query-migrate-capabilities",
2757 .args_type = "",
2758 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2759 },
2760
2761SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002762query-balloon
2763-------------
2764
2765Show balloon information.
2766
2767Make an asynchronous request for balloon info. When the request completes a
2768json-object will be returned containing the following data:
2769
2770- "actual": current balloon value in bytes (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002771
2772Example:
2773
2774-> { "execute": "query-balloon" }
2775<- {
2776 "return":{
2777 "actual":1073741824,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002778 }
2779 }
2780
2781EQMP
2782
Luiz Capitulino96637bc2011-10-21 11:41:37 -02002783 {
2784 .name = "query-balloon",
2785 .args_type = "",
2786 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2787 },
Anthony Liguorib4b12c62011-12-12 14:29:34 -06002788
2789 {
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00002790 .name = "query-block-jobs",
2791 .args_type = "",
2792 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2793 },
2794
2795 {
Anthony Liguorib4b12c62011-12-12 14:29:34 -06002796 .name = "qom-list",
2797 .args_type = "path:s",
2798 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2799 },
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06002800
2801 {
2802 .name = "qom-set",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01002803 .args_type = "path:s,property:s,value:q",
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06002804 .mhandler.cmd_new = qmp_qom_set,
2805 },
2806
2807 {
2808 .name = "qom-get",
2809 .args_type = "path:s,property:s",
2810 .mhandler.cmd_new = qmp_qom_get,
2811 },
Luiz Capitulino270b2432011-12-08 11:45:55 -02002812
2813 {
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02002814 .name = "nbd-server-start",
2815 .args_type = "addr:q",
2816 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2817 },
2818 {
2819 .name = "nbd-server-add",
2820 .args_type = "device:B,writable:b?",
2821 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2822 },
2823 {
2824 .name = "nbd-server-stop",
2825 .args_type = "",
2826 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2827 },
2828
2829 {
Luiz Capitulino270b2432011-12-08 11:45:55 -02002830 .name = "change-vnc-password",
2831 .args_type = "password:s",
2832 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2833 },
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06002834 {
2835 .name = "qom-list-types",
2836 .args_type = "implements:s?,abstract:b?",
2837 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2838 },
Anthony Liguori1daa31b2012-08-10 11:04:09 -05002839
2840 {
2841 .name = "device-list-properties",
2842 .args_type = "typename:s",
2843 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2844 },
2845
Anthony Liguori01d3c802012-08-10 11:04:11 -05002846 {
2847 .name = "query-machines",
2848 .args_type = "",
2849 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2850 },
2851
Anthony Liguorie4e31c62012-08-10 11:04:13 -05002852 {
2853 .name = "query-cpu-definitions",
2854 .args_type = "",
2855 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2856 },
2857
Daniel P. Berrange99afc912012-08-20 15:31:38 +01002858 {
2859 .name = "query-target",
2860 .args_type = "",
2861 .mhandler.cmd_new = qmp_marshal_input_query_target,
2862 },
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002863
2864 {
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002865 .name = "query-tpm",
2866 .args_type = "",
2867 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2868 },
2869
Corey Bryant28c4fa32013-03-20 12:34:49 -04002870SQMP
2871query-tpm
2872---------
2873
2874Return information about the TPM device.
2875
2876Arguments: None
2877
2878Example:
2879
2880-> { "execute": "query-tpm" }
2881<- { "return":
2882 [
2883 { "model": "tpm-tis",
2884 "options":
2885 { "type": "passthrough",
2886 "data":
2887 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2888 "path": "/dev/tpm0"
2889 }
2890 },
2891 "id": "tpm0"
2892 }
2893 ]
2894 }
2895
2896EQMP
2897
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002898 {
2899 .name = "query-tpm-models",
2900 .args_type = "",
2901 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2902 },
2903
Corey Bryant28c4fa32013-03-20 12:34:49 -04002904SQMP
2905query-tpm-models
2906----------------
2907
2908Return a list of supported TPM models.
2909
2910Arguments: None
2911
2912Example:
2913
2914-> { "execute": "query-tpm-models" }
2915<- { "return": [ "tpm-tis" ] }
2916
2917EQMP
2918
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002919 {
2920 .name = "query-tpm-types",
2921 .args_type = "",
2922 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2923 },
2924
Corey Bryant28c4fa32013-03-20 12:34:49 -04002925SQMP
2926query-tpm-types
2927---------------
2928
2929Return a list of supported TPM types.
2930
2931Arguments: None
2932
2933Example:
2934
2935-> { "execute": "query-tpm-types" }
2936<- { "return": [ "passthrough" ] }
2937
2938EQMP
2939
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05002940 {
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002941 .name = "chardev-add",
2942 .args_type = "id:s,backend:q",
2943 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
2944 },
2945
2946SQMP
2947chardev-add
2948----------------
2949
2950Add a chardev.
2951
2952Arguments:
2953
2954- "id": the chardev's ID, must be unique (json-string)
2955- "backend": chardev backend type + parameters
2956
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01002957Examples:
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002958
2959-> { "execute" : "chardev-add",
2960 "arguments" : { "id" : "foo",
2961 "backend" : { "type" : "null", "data" : {} } } }
2962<- { "return": {} }
2963
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01002964-> { "execute" : "chardev-add",
2965 "arguments" : { "id" : "bar",
2966 "backend" : { "type" : "file",
2967 "data" : { "out" : "/tmp/bar.log" } } } }
2968<- { "return": {} }
2969
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01002970-> { "execute" : "chardev-add",
2971 "arguments" : { "id" : "baz",
2972 "backend" : { "type" : "pty", "data" : {} } } }
2973<- { "return": { "pty" : "/dev/pty/42" } }
2974
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01002975EQMP
2976
2977 {
2978 .name = "chardev-remove",
2979 .args_type = "id:s",
2980 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
2981 },
2982
2983
2984SQMP
2985chardev-remove
2986--------------
2987
2988Remove a chardev.
2989
2990Arguments:
2991
2992- "id": the chardev's ID, must exist and not be in use (json-string)
2993
2994Example:
2995
2996-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
2997<- { "return": {} }
2998
2999EQMP