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