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