]> git.proxmox.com Git - qemu.git/blob - hmp-commands.hx
Merge remote branch 'mst/for_anthony' into staging
[qemu.git] / hmp-commands.hx
1 HXCOMM Use DEFHEADING() to define headings in both help text and texi
2 HXCOMM Text between STEXI and ETEXI are copied to texi version and
3 HXCOMM discarded from C version
4 HXCOMM DEF(command, args, callback, arg_string, help) is used to construct
5 HXCOMM monitor commands
6 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
7
8 STEXI
9 @table @option
10 ETEXI
11
12 {
13 .name = "help|?",
14 .args_type = "name:s?",
15 .params = "[cmd]",
16 .help = "show the help",
17 .mhandler.cmd = do_help_cmd,
18 },
19
20 STEXI
21 @item help or ? [@var{cmd}]
22 @findex help
23 Show the help for all commands or just for command @var{cmd}.
24 ETEXI
25
26 {
27 .name = "commit",
28 .args_type = "device:B",
29 .params = "device|all",
30 .help = "commit changes to the disk images (if -snapshot is used) or backing files",
31 .mhandler.cmd = do_commit,
32 },
33
34 STEXI
35 @item commit
36 @findex commit
37 Commit changes to the disk images (if -snapshot is used) or backing files.
38 ETEXI
39
40 {
41 .name = "q|quit",
42 .args_type = "",
43 .params = "",
44 .help = "quit the emulator",
45 .user_print = monitor_user_noop,
46 .mhandler.cmd_new = do_quit,
47 },
48
49 STEXI
50 @item q or quit
51 @findex quit
52 Quit the emulator.
53 ETEXI
54
55 {
56 .name = "eject",
57 .args_type = "force:-f,device:B",
58 .params = "[-f] device",
59 .help = "eject a removable medium (use -f to force it)",
60 .user_print = monitor_user_noop,
61 .mhandler.cmd_new = do_eject,
62 },
63
64 STEXI
65 @item eject [-f] @var{device}
66 @findex eject
67 Eject a removable medium (use -f to force it).
68 ETEXI
69
70 {
71 .name = "drive_del",
72 .args_type = "id:s",
73 .params = "device",
74 .help = "remove host block device",
75 .user_print = monitor_user_noop,
76 .mhandler.cmd_new = do_drive_del,
77 },
78
79 STEXI
80 @item drive_del @var{device}
81 @findex drive_del
82 Remove host block device. The result is that guest generated IO is no longer
83 submitted against the host device underlying the disk. Once a drive has
84 been deleted, the QEMU Block layer returns -EIO which results in IO
85 errors in the guest for applications that are reading/writing to the device.
86 ETEXI
87
88 {
89 .name = "change",
90 .args_type = "device:B,target:F,arg:s?",
91 .params = "device filename [format]",
92 .help = "change a removable medium, optional format",
93 .user_print = monitor_user_noop,
94 .mhandler.cmd_new = do_change,
95 },
96
97 STEXI
98 @item change @var{device} @var{setting}
99 @findex change
100
101 Change the configuration of a device.
102
103 @table @option
104 @item change @var{diskdevice} @var{filename} [@var{format}]
105 Change the medium for a removable disk device to point to @var{filename}. eg
106
107 @example
108 (qemu) change ide1-cd0 /path/to/some.iso
109 @end example
110
111 @var{format} is optional.
112
113 @item change vnc @var{display},@var{options}
114 Change the configuration of the VNC server. The valid syntax for @var{display}
115 and @var{options} are described at @ref{sec_invocation}. eg
116
117 @example
118 (qemu) change vnc localhost:1
119 @end example
120
121 @item change vnc password [@var{password}]
122
123 Change the password associated with the VNC server. If the new password is not
124 supplied, the monitor will prompt for it to be entered. VNC passwords are only
125 significant up to 8 letters. eg
126
127 @example
128 (qemu) change vnc password
129 Password: ********
130 @end example
131
132 @end table
133 ETEXI
134
135 {
136 .name = "screendump",
137 .args_type = "filename:F",
138 .params = "filename",
139 .help = "save screen into PPM image 'filename'",
140 .user_print = monitor_user_noop,
141 .mhandler.cmd_new = do_screen_dump,
142 },
143
144 STEXI
145 @item screendump @var{filename}
146 @findex screendump
147 Save screen into PPM image @var{filename}.
148 ETEXI
149
150 {
151 .name = "logfile",
152 .args_type = "filename:F",
153 .params = "filename",
154 .help = "output logs to 'filename'",
155 .mhandler.cmd = do_logfile,
156 },
157
158 STEXI
159 @item logfile @var{filename}
160 @findex logfile
161 Output logs to @var{filename}.
162 ETEXI
163
164 #ifdef CONFIG_SIMPLE_TRACE
165 {
166 .name = "trace-event",
167 .args_type = "name:s,option:b",
168 .params = "name on|off",
169 .help = "changes status of a specific trace event",
170 .mhandler.cmd = do_change_trace_event_state,
171 },
172
173 STEXI
174 @item trace-event
175 @findex trace-event
176 changes status of a trace event
177 ETEXI
178
179 {
180 .name = "trace-file",
181 .args_type = "op:s?,arg:F?",
182 .params = "on|off|flush|set [arg]",
183 .help = "open, close, or flush trace file, or set a new file name",
184 .mhandler.cmd = do_trace_file,
185 },
186
187 STEXI
188 @item trace-file on|off|flush
189 @findex trace-file
190 Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed.
191 ETEXI
192 #endif
193
194 {
195 .name = "log",
196 .args_type = "items:s",
197 .params = "item1[,...]",
198 .help = "activate logging of the specified items to '/tmp/qemu.log'",
199 .mhandler.cmd = do_log,
200 },
201
202 STEXI
203 @item log @var{item1}[,...]
204 @findex log
205 Activate logging of the specified items to @file{/tmp/qemu.log}.
206 ETEXI
207
208 {
209 .name = "savevm",
210 .args_type = "name:s?",
211 .params = "[tag|id]",
212 .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
213 .mhandler.cmd = do_savevm,
214 },
215
216 STEXI
217 @item savevm [@var{tag}|@var{id}]
218 @findex savevm
219 Create a snapshot of the whole virtual machine. If @var{tag} is
220 provided, it is used as human readable identifier. If there is already
221 a snapshot with the same tag or ID, it is replaced. More info at
222 @ref{vm_snapshots}.
223 ETEXI
224
225 {
226 .name = "loadvm",
227 .args_type = "name:s",
228 .params = "tag|id",
229 .help = "restore a VM snapshot from its tag or id",
230 .mhandler.cmd = do_loadvm,
231 },
232
233 STEXI
234 @item loadvm @var{tag}|@var{id}
235 @findex loadvm
236 Set the whole virtual machine to the snapshot identified by the tag
237 @var{tag} or the unique snapshot ID @var{id}.
238 ETEXI
239
240 {
241 .name = "delvm",
242 .args_type = "name:s",
243 .params = "tag|id",
244 .help = "delete a VM snapshot from its tag or id",
245 .mhandler.cmd = do_delvm,
246 },
247
248 STEXI
249 @item delvm @var{tag}|@var{id}
250 @findex delvm
251 Delete the snapshot identified by @var{tag} or @var{id}.
252 ETEXI
253
254 {
255 .name = "singlestep",
256 .args_type = "option:s?",
257 .params = "[on|off]",
258 .help = "run emulation in singlestep mode or switch to normal mode",
259 .mhandler.cmd = do_singlestep,
260 },
261
262 STEXI
263 @item singlestep [off]
264 @findex singlestep
265 Run the emulation in single step mode.
266 If called with option off, the emulation returns to normal mode.
267 ETEXI
268
269 {
270 .name = "stop",
271 .args_type = "",
272 .params = "",
273 .help = "stop emulation",
274 .user_print = monitor_user_noop,
275 .mhandler.cmd_new = do_stop,
276 },
277
278 STEXI
279 @item stop
280 @findex stop
281 Stop emulation.
282 ETEXI
283
284 {
285 .name = "c|cont",
286 .args_type = "",
287 .params = "",
288 .help = "resume emulation",
289 .user_print = monitor_user_noop,
290 .mhandler.cmd_new = do_cont,
291 },
292
293 STEXI
294 @item c or cont
295 @findex cont
296 Resume emulation.
297 ETEXI
298
299 {
300 .name = "gdbserver",
301 .args_type = "device:s?",
302 .params = "[device]",
303 .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
304 .mhandler.cmd = do_gdbserver,
305 },
306
307 STEXI
308 @item gdbserver [@var{port}]
309 @findex gdbserver
310 Start gdbserver session (default @var{port}=1234)
311 ETEXI
312
313 {
314 .name = "x",
315 .args_type = "fmt:/,addr:l",
316 .params = "/fmt addr",
317 .help = "virtual memory dump starting at 'addr'",
318 .mhandler.cmd = do_memory_dump,
319 },
320
321 STEXI
322 @item x/fmt @var{addr}
323 @findex x
324 Virtual memory dump starting at @var{addr}.
325 ETEXI
326
327 {
328 .name = "xp",
329 .args_type = "fmt:/,addr:l",
330 .params = "/fmt addr",
331 .help = "physical memory dump starting at 'addr'",
332 .mhandler.cmd = do_physical_memory_dump,
333 },
334
335 STEXI
336 @item xp /@var{fmt} @var{addr}
337 @findex xp
338 Physical memory dump starting at @var{addr}.
339
340 @var{fmt} is a format which tells the command how to format the
341 data. Its syntax is: @option{/@{count@}@{format@}@{size@}}
342
343 @table @var
344 @item count
345 is the number of items to be dumped.
346
347 @item format
348 can be x (hex), d (signed decimal), u (unsigned decimal), o (octal),
349 c (char) or i (asm instruction).
350
351 @item size
352 can be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86,
353 @code{h} or @code{w} can be specified with the @code{i} format to
354 respectively select 16 or 32 bit code instruction size.
355
356 @end table
357
358 Examples:
359 @itemize
360 @item
361 Dump 10 instructions at the current instruction pointer:
362 @example
363 (qemu) x/10i $eip
364 0x90107063: ret
365 0x90107064: sti
366 0x90107065: lea 0x0(%esi,1),%esi
367 0x90107069: lea 0x0(%edi,1),%edi
368 0x90107070: ret
369 0x90107071: jmp 0x90107080
370 0x90107073: nop
371 0x90107074: nop
372 0x90107075: nop
373 0x90107076: nop
374 @end example
375
376 @item
377 Dump 80 16 bit values at the start of the video memory.
378 @smallexample
379 (qemu) xp/80hx 0xb8000
380 0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42
381 0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41
382 0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72
383 0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73
384 0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20
385 0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720
386 0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
387 0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
388 0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
389 0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720
390 @end smallexample
391 @end itemize
392 ETEXI
393
394 {
395 .name = "p|print",
396 .args_type = "fmt:/,val:l",
397 .params = "/fmt expr",
398 .help = "print expression value (use $reg for CPU register access)",
399 .mhandler.cmd = do_print,
400 },
401
402 STEXI
403 @item p or print/@var{fmt} @var{expr}
404 @findex print
405
406 Print expression value. Only the @var{format} part of @var{fmt} is
407 used.
408 ETEXI
409
410 {
411 .name = "i",
412 .args_type = "fmt:/,addr:i,index:i.",
413 .params = "/fmt addr",
414 .help = "I/O port read",
415 .mhandler.cmd = do_ioport_read,
416 },
417
418 STEXI
419 Read I/O port.
420 ETEXI
421
422 {
423 .name = "o",
424 .args_type = "fmt:/,addr:i,val:i",
425 .params = "/fmt addr value",
426 .help = "I/O port write",
427 .mhandler.cmd = do_ioport_write,
428 },
429
430 STEXI
431 Write to I/O port.
432 ETEXI
433
434 {
435 .name = "sendkey",
436 .args_type = "string:s,hold_time:i?",
437 .params = "keys [hold_ms]",
438 .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
439 .mhandler.cmd = do_sendkey,
440 },
441
442 STEXI
443 @item sendkey @var{keys}
444 @findex sendkey
445
446 Send @var{keys} to the emulator. @var{keys} could be the name of the
447 key or @code{#} followed by the raw value in either decimal or hexadecimal
448 format. Use @code{-} to press several keys simultaneously. Example:
449 @example
450 sendkey ctrl-alt-f1
451 @end example
452
453 This command is useful to send keys that your graphical user interface
454 intercepts at low level, such as @code{ctrl-alt-f1} in X Window.
455 ETEXI
456
457 {
458 .name = "system_reset",
459 .args_type = "",
460 .params = "",
461 .help = "reset the system",
462 .user_print = monitor_user_noop,
463 .mhandler.cmd_new = do_system_reset,
464 },
465
466 STEXI
467 @item system_reset
468 @findex system_reset
469
470 Reset the system.
471 ETEXI
472
473 {
474 .name = "system_powerdown",
475 .args_type = "",
476 .params = "",
477 .help = "send system power down event",
478 .user_print = monitor_user_noop,
479 .mhandler.cmd_new = do_system_powerdown,
480 },
481
482 STEXI
483 @item system_powerdown
484 @findex system_powerdown
485
486 Power down the system (if supported).
487 ETEXI
488
489 {
490 .name = "sum",
491 .args_type = "start:i,size:i",
492 .params = "addr size",
493 .help = "compute the checksum of a memory region",
494 .mhandler.cmd = do_sum,
495 },
496
497 STEXI
498 @item sum @var{addr} @var{size}
499 @findex sum
500
501 Compute the checksum of a memory region.
502 ETEXI
503
504 {
505 .name = "usb_add",
506 .args_type = "devname:s",
507 .params = "device",
508 .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
509 .mhandler.cmd = do_usb_add,
510 },
511
512 STEXI
513 @item usb_add @var{devname}
514 @findex usb_add
515
516 Add the USB device @var{devname}. For details of available devices see
517 @ref{usb_devices}
518 ETEXI
519
520 {
521 .name = "usb_del",
522 .args_type = "devname:s",
523 .params = "device",
524 .help = "remove USB device 'bus.addr'",
525 .mhandler.cmd = do_usb_del,
526 },
527
528 STEXI
529 @item usb_del @var{devname}
530 @findex usb_del
531
532 Remove the USB device @var{devname} from the QEMU virtual USB
533 hub. @var{devname} has the syntax @code{bus.addr}. Use the monitor
534 command @code{info usb} to see the devices you can remove.
535 ETEXI
536
537 {
538 .name = "device_add",
539 .args_type = "device:O",
540 .params = "driver[,prop=value][,...]",
541 .help = "add device, like -device on the command line",
542 .user_print = monitor_user_noop,
543 .mhandler.cmd_new = do_device_add,
544 },
545
546 STEXI
547 @item device_add @var{config}
548 @findex device_add
549
550 Add device.
551 ETEXI
552
553 {
554 .name = "device_del",
555 .args_type = "id:s",
556 .params = "device",
557 .help = "remove device",
558 .user_print = monitor_user_noop,
559 .mhandler.cmd_new = do_device_del,
560 },
561
562 STEXI
563 @item device_del @var{id}
564 @findex device_del
565
566 Remove device @var{id}.
567 ETEXI
568
569 {
570 .name = "cpu",
571 .args_type = "index:i",
572 .params = "index",
573 .help = "set the default CPU",
574 .user_print = monitor_user_noop,
575 .mhandler.cmd_new = do_cpu_set,
576 },
577
578 STEXI
579 @item cpu @var{index}
580 @findex cpu
581 Set the default CPU.
582 ETEXI
583
584 {
585 .name = "mouse_move",
586 .args_type = "dx_str:s,dy_str:s,dz_str:s?",
587 .params = "dx dy [dz]",
588 .help = "send mouse move events",
589 .mhandler.cmd = do_mouse_move,
590 },
591
592 STEXI
593 @item mouse_move @var{dx} @var{dy} [@var{dz}]
594 @findex mouse_move
595 Move the active mouse to the specified coordinates @var{dx} @var{dy}
596 with optional scroll axis @var{dz}.
597 ETEXI
598
599 {
600 .name = "mouse_button",
601 .args_type = "button_state:i",
602 .params = "state",
603 .help = "change mouse button state (1=L, 2=M, 4=R)",
604 .mhandler.cmd = do_mouse_button,
605 },
606
607 STEXI
608 @item mouse_button @var{val}
609 @findex mouse_button
610 Change the active mouse button state @var{val} (1=L, 2=M, 4=R).
611 ETEXI
612
613 {
614 .name = "mouse_set",
615 .args_type = "index:i",
616 .params = "index",
617 .help = "set which mouse device receives events",
618 .mhandler.cmd = do_mouse_set,
619 },
620
621 STEXI
622 @item mouse_set @var{index}
623 @findex mouse_set
624 Set which mouse device receives events at given @var{index}, index
625 can be obtained with
626 @example
627 info mice
628 @end example
629 ETEXI
630
631 #ifdef HAS_AUDIO
632 {
633 .name = "wavcapture",
634 .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
635 .params = "path [frequency [bits [channels]]]",
636 .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
637 .mhandler.cmd = do_wav_capture,
638 },
639 #endif
640 STEXI
641 @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
642 @findex wavcapture
643 Capture audio into @var{filename}. Using sample rate @var{frequency}
644 bits per sample @var{bits} and number of channels @var{channels}.
645
646 Defaults:
647 @itemize @minus
648 @item Sample rate = 44100 Hz - CD quality
649 @item Bits = 16
650 @item Number of channels = 2 - Stereo
651 @end itemize
652 ETEXI
653
654 #ifdef HAS_AUDIO
655 {
656 .name = "stopcapture",
657 .args_type = "n:i",
658 .params = "capture index",
659 .help = "stop capture",
660 .mhandler.cmd = do_stop_capture,
661 },
662 #endif
663 STEXI
664 @item stopcapture @var{index}
665 @findex stopcapture
666 Stop capture with a given @var{index}, index can be obtained with
667 @example
668 info capture
669 @end example
670 ETEXI
671
672 {
673 .name = "memsave",
674 .args_type = "val:l,size:i,filename:s",
675 .params = "addr size file",
676 .help = "save to disk virtual memory dump starting at 'addr' of size 'size'",
677 .user_print = monitor_user_noop,
678 .mhandler.cmd_new = do_memory_save,
679 },
680
681 STEXI
682 @item memsave @var{addr} @var{size} @var{file}
683 @findex memsave
684 save to disk virtual memory dump starting at @var{addr} of size @var{size}.
685 ETEXI
686
687 {
688 .name = "pmemsave",
689 .args_type = "val:l,size:i,filename:s",
690 .params = "addr size file",
691 .help = "save to disk physical memory dump starting at 'addr' of size 'size'",
692 .user_print = monitor_user_noop,
693 .mhandler.cmd_new = do_physical_memory_save,
694 },
695
696 STEXI
697 @item pmemsave @var{addr} @var{size} @var{file}
698 @findex pmemsave
699 save to disk physical memory dump starting at @var{addr} of size @var{size}.
700 ETEXI
701
702 {
703 .name = "boot_set",
704 .args_type = "bootdevice:s",
705 .params = "bootdevice",
706 .help = "define new values for the boot device list",
707 .mhandler.cmd = do_boot_set,
708 },
709
710 STEXI
711 @item boot_set @var{bootdevicelist}
712 @findex boot_set
713
714 Define new values for the boot device list. Those values will override
715 the values specified on the command line through the @code{-boot} option.
716
717 The values that can be specified here depend on the machine type, but are
718 the same that can be specified in the @code{-boot} command line option.
719 ETEXI
720
721 #if defined(TARGET_I386)
722 {
723 .name = "nmi",
724 .args_type = "cpu_index:i",
725 .params = "cpu",
726 .help = "inject an NMI on the given CPU",
727 .mhandler.cmd = do_inject_nmi,
728 },
729 #endif
730 STEXI
731 @item nmi @var{cpu}
732 @findex nmi
733 Inject an NMI on the given CPU (x86 only).
734 ETEXI
735
736 {
737 .name = "migrate",
738 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
739 .params = "[-d] [-b] [-i] uri",
740 .help = "migrate to URI (using -d to not wait for completion)"
741 "\n\t\t\t -b for migration without shared storage with"
742 " full copy of disk\n\t\t\t -i for migration without "
743 "shared storage with incremental copy of disk "
744 "(base image shared between src and destination)",
745 .user_print = monitor_user_noop,
746 .mhandler.cmd_new = do_migrate,
747 },
748
749
750 STEXI
751 @item migrate [-d] [-b] [-i] @var{uri}
752 @findex migrate
753 Migrate to @var{uri} (using -d to not wait for completion).
754 -b for migration with full copy of disk
755 -i for migration with incremental copy of disk (base image is shared)
756 ETEXI
757
758 {
759 .name = "migrate_cancel",
760 .args_type = "",
761 .params = "",
762 .help = "cancel the current VM migration",
763 .user_print = monitor_user_noop,
764 .mhandler.cmd_new = do_migrate_cancel,
765 },
766
767 STEXI
768 @item migrate_cancel
769 @findex migrate_cancel
770 Cancel the current VM migration.
771 ETEXI
772
773 {
774 .name = "migrate_set_speed",
775 .args_type = "value:o",
776 .params = "value",
777 .help = "set maximum speed (in bytes) for migrations. "
778 "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
779 .user_print = monitor_user_noop,
780 .mhandler.cmd_new = do_migrate_set_speed,
781 },
782
783 STEXI
784 @item migrate_set_speed @var{value}
785 @findex migrate_set_speed
786 Set maximum speed to @var{value} (in bytes) for migrations.
787 ETEXI
788
789 {
790 .name = "migrate_set_downtime",
791 .args_type = "value:T",
792 .params = "value",
793 .help = "set maximum tolerated downtime (in seconds) for migrations",
794 .user_print = monitor_user_noop,
795 .mhandler.cmd_new = do_migrate_set_downtime,
796 },
797
798 STEXI
799 @item migrate_set_downtime @var{second}
800 @findex migrate_set_downtime
801 Set maximum tolerated downtime (in seconds) for migration.
802 ETEXI
803
804 {
805 .name = "snapshot_blkdev",
806 .args_type = "device:s,snapshot_file:s?,format:s?",
807 .params = "device [new-image-file] [format]",
808 .help = "initiates a live snapshot\n\t\t\t"
809 "of device. If a new image file is specified, the\n\t\t\t"
810 "new image file will become the new root image.\n\t\t\t"
811 "If format is specified, the snapshot file will\n\t\t\t"
812 "be created in that format. Otherwise the\n\t\t\t"
813 "snapshot will be internal! (currently unsupported)",
814 .mhandler.cmd_new = do_snapshot_blkdev,
815 },
816
817 STEXI
818 @item snapshot_blkdev
819 @findex snapshot_blkdev
820 Snapshot device, using snapshot file as target if provided
821 ETEXI
822
823 #if defined(TARGET_I386)
824 {
825 .name = "drive_add",
826 .args_type = "pci_addr:s,opts:s",
827 .params = "[[<domain>:]<bus>:]<slot>\n"
828 "[file=file][,if=type][,bus=n]\n"
829 "[,unit=m][,media=d][index=i]\n"
830 "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
831 "[snapshot=on|off][,cache=on|off]",
832 .help = "add drive to PCI storage controller",
833 .mhandler.cmd = drive_hot_add,
834 },
835 #endif
836
837 STEXI
838 @item drive_add
839 @findex drive_add
840 Add drive to PCI storage controller.
841 ETEXI
842
843 #if defined(TARGET_I386)
844 {
845 .name = "pci_add",
846 .args_type = "pci_addr:s,type:s,opts:s?",
847 .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
848 .help = "hot-add PCI device",
849 .mhandler.cmd = pci_device_hot_add,
850 },
851 #endif
852
853 STEXI
854 @item pci_add
855 @findex pci_add
856 Hot-add PCI device.
857 ETEXI
858
859 #if defined(TARGET_I386)
860 {
861 .name = "pci_del",
862 .args_type = "pci_addr:s",
863 .params = "[[<domain>:]<bus>:]<slot>",
864 .help = "hot remove PCI device",
865 .mhandler.cmd = do_pci_device_hot_remove,
866 },
867 #endif
868
869 STEXI
870 @item pci_del
871 @findex pci_del
872 Hot remove PCI device.
873 ETEXI
874
875 {
876 .name = "pcie_aer_inject_error",
877 .args_type = "advisory_non_fatal:-a,correctable:-c,"
878 "id:s,error_status:s,"
879 "header0:i?,header1:i?,header2:i?,header3:i?,"
880 "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
881 .params = "[-a] [-c] id "
882 "<error_status> [<tlp header> [<tlp header prefix>]]",
883 .help = "inject pcie aer error\n\t\t\t"
884 " -a for advisory non fatal error\n\t\t\t"
885 " -c for correctable error\n\t\t\t"
886 "<id> = qdev device id\n\t\t\t"
887 "<error_status> = error string or 32bit\n\t\t\t"
888 "<tlb header> = 32bit x 4\n\t\t\t"
889 "<tlb header prefix> = 32bit x 4",
890 .user_print = pcie_aer_inject_error_print,
891 .mhandler.cmd_new = do_pcie_aer_inejct_error,
892 },
893
894 STEXI
895 @item pcie_aer_inject_error
896 @findex pcie_aer_inject_error
897 Inject PCIe AER error
898 ETEXI
899
900 {
901 .name = "host_net_add",
902 .args_type = "device:s,opts:s?",
903 .params = "tap|user|socket|vde|dump [options]",
904 .help = "add host VLAN client",
905 .mhandler.cmd = net_host_device_add,
906 },
907
908 STEXI
909 @item host_net_add
910 @findex host_net_add
911 Add host VLAN client.
912 ETEXI
913
914 {
915 .name = "host_net_remove",
916 .args_type = "vlan_id:i,device:s",
917 .params = "vlan_id name",
918 .help = "remove host VLAN client",
919 .mhandler.cmd = net_host_device_remove,
920 },
921
922 STEXI
923 @item host_net_remove
924 @findex host_net_remove
925 Remove host VLAN client.
926 ETEXI
927
928 {
929 .name = "netdev_add",
930 .args_type = "netdev:O",
931 .params = "[user|tap|socket],id=str[,prop=value][,...]",
932 .help = "add host network device",
933 .user_print = monitor_user_noop,
934 .mhandler.cmd_new = do_netdev_add,
935 },
936
937 STEXI
938 @item netdev_add
939 @findex netdev_add
940 Add host network device.
941 ETEXI
942
943 {
944 .name = "netdev_del",
945 .args_type = "id:s",
946 .params = "id",
947 .help = "remove host network device",
948 .user_print = monitor_user_noop,
949 .mhandler.cmd_new = do_netdev_del,
950 },
951
952 STEXI
953 @item netdev_del
954 @findex netdev_del
955 Remove host network device.
956 ETEXI
957
958 #ifdef CONFIG_SLIRP
959 {
960 .name = "hostfwd_add",
961 .args_type = "arg1:s,arg2:s?,arg3:s?",
962 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
963 .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
964 .mhandler.cmd = net_slirp_hostfwd_add,
965 },
966 #endif
967 STEXI
968 @item hostfwd_add
969 @findex hostfwd_add
970 Redirect TCP or UDP connections from host to guest (requires -net user).
971 ETEXI
972
973 #ifdef CONFIG_SLIRP
974 {
975 .name = "hostfwd_remove",
976 .args_type = "arg1:s,arg2:s?,arg3:s?",
977 .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
978 .help = "remove host-to-guest TCP or UDP redirection",
979 .mhandler.cmd = net_slirp_hostfwd_remove,
980 },
981
982 #endif
983 STEXI
984 @item hostfwd_remove
985 @findex hostfwd_remove
986 Remove host-to-guest TCP or UDP redirection.
987 ETEXI
988
989 {
990 .name = "balloon",
991 .args_type = "value:M",
992 .params = "target",
993 .help = "request VM to change its memory allocation (in MB)",
994 .user_print = monitor_user_noop,
995 .mhandler.cmd_async = do_balloon,
996 .flags = MONITOR_CMD_ASYNC,
997 },
998
999 STEXI
1000 @item balloon @var{value}
1001 @findex balloon
1002 Request VM to change its memory allocation to @var{value} (in MB).
1003 ETEXI
1004
1005 {
1006 .name = "set_link",
1007 .args_type = "name:s,up:b",
1008 .params = "name on|off",
1009 .help = "change the link status of a network adapter",
1010 .user_print = monitor_user_noop,
1011 .mhandler.cmd_new = do_set_link,
1012 },
1013
1014 STEXI
1015 @item set_link @var{name} [on|off]
1016 @findex set_link
1017 Switch link @var{name} on (i.e. up) or off (i.e. down).
1018 ETEXI
1019
1020 {
1021 .name = "watchdog_action",
1022 .args_type = "action:s",
1023 .params = "[reset|shutdown|poweroff|pause|debug|none]",
1024 .help = "change watchdog action",
1025 .mhandler.cmd = do_watchdog_action,
1026 },
1027
1028 STEXI
1029 @item watchdog_action
1030 @findex watchdog_action
1031 Change watchdog action.
1032 ETEXI
1033
1034 {
1035 .name = "acl_show",
1036 .args_type = "aclname:s",
1037 .params = "aclname",
1038 .help = "list rules in the access control list",
1039 .mhandler.cmd = do_acl_show,
1040 },
1041
1042 STEXI
1043 @item acl_show @var{aclname}
1044 @findex acl_show
1045 List all the matching rules in the access control list, and the default
1046 policy. There are currently two named access control lists,
1047 @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
1048 certificate distinguished name, and SASL username respectively.
1049 ETEXI
1050
1051 {
1052 .name = "acl_policy",
1053 .args_type = "aclname:s,policy:s",
1054 .params = "aclname allow|deny",
1055 .help = "set default access control list policy",
1056 .mhandler.cmd = do_acl_policy,
1057 },
1058
1059 STEXI
1060 @item acl_policy @var{aclname} @code{allow|deny}
1061 @findex acl_policy
1062 Set the default access control list policy, used in the event that
1063 none of the explicit rules match. The default policy at startup is
1064 always @code{deny}.
1065 ETEXI
1066
1067 {
1068 .name = "acl_add",
1069 .args_type = "aclname:s,match:s,policy:s,index:i?",
1070 .params = "aclname match allow|deny [index]",
1071 .help = "add a match rule to the access control list",
1072 .mhandler.cmd = do_acl_add,
1073 },
1074
1075 STEXI
1076 @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
1077 @findex acl_add
1078 Add a match rule to the access control list, allowing or denying access.
1079 The match will normally be an exact username or x509 distinguished name,
1080 but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
1081 allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
1082 normally be appended to the end of the ACL, but can be inserted
1083 earlier in the list if the optional @var{index} parameter is supplied.
1084 ETEXI
1085
1086 {
1087 .name = "acl_remove",
1088 .args_type = "aclname:s,match:s",
1089 .params = "aclname match",
1090 .help = "remove a match rule from the access control list",
1091 .mhandler.cmd = do_acl_remove,
1092 },
1093
1094 STEXI
1095 @item acl_remove @var{aclname} @var{match}
1096 @findex acl_remove
1097 Remove the specified match rule from the access control list.
1098 ETEXI
1099
1100 {
1101 .name = "acl_reset",
1102 .args_type = "aclname:s",
1103 .params = "aclname",
1104 .help = "reset the access control list",
1105 .mhandler.cmd = do_acl_reset,
1106 },
1107
1108 STEXI
1109 @item acl_reset @var{aclname}
1110 @findex acl_reset
1111 Remove all matches from the access control list, and set the default
1112 policy back to @code{deny}.
1113 ETEXI
1114
1115 #if defined(TARGET_I386)
1116
1117 {
1118 .name = "mce",
1119 .args_type = "cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
1120 .params = "cpu bank status mcgstatus addr misc",
1121 .help = "inject a MCE on the given CPU",
1122 .mhandler.cmd = do_inject_mce,
1123 },
1124
1125 #endif
1126 STEXI
1127 @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
1128 @findex mce (x86)
1129 Inject an MCE on the given CPU (x86 only).
1130 ETEXI
1131
1132 {
1133 .name = "getfd",
1134 .args_type = "fdname:s",
1135 .params = "getfd name",
1136 .help = "receive a file descriptor via SCM rights and assign it a name",
1137 .user_print = monitor_user_noop,
1138 .mhandler.cmd_new = do_getfd,
1139 },
1140
1141 STEXI
1142 @item getfd @var{fdname}
1143 @findex getfd
1144 If a file descriptor is passed alongside this command using the SCM_RIGHTS
1145 mechanism on unix sockets, it is stored using the name @var{fdname} for
1146 later use by other monitor commands.
1147 ETEXI
1148
1149 {
1150 .name = "closefd",
1151 .args_type = "fdname:s",
1152 .params = "closefd name",
1153 .help = "close a file descriptor previously passed via SCM rights",
1154 .user_print = monitor_user_noop,
1155 .mhandler.cmd_new = do_closefd,
1156 },
1157
1158 STEXI
1159 @item closefd @var{fdname}
1160 @findex closefd
1161 Close the file descriptor previously assigned to @var{fdname} using the
1162 @code{getfd} command. This is only needed if the file descriptor was never
1163 used by another monitor command.
1164 ETEXI
1165
1166 {
1167 .name = "block_passwd",
1168 .args_type = "device:B,password:s",
1169 .params = "block_passwd device password",
1170 .help = "set the password of encrypted block devices",
1171 .user_print = monitor_user_noop,
1172 .mhandler.cmd_new = do_block_set_passwd,
1173 },
1174
1175 STEXI
1176 @item block_passwd @var{device} @var{password}
1177 @findex block_passwd
1178 Set the encrypted device @var{device} password to @var{password}
1179 ETEXI
1180
1181 {
1182 .name = "set_password",
1183 .args_type = "protocol:s,password:s,connected:s?",
1184 .params = "protocol password action-if-connected",
1185 .help = "set spice/vnc password",
1186 .user_print = monitor_user_noop,
1187 .mhandler.cmd_new = set_password,
1188 },
1189
1190 STEXI
1191 @item set_password [ vnc | spice ] password [ action-if-connected ]
1192 @findex set_password
1193
1194 Change spice/vnc password. Use zero to make the password stay valid
1195 forever. @var{action-if-connected} specifies what should happen in
1196 case a connection is established: @var{fail} makes the password change
1197 fail. @var{disconnect} changes the password and disconnects the
1198 client. @var{keep} changes the password and keeps the connection up.
1199 @var{keep} is the default.
1200 ETEXI
1201
1202 {
1203 .name = "expire_password",
1204 .args_type = "protocol:s,time:s",
1205 .params = "protocol time",
1206 .help = "set spice/vnc password expire-time",
1207 .user_print = monitor_user_noop,
1208 .mhandler.cmd_new = expire_password,
1209 },
1210
1211 STEXI
1212 @item expire_password [ vnc | spice ] expire-time
1213 @findex expire_password
1214
1215 Specify when a password for spice/vnc becomes
1216 invalid. @var{expire-time} accepts:
1217
1218 @table @var
1219 @item now
1220 Invalidate password instantly.
1221
1222 @item never
1223 Password stays valid forever.
1224
1225 @item +nsec
1226 Password stays valid for @var{nsec} seconds starting now.
1227
1228 @item nsec
1229 Password is invalidated at the given time. @var{nsec} are the seconds
1230 passed since 1970, i.e. unix epoch.
1231
1232 @end table
1233 ETEXI
1234
1235 {
1236 .name = "info",
1237 .args_type = "item:s?",
1238 .params = "[subcommand]",
1239 .help = "show various information about the system state",
1240 .mhandler.cmd = do_info,
1241 },
1242
1243 STEXI
1244 @item info @var{subcommand}
1245 @findex info
1246 Show various information about the system state.
1247
1248 @table @option
1249 @item info version
1250 show the version of QEMU
1251 @item info network
1252 show the various VLANs and the associated devices
1253 @item info chardev
1254 show the character devices
1255 @item info block
1256 show the block devices
1257 @item info blockstats
1258 show block device statistics
1259 @item info registers
1260 show the cpu registers
1261 @item info cpus
1262 show infos for each CPU
1263 @item info history
1264 show the command line history
1265 @item info irq
1266 show the interrupts statistics (if available)
1267 @item info pic
1268 show i8259 (PIC) state
1269 @item info pci
1270 show emulated PCI device info
1271 @item info tlb
1272 show virtual to physical memory mappings (i386, SH4 and SPARC only)
1273 @item info mem
1274 show the active virtual memory mappings (i386 only)
1275 @item info jit
1276 show dynamic compiler info
1277 @item info kvm
1278 show KVM information
1279 @item info numa
1280 show NUMA information
1281 @item info kvm
1282 show KVM information
1283 @item info usb
1284 show USB devices plugged on the virtual USB hub
1285 @item info usbhost
1286 show all USB host devices
1287 @item info profile
1288 show profiling information
1289 @item info capture
1290 show information about active capturing
1291 @item info snapshots
1292 show list of VM snapshots
1293 @item info status
1294 show the current VM status (running|paused)
1295 @item info pcmcia
1296 show guest PCMCIA status
1297 @item info mice
1298 show which guest mouse is receiving events
1299 @item info vnc
1300 show the vnc server status
1301 @item info name
1302 show the current VM name
1303 @item info uuid
1304 show the current VM UUID
1305 @item info cpustats
1306 show CPU statistics
1307 @item info usernet
1308 show user network stack connection states
1309 @item info migrate
1310 show migration status
1311 @item info balloon
1312 show balloon information
1313 @item info qtree
1314 show device tree
1315 @item info qdm
1316 show qdev device model list
1317 @item info roms
1318 show roms
1319 @end table
1320 ETEXI
1321
1322 #ifdef CONFIG_SIMPLE_TRACE
1323 STEXI
1324 @item info trace
1325 show contents of trace buffer
1326 @item info trace-events
1327 show available trace events and their state
1328 ETEXI
1329 #endif
1330
1331 STEXI
1332 @end table
1333 ETEXI