12313086aSBlue SwirlHXCOMM Use DEFHEADING() to define headings in both help text and texi 22313086aSBlue SwirlHXCOMM Text between STEXI and ETEXI are copied to texi version and 32313086aSBlue SwirlHXCOMM discarded from C version 42313086aSBlue SwirlHXCOMM DEF(command, args, callback, arg_string, help) is used to construct 52313086aSBlue SwirlHXCOMM monitor commands 62313086aSBlue SwirlHXCOMM HXCOMM can be used for comments, discarded from both texi and C 72313086aSBlue Swirl 82313086aSBlue SwirlSTEXI 92313086aSBlue Swirl@table @option 102313086aSBlue SwirlETEXI 112313086aSBlue Swirl 12d7f9b689SLuiz Capitulino { 13d7f9b689SLuiz Capitulino .name = "help|?", 14129be006SWenchao Xia .args_type = "name:S?", 15d7f9b689SLuiz Capitulino .params = "[cmd]", 16d7f9b689SLuiz Capitulino .help = "show the help", 172b9e3576SMarc-André Lureau .cmd = do_help_cmd, 1831785f1bSDr. David Alan Gilbert .flags = "p", 19d7f9b689SLuiz Capitulino }, 20d7f9b689SLuiz Capitulino 212313086aSBlue SwirlSTEXI 222313086aSBlue Swirl@item help or ? [@var{cmd}] 2370fcbbe7SStefan Weil@findex help 242313086aSBlue SwirlShow the help for all commands or just for command @var{cmd}. 252313086aSBlue SwirlETEXI 262313086aSBlue Swirl 27d7f9b689SLuiz Capitulino { 28d7f9b689SLuiz Capitulino .name = "commit", 29d7f9b689SLuiz Capitulino .args_type = "device:B", 30d7f9b689SLuiz Capitulino .params = "device|all", 31d7f9b689SLuiz Capitulino .help = "commit changes to the disk images (if -snapshot is used) or backing files", 322b9e3576SMarc-André Lureau .cmd = hmp_commit, 33d7f9b689SLuiz Capitulino }, 34d7f9b689SLuiz Capitulino 352313086aSBlue SwirlSTEXI 362313086aSBlue Swirl@item commit 3770fcbbe7SStefan Weil@findex commit 382313086aSBlue SwirlCommit changes to the disk images (if -snapshot is used) or backing files. 3937222900SJeff CodyIf the backing file is smaller than the snapshot, then the backing file will be 4037222900SJeff Codyresized to be the same size as the snapshot. If the snapshot is smaller than 4137222900SJeff Codythe backing file, the backing file will not be truncated. If you want the 4237222900SJeff Codybacking file to match the size of the smaller snapshot, you can safely truncate 4337222900SJeff Codyit yourself once the commit operation successfully completes. 442313086aSBlue SwirlETEXI 452313086aSBlue Swirl 46d7f9b689SLuiz Capitulino { 47d7f9b689SLuiz Capitulino .name = "q|quit", 48d7f9b689SLuiz Capitulino .args_type = "", 49d7f9b689SLuiz Capitulino .params = "", 50d7f9b689SLuiz Capitulino .help = "quit the emulator", 512b9e3576SMarc-André Lureau .cmd = hmp_quit, 52d7f9b689SLuiz Capitulino }, 53d7f9b689SLuiz Capitulino 542313086aSBlue SwirlSTEXI 552313086aSBlue Swirl@item q or quit 5670fcbbe7SStefan Weil@findex quit 572313086aSBlue SwirlQuit the emulator. 582313086aSBlue SwirlETEXI 592313086aSBlue Swirl 60d7f9b689SLuiz Capitulino { 616d4a2b3aSChristoph Hellwig .name = "block_resize", 626d4a2b3aSChristoph Hellwig .args_type = "device:B,size:o", 636d4a2b3aSChristoph Hellwig .params = "device size", 646d4a2b3aSChristoph Hellwig .help = "resize a block image", 652b9e3576SMarc-André Lureau .cmd = hmp_block_resize, 666d4a2b3aSChristoph Hellwig }, 676d4a2b3aSChristoph Hellwig 686d4a2b3aSChristoph HellwigSTEXI 696d4a2b3aSChristoph Hellwig@item block_resize 706d4a2b3aSChristoph Hellwig@findex block_resize 716d4a2b3aSChristoph HellwigResize a block image while a guest is running. Usually requires guest 726d4a2b3aSChristoph Hellwigaction to see the updated size. Resize to a lower size is supported, 736d4a2b3aSChristoph Hellwigbut should be used with extreme caution. Note that this command only 746d4a2b3aSChristoph Hellwigresizes image files, it can not resize block devices like LVM volumes. 756d4a2b3aSChristoph HellwigETEXI 766d4a2b3aSChristoph Hellwig 7712bd451fSStefan Hajnoczi { 7812bd451fSStefan Hajnoczi .name = "block_stream", 79c83c66c3SStefan Hajnoczi .args_type = "device:B,speed:o?,base:s?", 80c83c66c3SStefan Hajnoczi .params = "device [speed [base]]", 8112bd451fSStefan Hajnoczi .help = "copy data from a backing file into a block device", 822b9e3576SMarc-André Lureau .cmd = hmp_block_stream, 8312bd451fSStefan Hajnoczi }, 8412bd451fSStefan Hajnoczi 8512bd451fSStefan HajnocziSTEXI 8612bd451fSStefan Hajnoczi@item block_stream 8712bd451fSStefan Hajnoczi@findex block_stream 8812bd451fSStefan HajnocziCopy data from a backing file into a block device. 8912bd451fSStefan HajnocziETEXI 906d4a2b3aSChristoph Hellwig 916d4a2b3aSChristoph Hellwig { 922d47c6e9SStefan Hajnoczi .name = "block_job_set_speed", 93882ec7ceSStefan Hajnoczi .args_type = "device:B,speed:o", 94882ec7ceSStefan Hajnoczi .params = "device speed", 952d47c6e9SStefan Hajnoczi .help = "set maximum speed for a background block operation", 962b9e3576SMarc-André Lureau .cmd = hmp_block_job_set_speed, 972d47c6e9SStefan Hajnoczi }, 982d47c6e9SStefan Hajnoczi 992d47c6e9SStefan HajnocziSTEXI 1004451b799SPaolo Bonzini@item block_job_set_speed 1014451b799SPaolo Bonzini@findex block_job_set_speed 1022d47c6e9SStefan HajnocziSet maximum speed for a background block operation. 1032d47c6e9SStefan HajnocziETEXI 1042d47c6e9SStefan Hajnoczi 1052d47c6e9SStefan Hajnoczi { 106370521a1SStefan Hajnoczi .name = "block_job_cancel", 1076e37fb81SPaolo Bonzini .args_type = "force:-f,device:B", 1086e37fb81SPaolo Bonzini .params = "[-f] device", 1096e37fb81SPaolo Bonzini .help = "stop an active background block operation (use -f" 110b76e4458SLiang Li "\n\t\t\t if you want to abort the operation immediately" 111b76e4458SLiang Li "\n\t\t\t instead of keep running until data is in sync)", 1122b9e3576SMarc-André Lureau .cmd = hmp_block_job_cancel, 113370521a1SStefan Hajnoczi }, 114370521a1SStefan Hajnoczi 115370521a1SStefan HajnocziSTEXI 116370521a1SStefan Hajnoczi@item block_job_cancel 117370521a1SStefan Hajnoczi@findex block_job_cancel 118aeae883bSPaolo BonziniStop an active background block operation (streaming, mirroring). 119aeae883bSPaolo BonziniETEXI 120aeae883bSPaolo Bonzini 121aeae883bSPaolo Bonzini { 122aeae883bSPaolo Bonzini .name = "block_job_complete", 123aeae883bSPaolo Bonzini .args_type = "device:B", 124aeae883bSPaolo Bonzini .params = "device", 125aeae883bSPaolo Bonzini .help = "stop an active background block operation", 1262b9e3576SMarc-André Lureau .cmd = hmp_block_job_complete, 127aeae883bSPaolo Bonzini }, 128aeae883bSPaolo Bonzini 129aeae883bSPaolo BonziniSTEXI 130aeae883bSPaolo Bonzini@item block_job_complete 131aeae883bSPaolo Bonzini@findex block_job_complete 132aeae883bSPaolo BonziniManually trigger completion of an active background block operation. 133aeae883bSPaolo BonziniFor mirroring, this will switch the device to the destination path. 134370521a1SStefan HajnocziETEXI 135370521a1SStefan Hajnoczi 136370521a1SStefan Hajnoczi { 1376e37fb81SPaolo Bonzini .name = "block_job_pause", 1386e37fb81SPaolo Bonzini .args_type = "device:B", 1396e37fb81SPaolo Bonzini .params = "device", 1406e37fb81SPaolo Bonzini .help = "pause an active background block operation", 1412b9e3576SMarc-André Lureau .cmd = hmp_block_job_pause, 1426e37fb81SPaolo Bonzini }, 1436e37fb81SPaolo Bonzini 1446e37fb81SPaolo BonziniSTEXI 1456e37fb81SPaolo Bonzini@item block_job_pause 1466e37fb81SPaolo Bonzini@findex block_job_pause 1476e37fb81SPaolo BonziniPause an active block streaming operation. 1486e37fb81SPaolo BonziniETEXI 1496e37fb81SPaolo Bonzini 1506e37fb81SPaolo Bonzini { 1516e37fb81SPaolo Bonzini .name = "block_job_resume", 1526e37fb81SPaolo Bonzini .args_type = "device:B", 1536e37fb81SPaolo Bonzini .params = "device", 1546e37fb81SPaolo Bonzini .help = "resume a paused background block operation", 1552b9e3576SMarc-André Lureau .cmd = hmp_block_job_resume, 1566e37fb81SPaolo Bonzini }, 1576e37fb81SPaolo Bonzini 1586e37fb81SPaolo BonziniSTEXI 1596e37fb81SPaolo Bonzini@item block_job_resume 1606e37fb81SPaolo Bonzini@findex block_job_resume 1616e37fb81SPaolo BonziniResume a paused block streaming operation. 1626e37fb81SPaolo BonziniETEXI 1636e37fb81SPaolo Bonzini 1646e37fb81SPaolo Bonzini { 165d7f9b689SLuiz Capitulino .name = "eject", 16678d714e0SLuiz Capitulino .args_type = "force:-f,device:B", 167d7f9b689SLuiz Capitulino .params = "[-f] device", 168d7f9b689SLuiz Capitulino .help = "eject a removable medium (use -f to force it)", 1692b9e3576SMarc-André Lureau .cmd = hmp_eject, 170d7f9b689SLuiz Capitulino }, 171d7f9b689SLuiz Capitulino 1722313086aSBlue SwirlSTEXI 1732313086aSBlue Swirl@item eject [-f] @var{device} 17470fcbbe7SStefan Weil@findex eject 1752313086aSBlue SwirlEject a removable medium (use -f to force it). 1762313086aSBlue SwirlETEXI 1772313086aSBlue Swirl 178d7f9b689SLuiz Capitulino { 1799063f814SRyan Harper .name = "drive_del", 180f7bdc41aSHani Benhabiles .args_type = "id:B", 1819063f814SRyan Harper .params = "device", 1829063f814SRyan Harper .help = "remove host block device", 1832b9e3576SMarc-André Lureau .cmd = hmp_drive_del, 1849063f814SRyan Harper }, 1859063f814SRyan Harper 1869063f814SRyan HarperSTEXI 1879063f814SRyan Harper@item drive_del @var{device} 1889063f814SRyan Harper@findex drive_del 1899063f814SRyan HarperRemove host block device. The result is that guest generated IO is no longer 1909063f814SRyan Harpersubmitted against the host device underlying the disk. Once a drive has 1919063f814SRyan Harperbeen deleted, the QEMU Block layer returns -EIO which results in IO 1929063f814SRyan Harpererrors in the guest for applications that are reading/writing to the device. 193293c51a6SStefan HajnocziThese errors are always reported to the guest, regardless of the drive's error 194293c51a6SStefan Hajnocziactions (drive options rerror, werror). 1959063f814SRyan HarperETEXI 1969063f814SRyan Harper 1979063f814SRyan Harper { 198d7f9b689SLuiz Capitulino .name = "change", 199baead0abSMax Reitz .args_type = "device:B,target:F,arg:s?,read-only-mode:s?", 200baead0abSMax Reitz .params = "device filename [format [read-only-mode]]", 201d7f9b689SLuiz Capitulino .help = "change a removable medium, optional format", 2022b9e3576SMarc-André Lureau .cmd = hmp_change, 203d7f9b689SLuiz Capitulino }, 204d7f9b689SLuiz Capitulino 2052313086aSBlue SwirlSTEXI 2062313086aSBlue Swirl@item change @var{device} @var{setting} 20770fcbbe7SStefan Weil@findex change 2082313086aSBlue SwirlChange the configuration of a device. 2092313086aSBlue Swirl 2102313086aSBlue Swirl@table @option 211baead0abSMax Reitz@item change @var{diskdevice} @var{filename} [@var{format} [@var{read-only-mode}]] 2122313086aSBlue SwirlChange the medium for a removable disk device to point to @var{filename}. eg 2132313086aSBlue Swirl 2142313086aSBlue Swirl@example 2152313086aSBlue Swirl(qemu) change ide1-cd0 /path/to/some.iso 2162313086aSBlue Swirl@end example 2172313086aSBlue Swirl 2182313086aSBlue Swirl@var{format} is optional. 2192313086aSBlue Swirl 220baead0abSMax Reitz@var{read-only-mode} may be used to change the read-only status of the device. 221baead0abSMax ReitzIt accepts the following values: 222baead0abSMax Reitz 223baead0abSMax Reitz@table @var 224baead0abSMax Reitz@item retain 225baead0abSMax ReitzRetains the current status; this is the default. 226baead0abSMax Reitz 227baead0abSMax Reitz@item read-only 228baead0abSMax ReitzMakes the device read-only. 229baead0abSMax Reitz 230baead0abSMax Reitz@item read-write 231baead0abSMax ReitzMakes the device writable. 232baead0abSMax Reitz@end table 233baead0abSMax Reitz 2342313086aSBlue Swirl@item change vnc @var{display},@var{options} 2352313086aSBlue SwirlChange the configuration of the VNC server. The valid syntax for @var{display} 2362313086aSBlue Swirland @var{options} are described at @ref{sec_invocation}. eg 2372313086aSBlue Swirl 2382313086aSBlue Swirl@example 2392313086aSBlue Swirl(qemu) change vnc localhost:1 2402313086aSBlue Swirl@end example 2412313086aSBlue Swirl 2422313086aSBlue Swirl@item change vnc password [@var{password}] 2432313086aSBlue Swirl 2442313086aSBlue SwirlChange the password associated with the VNC server. If the new password is not 2452313086aSBlue Swirlsupplied, the monitor will prompt for it to be entered. VNC passwords are only 2462313086aSBlue Swirlsignificant up to 8 letters. eg 2472313086aSBlue Swirl 2482313086aSBlue Swirl@example 2492313086aSBlue Swirl(qemu) change vnc password 2502313086aSBlue SwirlPassword: ******** 2512313086aSBlue Swirl@end example 2522313086aSBlue Swirl 2532313086aSBlue Swirl@end table 2542313086aSBlue SwirlETEXI 2552313086aSBlue Swirl 256d7f9b689SLuiz Capitulino { 257d7f9b689SLuiz Capitulino .name = "screendump", 258f771c544SThomas Huth .args_type = "filename:F,device:s?,head:i?", 259f771c544SThomas Huth .params = "filename [device [head]]", 260f771c544SThomas Huth .help = "save screen from head 'head' of display device 'device' " 261f771c544SThomas Huth "into PPM image 'filename'", 2622b9e3576SMarc-André Lureau .cmd = hmp_screendump, 263d7f9b689SLuiz Capitulino }, 264d7f9b689SLuiz Capitulino 2652313086aSBlue SwirlSTEXI 2662313086aSBlue Swirl@item screendump @var{filename} 26770fcbbe7SStefan Weil@findex screendump 2682313086aSBlue SwirlSave screen into PPM image @var{filename}. 2692313086aSBlue SwirlETEXI 2702313086aSBlue Swirl 271d7f9b689SLuiz Capitulino { 272d7f9b689SLuiz Capitulino .name = "logfile", 273d7f9b689SLuiz Capitulino .args_type = "filename:F", 274d7f9b689SLuiz Capitulino .params = "filename", 275d7f9b689SLuiz Capitulino .help = "output logs to 'filename'", 2762b9e3576SMarc-André Lureau .cmd = hmp_logfile, 277d7f9b689SLuiz Capitulino }, 278d7f9b689SLuiz Capitulino 2792313086aSBlue SwirlSTEXI 2802313086aSBlue Swirl@item logfile @var{filename} 28170fcbbe7SStefan Weil@findex logfile 2822313086aSBlue SwirlOutput logs to @var{filename}. 2832313086aSBlue SwirlETEXI 2842313086aSBlue Swirl 28522890ab5SPrerna Saxena { 28622890ab5SPrerna Saxena .name = "trace-event", 28777e2b172SLluís Vilanova .args_type = "name:s,option:b,vcpu:i?", 28877e2b172SLluís Vilanova .params = "name on|off [vcpu]", 28977e2b172SLluís Vilanova .help = "changes status of a specific trace event " 29077e2b172SLluís Vilanova "(vcpu: vCPU to set, default is all)", 2912b9e3576SMarc-André Lureau .cmd = hmp_trace_event, 292987bd270SDr. David Alan Gilbert .command_completion = trace_event_completion, 29322890ab5SPrerna Saxena }, 29422890ab5SPrerna Saxena 29522890ab5SPrerna SaxenaSTEXI 29622890ab5SPrerna Saxena@item trace-event 29722890ab5SPrerna Saxena@findex trace-event 29822890ab5SPrerna Saxenachanges status of a trace event 29922890ab5SPrerna SaxenaETEXI 300c5ceb523SStefan Hajnoczi 301c45a8168SMichael Roth#if defined(CONFIG_TRACE_SIMPLE) 302c5ceb523SStefan Hajnoczi { 303c5ceb523SStefan Hajnoczi .name = "trace-file", 304c5ceb523SStefan Hajnoczi .args_type = "op:s?,arg:F?", 305c5ceb523SStefan Hajnoczi .params = "on|off|flush|set [arg]", 306c5ceb523SStefan Hajnoczi .help = "open, close, or flush trace file, or set a new file name", 3072b9e3576SMarc-André Lureau .cmd = hmp_trace_file, 308c5ceb523SStefan Hajnoczi }, 309c5ceb523SStefan Hajnoczi 310c5ceb523SStefan HajnocziSTEXI 311c5ceb523SStefan Hajnoczi@item trace-file on|off|flush 312c5ceb523SStefan Hajnoczi@findex trace-file 313c5ceb523SStefan HajnocziOpen, close, or flush the trace file. If no argument is given, the status of the trace file is displayed. 314c5ceb523SStefan HajnocziETEXI 31522890ab5SPrerna Saxena#endif 31622890ab5SPrerna Saxena 317d7f9b689SLuiz Capitulino { 318d7f9b689SLuiz Capitulino .name = "log", 319d7f9b689SLuiz Capitulino .args_type = "items:s", 320d7f9b689SLuiz Capitulino .params = "item1[,...]", 321989b697dSPeter Maydell .help = "activate logging of the specified items", 3222b9e3576SMarc-André Lureau .cmd = hmp_log, 323d7f9b689SLuiz Capitulino }, 324d7f9b689SLuiz Capitulino 3252313086aSBlue SwirlSTEXI 3262313086aSBlue Swirl@item log @var{item1}[,...] 32770fcbbe7SStefan Weil@findex log 328989b697dSPeter MaydellActivate logging of the specified items. 3292313086aSBlue SwirlETEXI 3302313086aSBlue Swirl 331d7f9b689SLuiz Capitulino { 332d7f9b689SLuiz Capitulino .name = "savevm", 333d7f9b689SLuiz Capitulino .args_type = "name:s?", 334d7f9b689SLuiz Capitulino .params = "[tag|id]", 335d7f9b689SLuiz Capitulino .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created", 3362b9e3576SMarc-André Lureau .cmd = hmp_savevm, 337d7f9b689SLuiz Capitulino }, 338d7f9b689SLuiz Capitulino 3392313086aSBlue SwirlSTEXI 3402313086aSBlue Swirl@item savevm [@var{tag}|@var{id}] 34170fcbbe7SStefan Weil@findex savevm 3422313086aSBlue SwirlCreate a snapshot of the whole virtual machine. If @var{tag} is 3432313086aSBlue Swirlprovided, it is used as human readable identifier. If there is already 3442313086aSBlue Swirla snapshot with the same tag or ID, it is replaced. More info at 3452313086aSBlue Swirl@ref{vm_snapshots}. 3462313086aSBlue SwirlETEXI 3472313086aSBlue Swirl 348d7f9b689SLuiz Capitulino { 349d7f9b689SLuiz Capitulino .name = "loadvm", 350d7f9b689SLuiz Capitulino .args_type = "name:s", 351d7f9b689SLuiz Capitulino .params = "tag|id", 352d7f9b689SLuiz Capitulino .help = "restore a VM snapshot from its tag or id", 3532b9e3576SMarc-André Lureau .cmd = hmp_loadvm, 354b21631f3SHani Benhabiles .command_completion = loadvm_completion, 355d7f9b689SLuiz Capitulino }, 356d7f9b689SLuiz Capitulino 3572313086aSBlue SwirlSTEXI 3582313086aSBlue Swirl@item loadvm @var{tag}|@var{id} 35970fcbbe7SStefan Weil@findex loadvm 3602313086aSBlue SwirlSet the whole virtual machine to the snapshot identified by the tag 3612313086aSBlue Swirl@var{tag} or the unique snapshot ID @var{id}. 3622313086aSBlue SwirlETEXI 3632313086aSBlue Swirl 364d7f9b689SLuiz Capitulino { 365d7f9b689SLuiz Capitulino .name = "delvm", 366d7f9b689SLuiz Capitulino .args_type = "name:s", 367d7f9b689SLuiz Capitulino .params = "tag|id", 368d7f9b689SLuiz Capitulino .help = "delete a VM snapshot from its tag or id", 3692b9e3576SMarc-André Lureau .cmd = hmp_delvm, 370b21631f3SHani Benhabiles .command_completion = delvm_completion, 371d7f9b689SLuiz Capitulino }, 372d7f9b689SLuiz Capitulino 3732313086aSBlue SwirlSTEXI 3742313086aSBlue Swirl@item delvm @var{tag}|@var{id} 37570fcbbe7SStefan Weil@findex delvm 3762313086aSBlue SwirlDelete the snapshot identified by @var{tag} or @var{id}. 3772313086aSBlue SwirlETEXI 3782313086aSBlue Swirl 379d7f9b689SLuiz Capitulino { 380d7f9b689SLuiz Capitulino .name = "singlestep", 381d7f9b689SLuiz Capitulino .args_type = "option:s?", 382d7f9b689SLuiz Capitulino .params = "[on|off]", 383d7f9b689SLuiz Capitulino .help = "run emulation in singlestep mode or switch to normal mode", 3842b9e3576SMarc-André Lureau .cmd = hmp_singlestep, 385d7f9b689SLuiz Capitulino }, 386d7f9b689SLuiz Capitulino 3872313086aSBlue SwirlSTEXI 3882313086aSBlue Swirl@item singlestep [off] 38970fcbbe7SStefan Weil@findex singlestep 3902313086aSBlue SwirlRun the emulation in single step mode. 3912313086aSBlue SwirlIf called with option off, the emulation returns to normal mode. 3922313086aSBlue SwirlETEXI 3932313086aSBlue Swirl 394d7f9b689SLuiz Capitulino { 395d7f9b689SLuiz Capitulino .name = "stop", 396d7f9b689SLuiz Capitulino .args_type = "", 397d7f9b689SLuiz Capitulino .params = "", 398d7f9b689SLuiz Capitulino .help = "stop emulation", 3992b9e3576SMarc-André Lureau .cmd = hmp_stop, 400d7f9b689SLuiz Capitulino }, 401d7f9b689SLuiz Capitulino 4022313086aSBlue SwirlSTEXI 4032313086aSBlue Swirl@item stop 40470fcbbe7SStefan Weil@findex stop 4052313086aSBlue SwirlStop emulation. 4062313086aSBlue SwirlETEXI 4072313086aSBlue Swirl 408d7f9b689SLuiz Capitulino { 409d7f9b689SLuiz Capitulino .name = "c|cont", 410d7f9b689SLuiz Capitulino .args_type = "", 411d7f9b689SLuiz Capitulino .params = "", 412d7f9b689SLuiz Capitulino .help = "resume emulation", 4132b9e3576SMarc-André Lureau .cmd = hmp_cont, 414d7f9b689SLuiz Capitulino }, 415d7f9b689SLuiz Capitulino 4162313086aSBlue SwirlSTEXI 4172313086aSBlue Swirl@item c or cont 41870fcbbe7SStefan Weil@findex cont 4192313086aSBlue SwirlResume emulation. 4202313086aSBlue SwirlETEXI 4212313086aSBlue Swirl 422d7f9b689SLuiz Capitulino { 4239b9df25aSGerd Hoffmann .name = "system_wakeup", 4249b9df25aSGerd Hoffmann .args_type = "", 4259b9df25aSGerd Hoffmann .params = "", 4269b9df25aSGerd Hoffmann .help = "wakeup guest from suspend", 4272b9e3576SMarc-André Lureau .cmd = hmp_system_wakeup, 4289b9df25aSGerd Hoffmann }, 4299b9df25aSGerd Hoffmann 4309b9df25aSGerd HoffmannSTEXI 4319b9df25aSGerd Hoffmann@item system_wakeup 4329b9df25aSGerd Hoffmann@findex system_wakeup 4339b9df25aSGerd HoffmannWakeup guest from suspend. 4349b9df25aSGerd HoffmannETEXI 4359b9df25aSGerd Hoffmann 4369b9df25aSGerd Hoffmann { 437d7f9b689SLuiz Capitulino .name = "gdbserver", 438d7f9b689SLuiz Capitulino .args_type = "device:s?", 439d7f9b689SLuiz Capitulino .params = "[device]", 440d7f9b689SLuiz Capitulino .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", 4412b9e3576SMarc-André Lureau .cmd = hmp_gdbserver, 442d7f9b689SLuiz Capitulino }, 443d7f9b689SLuiz Capitulino 4442313086aSBlue SwirlSTEXI 4452313086aSBlue Swirl@item gdbserver [@var{port}] 44670fcbbe7SStefan Weil@findex gdbserver 4472313086aSBlue SwirlStart gdbserver session (default @var{port}=1234) 4482313086aSBlue SwirlETEXI 4492313086aSBlue Swirl 450d7f9b689SLuiz Capitulino { 451d7f9b689SLuiz Capitulino .name = "x", 452d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 453d7f9b689SLuiz Capitulino .params = "/fmt addr", 454d7f9b689SLuiz Capitulino .help = "virtual memory dump starting at 'addr'", 4552b9e3576SMarc-André Lureau .cmd = hmp_memory_dump, 456d7f9b689SLuiz Capitulino }, 457d7f9b689SLuiz Capitulino 4582313086aSBlue SwirlSTEXI 4592313086aSBlue Swirl@item x/fmt @var{addr} 46070fcbbe7SStefan Weil@findex x 4612313086aSBlue SwirlVirtual memory dump starting at @var{addr}. 4622313086aSBlue SwirlETEXI 4632313086aSBlue Swirl 464d7f9b689SLuiz Capitulino { 465d7f9b689SLuiz Capitulino .name = "xp", 466d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:l", 467d7f9b689SLuiz Capitulino .params = "/fmt addr", 468d7f9b689SLuiz Capitulino .help = "physical memory dump starting at 'addr'", 4692b9e3576SMarc-André Lureau .cmd = hmp_physical_memory_dump, 470d7f9b689SLuiz Capitulino }, 471d7f9b689SLuiz Capitulino 4722313086aSBlue SwirlSTEXI 4732313086aSBlue Swirl@item xp /@var{fmt} @var{addr} 47470fcbbe7SStefan Weil@findex xp 4752313086aSBlue SwirlPhysical memory dump starting at @var{addr}. 4762313086aSBlue Swirl 4772313086aSBlue Swirl@var{fmt} is a format which tells the command how to format the 4782313086aSBlue Swirldata. Its syntax is: @option{/@{count@}@{format@}@{size@}} 4792313086aSBlue Swirl 4802313086aSBlue Swirl@table @var 4812313086aSBlue Swirl@item count 4822313086aSBlue Swirlis the number of items to be dumped. 4832313086aSBlue Swirl 4842313086aSBlue Swirl@item format 4852313086aSBlue Swirlcan be x (hex), d (signed decimal), u (unsigned decimal), o (octal), 4862313086aSBlue Swirlc (char) or i (asm instruction). 4872313086aSBlue Swirl 4882313086aSBlue Swirl@item size 4892313086aSBlue Swirlcan be b (8 bits), h (16 bits), w (32 bits) or g (64 bits). On x86, 4902313086aSBlue Swirl@code{h} or @code{w} can be specified with the @code{i} format to 4912313086aSBlue Swirlrespectively select 16 or 32 bit code instruction size. 4922313086aSBlue Swirl 4932313086aSBlue Swirl@end table 4942313086aSBlue Swirl 4952313086aSBlue SwirlExamples: 4962313086aSBlue Swirl@itemize 4972313086aSBlue Swirl@item 4982313086aSBlue SwirlDump 10 instructions at the current instruction pointer: 4992313086aSBlue Swirl@example 5002313086aSBlue Swirl(qemu) x/10i $eip 5012313086aSBlue Swirl0x90107063: ret 5022313086aSBlue Swirl0x90107064: sti 5032313086aSBlue Swirl0x90107065: lea 0x0(%esi,1),%esi 5042313086aSBlue Swirl0x90107069: lea 0x0(%edi,1),%edi 5052313086aSBlue Swirl0x90107070: ret 5062313086aSBlue Swirl0x90107071: jmp 0x90107080 5072313086aSBlue Swirl0x90107073: nop 5082313086aSBlue Swirl0x90107074: nop 5092313086aSBlue Swirl0x90107075: nop 5102313086aSBlue Swirl0x90107076: nop 5112313086aSBlue Swirl@end example 5122313086aSBlue Swirl 5132313086aSBlue Swirl@item 5142313086aSBlue SwirlDump 80 16 bit values at the start of the video memory. 5152313086aSBlue Swirl@smallexample 5162313086aSBlue Swirl(qemu) xp/80hx 0xb8000 5172313086aSBlue Swirl0x000b8000: 0x0b50 0x0b6c 0x0b65 0x0b78 0x0b38 0x0b36 0x0b2f 0x0b42 5182313086aSBlue Swirl0x000b8010: 0x0b6f 0x0b63 0x0b68 0x0b73 0x0b20 0x0b56 0x0b47 0x0b41 5192313086aSBlue Swirl0x000b8020: 0x0b42 0x0b69 0x0b6f 0x0b73 0x0b20 0x0b63 0x0b75 0x0b72 5202313086aSBlue Swirl0x000b8030: 0x0b72 0x0b65 0x0b6e 0x0b74 0x0b2d 0x0b63 0x0b76 0x0b73 5212313086aSBlue Swirl0x000b8040: 0x0b20 0x0b30 0x0b35 0x0b20 0x0b4e 0x0b6f 0x0b76 0x0b20 5222313086aSBlue Swirl0x000b8050: 0x0b32 0x0b30 0x0b30 0x0b33 0x0720 0x0720 0x0720 0x0720 5232313086aSBlue Swirl0x000b8060: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 5242313086aSBlue Swirl0x000b8070: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 5252313086aSBlue Swirl0x000b8080: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 5262313086aSBlue Swirl0x000b8090: 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 0x0720 5272313086aSBlue Swirl@end smallexample 5282313086aSBlue Swirl@end itemize 5292313086aSBlue SwirlETEXI 5302313086aSBlue Swirl 531d7f9b689SLuiz Capitulino { 532e9628441SPaolo Bonzini .name = "gpa2hva", 533e9628441SPaolo Bonzini .args_type = "addr:l", 534e9628441SPaolo Bonzini .params = "addr", 535e9628441SPaolo Bonzini .help = "print the host virtual address corresponding to a guest physical address", 536e9628441SPaolo Bonzini .cmd = hmp_gpa2hva, 537e9628441SPaolo Bonzini }, 538e9628441SPaolo Bonzini 539e9628441SPaolo BonziniSTEXI 540e9628441SPaolo Bonzini@item gpa2hva @var{addr} 541e9628441SPaolo Bonzini@findex gpa2hva 542e9628441SPaolo BonziniPrint the host virtual address at which the guest's physical address @var{addr} 543e9628441SPaolo Bonziniis mapped. 544e9628441SPaolo BonziniETEXI 545e9628441SPaolo Bonzini 546e9628441SPaolo Bonzini#ifdef CONFIG_LINUX 547e9628441SPaolo Bonzini { 548e9628441SPaolo Bonzini .name = "gpa2hpa", 549e9628441SPaolo Bonzini .args_type = "addr:l", 550e9628441SPaolo Bonzini .params = "addr", 551e9628441SPaolo Bonzini .help = "print the host physical address corresponding to a guest physical address", 552e9628441SPaolo Bonzini .cmd = hmp_gpa2hpa, 553e9628441SPaolo Bonzini }, 554e9628441SPaolo Bonzini#endif 555e9628441SPaolo Bonzini 556e9628441SPaolo BonziniSTEXI 557e9628441SPaolo Bonzini@item gpa2hpa @var{addr} 558e9628441SPaolo Bonzini@findex gpa2hpa 559e9628441SPaolo BonziniPrint the host physical address at which the guest's physical address @var{addr} 560e9628441SPaolo Bonziniis mapped. 561e9628441SPaolo BonziniETEXI 562e9628441SPaolo Bonzini 563e9628441SPaolo Bonzini { 564d7f9b689SLuiz Capitulino .name = "p|print", 565d7f9b689SLuiz Capitulino .args_type = "fmt:/,val:l", 566d7f9b689SLuiz Capitulino .params = "/fmt expr", 567d7f9b689SLuiz Capitulino .help = "print expression value (use $reg for CPU register access)", 5682b9e3576SMarc-André Lureau .cmd = do_print, 569d7f9b689SLuiz Capitulino }, 570d7f9b689SLuiz Capitulino 5712313086aSBlue SwirlSTEXI 5722313086aSBlue Swirl@item p or print/@var{fmt} @var{expr} 57370fcbbe7SStefan Weil@findex print 5742313086aSBlue SwirlPrint expression value. Only the @var{format} part of @var{fmt} is 5752313086aSBlue Swirlused. 5762313086aSBlue SwirlETEXI 5772313086aSBlue Swirl 578d7f9b689SLuiz Capitulino { 579d7f9b689SLuiz Capitulino .name = "i", 580d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,index:i.", 581d7f9b689SLuiz Capitulino .params = "/fmt addr", 582d7f9b689SLuiz Capitulino .help = "I/O port read", 5832b9e3576SMarc-André Lureau .cmd = hmp_ioport_read, 584d7f9b689SLuiz Capitulino }, 585d7f9b689SLuiz Capitulino 5862313086aSBlue SwirlSTEXI 587b76d799eSMarkus Armbruster@item i/@var{fmt} @var{addr} [.@var{index}] 588b76d799eSMarkus Armbruster@findex i 5892313086aSBlue SwirlRead I/O port. 5902313086aSBlue SwirlETEXI 5912313086aSBlue Swirl 592d7f9b689SLuiz Capitulino { 593d7f9b689SLuiz Capitulino .name = "o", 594d7f9b689SLuiz Capitulino .args_type = "fmt:/,addr:i,val:i", 595d7f9b689SLuiz Capitulino .params = "/fmt addr value", 596d7f9b689SLuiz Capitulino .help = "I/O port write", 5972b9e3576SMarc-André Lureau .cmd = hmp_ioport_write, 598d7f9b689SLuiz Capitulino }, 599d7f9b689SLuiz Capitulino 600f114784fSJan KiszkaSTEXI 601b76d799eSMarkus Armbruster@item o/@var{fmt} @var{addr} @var{val} 602b76d799eSMarkus Armbruster@findex o 603f114784fSJan KiszkaWrite to I/O port. 604f114784fSJan KiszkaETEXI 6052313086aSBlue Swirl 606d7f9b689SLuiz Capitulino { 607d7f9b689SLuiz Capitulino .name = "sendkey", 6082ef20c15SAmos Kong .args_type = "keys:s,hold-time:i?", 609d7f9b689SLuiz Capitulino .params = "keys [hold_ms]", 610d7f9b689SLuiz Capitulino .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", 6112b9e3576SMarc-André Lureau .cmd = hmp_sendkey, 61229136cd8SHani Benhabiles .command_completion = sendkey_completion, 613d7f9b689SLuiz Capitulino }, 614d7f9b689SLuiz Capitulino 6152313086aSBlue SwirlSTEXI 6162313086aSBlue Swirl@item sendkey @var{keys} 61770fcbbe7SStefan Weil@findex sendkey 618886cc706SAmos KongSend @var{keys} to the guest. @var{keys} could be the name of the 619886cc706SAmos Kongkey or the raw value in hexadecimal format. Use @code{-} to press 620886cc706SAmos Kongseveral keys simultaneously. Example: 6212313086aSBlue Swirl@example 6222313086aSBlue Swirlsendkey ctrl-alt-f1 6232313086aSBlue Swirl@end example 6242313086aSBlue Swirl 6252313086aSBlue SwirlThis command is useful to send keys that your graphical user interface 6262313086aSBlue Swirlintercepts at low level, such as @code{ctrl-alt-f1} in X Window. 6272313086aSBlue SwirlETEXI 6282313086aSBlue Swirl 629d7f9b689SLuiz Capitulino { 630d7f9b689SLuiz Capitulino .name = "system_reset", 631d7f9b689SLuiz Capitulino .args_type = "", 632d7f9b689SLuiz Capitulino .params = "", 633d7f9b689SLuiz Capitulino .help = "reset the system", 6342b9e3576SMarc-André Lureau .cmd = hmp_system_reset, 635d7f9b689SLuiz Capitulino }, 636d7f9b689SLuiz Capitulino 6372313086aSBlue SwirlSTEXI 6382313086aSBlue Swirl@item system_reset 63970fcbbe7SStefan Weil@findex system_reset 6402313086aSBlue SwirlReset the system. 6412313086aSBlue SwirlETEXI 6422313086aSBlue Swirl 643d7f9b689SLuiz Capitulino { 644d7f9b689SLuiz Capitulino .name = "system_powerdown", 645d7f9b689SLuiz Capitulino .args_type = "", 646d7f9b689SLuiz Capitulino .params = "", 647d7f9b689SLuiz Capitulino .help = "send system power down event", 6482b9e3576SMarc-André Lureau .cmd = hmp_system_powerdown, 649d7f9b689SLuiz Capitulino }, 650d7f9b689SLuiz Capitulino 6512313086aSBlue SwirlSTEXI 6522313086aSBlue Swirl@item system_powerdown 65370fcbbe7SStefan Weil@findex system_powerdown 6542313086aSBlue SwirlPower down the system (if supported). 6552313086aSBlue SwirlETEXI 6562313086aSBlue Swirl 657d7f9b689SLuiz Capitulino { 658d7f9b689SLuiz Capitulino .name = "sum", 659d7f9b689SLuiz Capitulino .args_type = "start:i,size:i", 660d7f9b689SLuiz Capitulino .params = "addr size", 661d7f9b689SLuiz Capitulino .help = "compute the checksum of a memory region", 6622b9e3576SMarc-André Lureau .cmd = hmp_sum, 663d7f9b689SLuiz Capitulino }, 664d7f9b689SLuiz Capitulino 6652313086aSBlue SwirlSTEXI 6662313086aSBlue Swirl@item sum @var{addr} @var{size} 66770fcbbe7SStefan Weil@findex sum 6682313086aSBlue SwirlCompute the checksum of a memory region. 6692313086aSBlue SwirlETEXI 6702313086aSBlue Swirl 671d7f9b689SLuiz Capitulino { 672d7f9b689SLuiz Capitulino .name = "device_add", 673c7e4e8ceSMarkus Armbruster .args_type = "device:O", 674c7e4e8ceSMarkus Armbruster .params = "driver[,prop=value][,...]", 675d7f9b689SLuiz Capitulino .help = "add device, like -device on the command line", 6762b9e3576SMarc-André Lureau .cmd = hmp_device_add, 6772da1b3abSHani Benhabiles .command_completion = device_add_completion, 678d7f9b689SLuiz Capitulino }, 679d7f9b689SLuiz Capitulino 6803418bd25SGerd HoffmannSTEXI 6813418bd25SGerd Hoffmann@item device_add @var{config} 68270fcbbe7SStefan Weil@findex device_add 6833418bd25SGerd HoffmannAdd device. 6843418bd25SGerd HoffmannETEXI 6853418bd25SGerd Hoffmann 686d7f9b689SLuiz Capitulino { 687d7f9b689SLuiz Capitulino .name = "device_del", 688d7f9b689SLuiz Capitulino .args_type = "id:s", 689d7f9b689SLuiz Capitulino .params = "device", 690d7f9b689SLuiz Capitulino .help = "remove device", 6912b9e3576SMarc-André Lureau .cmd = hmp_device_del, 6922da1b3abSHani Benhabiles .command_completion = device_del_completion, 693d7f9b689SLuiz Capitulino }, 694d7f9b689SLuiz Capitulino 6953418bd25SGerd HoffmannSTEXI 6963418bd25SGerd Hoffmann@item device_del @var{id} 69770fcbbe7SStefan Weil@findex device_del 6986287d827SDaniel P. BerrangeRemove device @var{id}. @var{id} may be a short ID 6996287d827SDaniel P. Berrangeor a QOM object path. 7003418bd25SGerd HoffmannETEXI 7013418bd25SGerd Hoffmann 702d7f9b689SLuiz Capitulino { 703d7f9b689SLuiz Capitulino .name = "cpu", 704d7f9b689SLuiz Capitulino .args_type = "index:i", 705d7f9b689SLuiz Capitulino .params = "index", 706d7f9b689SLuiz Capitulino .help = "set the default CPU", 7072b9e3576SMarc-André Lureau .cmd = hmp_cpu, 708d7f9b689SLuiz Capitulino }, 7093418bd25SGerd Hoffmann 7102313086aSBlue SwirlSTEXI 711c427ea9cSMarkus Armbruster@item cpu @var{index} 712c427ea9cSMarkus Armbruster@findex cpu 7132313086aSBlue SwirlSet the default CPU. 7142313086aSBlue SwirlETEXI 7152313086aSBlue Swirl 716d7f9b689SLuiz Capitulino { 717d7f9b689SLuiz Capitulino .name = "mouse_move", 718d7f9b689SLuiz Capitulino .args_type = "dx_str:s,dy_str:s,dz_str:s?", 719d7f9b689SLuiz Capitulino .params = "dx dy [dz]", 720d7f9b689SLuiz Capitulino .help = "send mouse move events", 7212b9e3576SMarc-André Lureau .cmd = hmp_mouse_move, 722d7f9b689SLuiz Capitulino }, 723d7f9b689SLuiz Capitulino 7242313086aSBlue SwirlSTEXI 7252313086aSBlue Swirl@item mouse_move @var{dx} @var{dy} [@var{dz}] 72670fcbbe7SStefan Weil@findex mouse_move 7272313086aSBlue SwirlMove the active mouse to the specified coordinates @var{dx} @var{dy} 7282313086aSBlue Swirlwith optional scroll axis @var{dz}. 7292313086aSBlue SwirlETEXI 7302313086aSBlue Swirl 731d7f9b689SLuiz Capitulino { 732d7f9b689SLuiz Capitulino .name = "mouse_button", 733d7f9b689SLuiz Capitulino .args_type = "button_state:i", 734d7f9b689SLuiz Capitulino .params = "state", 735d7f9b689SLuiz Capitulino .help = "change mouse button state (1=L, 2=M, 4=R)", 7362b9e3576SMarc-André Lureau .cmd = hmp_mouse_button, 737d7f9b689SLuiz Capitulino }, 738d7f9b689SLuiz Capitulino 7392313086aSBlue SwirlSTEXI 7402313086aSBlue Swirl@item mouse_button @var{val} 74170fcbbe7SStefan Weil@findex mouse_button 7422313086aSBlue SwirlChange the active mouse button state @var{val} (1=L, 2=M, 4=R). 7432313086aSBlue SwirlETEXI 7442313086aSBlue Swirl 745d7f9b689SLuiz Capitulino { 746d7f9b689SLuiz Capitulino .name = "mouse_set", 747d7f9b689SLuiz Capitulino .args_type = "index:i", 748d7f9b689SLuiz Capitulino .params = "index", 749d7f9b689SLuiz Capitulino .help = "set which mouse device receives events", 7502b9e3576SMarc-André Lureau .cmd = hmp_mouse_set, 751d7f9b689SLuiz Capitulino }, 752d7f9b689SLuiz Capitulino 7532313086aSBlue SwirlSTEXI 7542313086aSBlue Swirl@item mouse_set @var{index} 75570fcbbe7SStefan Weil@findex mouse_set 7562313086aSBlue SwirlSet which mouse device receives events at given @var{index}, index 7572313086aSBlue Swirlcan be obtained with 7582313086aSBlue Swirl@example 7592313086aSBlue Swirlinfo mice 7602313086aSBlue Swirl@end example 7612313086aSBlue SwirlETEXI 7622313086aSBlue Swirl 763d7f9b689SLuiz Capitulino { 764d7f9b689SLuiz Capitulino .name = "wavcapture", 765d7f9b689SLuiz Capitulino .args_type = "path:F,freq:i?,bits:i?,nchannels:i?", 766d7f9b689SLuiz Capitulino .params = "path [frequency [bits [channels]]]", 767d7f9b689SLuiz Capitulino .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", 7682b9e3576SMarc-André Lureau .cmd = hmp_wavcapture, 769d7f9b689SLuiz Capitulino }, 7702313086aSBlue SwirlSTEXI 7712313086aSBlue Swirl@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]] 77270fcbbe7SStefan Weil@findex wavcapture 7732313086aSBlue SwirlCapture audio into @var{filename}. Using sample rate @var{frequency} 7742313086aSBlue Swirlbits per sample @var{bits} and number of channels @var{channels}. 7752313086aSBlue Swirl 7762313086aSBlue SwirlDefaults: 7772313086aSBlue Swirl@itemize @minus 7782313086aSBlue Swirl@item Sample rate = 44100 Hz - CD quality 7792313086aSBlue Swirl@item Bits = 16 7802313086aSBlue Swirl@item Number of channels = 2 - Stereo 7812313086aSBlue Swirl@end itemize 7822313086aSBlue SwirlETEXI 7832313086aSBlue Swirl 784d7f9b689SLuiz Capitulino { 785d7f9b689SLuiz Capitulino .name = "stopcapture", 786d7f9b689SLuiz Capitulino .args_type = "n:i", 787d7f9b689SLuiz Capitulino .params = "capture index", 788d7f9b689SLuiz Capitulino .help = "stop capture", 7892b9e3576SMarc-André Lureau .cmd = hmp_stopcapture, 790d7f9b689SLuiz Capitulino }, 7912313086aSBlue SwirlSTEXI 7922313086aSBlue Swirl@item stopcapture @var{index} 79370fcbbe7SStefan Weil@findex stopcapture 7942313086aSBlue SwirlStop capture with a given @var{index}, index can be obtained with 7952313086aSBlue Swirl@example 7962313086aSBlue Swirlinfo capture 7972313086aSBlue Swirl@end example 7982313086aSBlue SwirlETEXI 7992313086aSBlue Swirl 800d7f9b689SLuiz Capitulino { 801d7f9b689SLuiz Capitulino .name = "memsave", 802d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 803d7f9b689SLuiz Capitulino .params = "addr size file", 804d7f9b689SLuiz Capitulino .help = "save to disk virtual memory dump starting at 'addr' of size 'size'", 8052b9e3576SMarc-André Lureau .cmd = hmp_memsave, 806d7f9b689SLuiz Capitulino }, 807d7f9b689SLuiz Capitulino 8082313086aSBlue SwirlSTEXI 8092313086aSBlue Swirl@item memsave @var{addr} @var{size} @var{file} 81070fcbbe7SStefan Weil@findex memsave 8112313086aSBlue Swirlsave to disk virtual memory dump starting at @var{addr} of size @var{size}. 8122313086aSBlue SwirlETEXI 8132313086aSBlue Swirl 814d7f9b689SLuiz Capitulino { 815d7f9b689SLuiz Capitulino .name = "pmemsave", 816d7f9b689SLuiz Capitulino .args_type = "val:l,size:i,filename:s", 817d7f9b689SLuiz Capitulino .params = "addr size file", 818d7f9b689SLuiz Capitulino .help = "save to disk physical memory dump starting at 'addr' of size 'size'", 8192b9e3576SMarc-André Lureau .cmd = hmp_pmemsave, 820d7f9b689SLuiz Capitulino }, 821d7f9b689SLuiz Capitulino 8222313086aSBlue SwirlSTEXI 8232313086aSBlue Swirl@item pmemsave @var{addr} @var{size} @var{file} 82470fcbbe7SStefan Weil@findex pmemsave 8252313086aSBlue Swirlsave to disk physical memory dump starting at @var{addr} of size @var{size}. 8262313086aSBlue SwirlETEXI 8272313086aSBlue Swirl 828d7f9b689SLuiz Capitulino { 829d7f9b689SLuiz Capitulino .name = "boot_set", 830d7f9b689SLuiz Capitulino .args_type = "bootdevice:s", 831d7f9b689SLuiz Capitulino .params = "bootdevice", 832d7f9b689SLuiz Capitulino .help = "define new values for the boot device list", 8332b9e3576SMarc-André Lureau .cmd = hmp_boot_set, 834d7f9b689SLuiz Capitulino }, 835d7f9b689SLuiz Capitulino 8362313086aSBlue SwirlSTEXI 8372313086aSBlue Swirl@item boot_set @var{bootdevicelist} 83870fcbbe7SStefan Weil@findex boot_set 8392313086aSBlue SwirlDefine new values for the boot device list. Those values will override 8402313086aSBlue Swirlthe values specified on the command line through the @code{-boot} option. 8412313086aSBlue Swirl 8422313086aSBlue SwirlThe values that can be specified here depend on the machine type, but are 8432313086aSBlue Swirlthe same that can be specified in the @code{-boot} command line option. 8442313086aSBlue SwirlETEXI 8452313086aSBlue Swirl 846d7f9b689SLuiz Capitulino { 847d7f9b689SLuiz Capitulino .name = "nmi", 848e9b4b432SLuiz Capitulino .args_type = "", 849e9b4b432SLuiz Capitulino .params = "", 8509cb805fdSAlexey Kardashevskiy .help = "inject an NMI", 8512b9e3576SMarc-André Lureau .cmd = hmp_nmi, 852d7f9b689SLuiz Capitulino }, 8532313086aSBlue SwirlSTEXI 8542313086aSBlue Swirl@item nmi @var{cpu} 85570fcbbe7SStefan Weil@findex nmi 8569cb805fdSAlexey KardashevskiyInject an NMI on the default CPU (x86/s390) or all CPUs (ppc64). 8571f590cf9SLei Li 8581f590cf9SLei LiETEXI 8591f590cf9SLei Li 8601f590cf9SLei Li { 8613949e594SMarkus Armbruster .name = "ringbuf_write", 8621f590cf9SLei Li .args_type = "device:s,data:s", 8631f590cf9SLei Li .params = "device data", 8643949e594SMarkus Armbruster .help = "Write to a ring buffer character device", 8652b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_write, 8668e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 8671f590cf9SLei Li }, 8681f590cf9SLei Li 8691f590cf9SLei LiSTEXI 8703949e594SMarkus Armbruster@item ringbuf_write @var{device} @var{data} 8713949e594SMarkus Armbruster@findex ringbuf_write 8723949e594SMarkus ArmbrusterWrite @var{data} to ring buffer character device @var{device}. 8733949e594SMarkus Armbruster@var{data} must be a UTF-8 string. 8741f590cf9SLei Li 8752313086aSBlue SwirlETEXI 8762313086aSBlue Swirl 877d7f9b689SLuiz Capitulino { 8783949e594SMarkus Armbruster .name = "ringbuf_read", 87949b6d722SLei Li .args_type = "device:s,size:i", 88049b6d722SLei Li .params = "device size", 8813949e594SMarkus Armbruster .help = "Read from a ring buffer character device", 8822b9e3576SMarc-André Lureau .cmd = hmp_ringbuf_read, 8838e597779SHani Benhabiles .command_completion = ringbuf_write_completion, 88449b6d722SLei Li }, 88549b6d722SLei Li 88649b6d722SLei LiSTEXI 8873949e594SMarkus Armbruster@item ringbuf_read @var{device} 8883949e594SMarkus Armbruster@findex ringbuf_read 8893949e594SMarkus ArmbrusterRead and print up to @var{size} bytes from ring buffer character 8903949e594SMarkus Armbrusterdevice @var{device}. 891543f3412SMarkus ArmbrusterCertain non-printable characters are printed \uXXXX, where XXXX is the 892543f3412SMarkus Armbrustercharacter code in hexadecimal. Character \ is printed \\. 8933949e594SMarkus ArmbrusterBug: can screw up when the buffer contains invalid UTF-8 sequences, 8943949e594SMarkus ArmbrusterNUL characters, after the ring buffer lost data, and when reading 8953949e594SMarkus Armbrusterstops because the size limit is reached. 89649b6d722SLei Li 89749b6d722SLei LiETEXI 89849b6d722SLei Li 89949b6d722SLei Li { 900d7f9b689SLuiz Capitulino .name = "migrate", 9017a4da28bSPeter Xu .args_type = "detach:-d,blk:-b,inc:-i,resume:-r,uri:s", 9027a4da28bSPeter Xu .params = "[-d] [-b] [-i] [-r] uri", 903fbc3d96cSlirans@il.ibm.com .help = "migrate to URI (using -d to not wait for completion)" 904fbc3d96cSlirans@il.ibm.com "\n\t\t\t -b for migration without shared storage with" 905fbc3d96cSlirans@il.ibm.com " full copy of disk\n\t\t\t -i for migration without " 906fbc3d96cSlirans@il.ibm.com "shared storage with incremental copy of disk " 9077a4da28bSPeter Xu "(base image shared between src and destination)" 9087a4da28bSPeter Xu "\n\t\t\t -r to resume a paused migration", 9092b9e3576SMarc-André Lureau .cmd = hmp_migrate, 910d7f9b689SLuiz Capitulino }, 911d7f9b689SLuiz Capitulino 912fbc3d96cSlirans@il.ibm.com 9132313086aSBlue SwirlSTEXI 914fbc3d96cSlirans@il.ibm.com@item migrate [-d] [-b] [-i] @var{uri} 91570fcbbe7SStefan Weil@findex migrate 9162313086aSBlue SwirlMigrate to @var{uri} (using -d to not wait for completion). 917fbc3d96cSlirans@il.ibm.com -b for migration with full copy of disk 918fbc3d96cSlirans@il.ibm.com -i for migration with incremental copy of disk (base image is shared) 9192313086aSBlue SwirlETEXI 9202313086aSBlue Swirl 921d7f9b689SLuiz Capitulino { 922d7f9b689SLuiz Capitulino .name = "migrate_cancel", 923d7f9b689SLuiz Capitulino .args_type = "", 924d7f9b689SLuiz Capitulino .params = "", 925d7f9b689SLuiz Capitulino .help = "cancel the current VM migration", 9262b9e3576SMarc-André Lureau .cmd = hmp_migrate_cancel, 927d7f9b689SLuiz Capitulino }, 928d7f9b689SLuiz Capitulino 9292313086aSBlue SwirlSTEXI 9302313086aSBlue Swirl@item migrate_cancel 93170fcbbe7SStefan Weil@findex migrate_cancel 9322313086aSBlue SwirlCancel the current VM migration. 93394ae12cbSDr. David Alan GilbertETEXI 9349e1ba4ccSOrit Wasserman 93594ae12cbSDr. David Alan Gilbert { 93694ae12cbSDr. David Alan Gilbert .name = "migrate_continue", 93794ae12cbSDr. David Alan Gilbert .args_type = "state:s", 93894ae12cbSDr. David Alan Gilbert .params = "state", 93994ae12cbSDr. David Alan Gilbert .help = "Continue migration from the given paused state", 94094ae12cbSDr. David Alan Gilbert .cmd = hmp_migrate_continue, 94194ae12cbSDr. David Alan Gilbert }, 94294ae12cbSDr. David Alan GilbertSTEXI 94394ae12cbSDr. David Alan Gilbert@item migrate_continue @var{state} 94494ae12cbSDr. David Alan Gilbert@findex migrate_continue 94594ae12cbSDr. David Alan GilbertContinue migration from the paused state @var{state} 9469e1ba4ccSOrit WassermanETEXI 9479e1ba4ccSOrit Wasserman 9489e1ba4ccSOrit Wasserman { 949bf1ae1f4SDr. David Alan Gilbert .name = "migrate_incoming", 950bf1ae1f4SDr. David Alan Gilbert .args_type = "uri:s", 951bf1ae1f4SDr. David Alan Gilbert .params = "uri", 952bf1ae1f4SDr. David Alan Gilbert .help = "Continue an incoming migration from an -incoming defer", 9532b9e3576SMarc-André Lureau .cmd = hmp_migrate_incoming, 954bf1ae1f4SDr. David Alan Gilbert }, 955bf1ae1f4SDr. David Alan Gilbert 956bf1ae1f4SDr. David Alan GilbertSTEXI 957bf1ae1f4SDr. David Alan Gilbert@item migrate_incoming @var{uri} 958bf1ae1f4SDr. David Alan Gilbert@findex migrate_incoming 959bf1ae1f4SDr. David Alan GilbertContinue an incoming migration using the @var{uri} (that has the same syntax 960bf1ae1f4SDr. David Alan Gilbertas the -incoming option). 9613b563c4bSPeter XuETEXI 962bf1ae1f4SDr. David Alan Gilbert 9633b563c4bSPeter Xu { 9643b563c4bSPeter Xu .name = "migrate_recover", 9653b563c4bSPeter Xu .args_type = "uri:s", 9663b563c4bSPeter Xu .params = "uri", 9673b563c4bSPeter Xu .help = "Continue a paused incoming postcopy migration", 9683b563c4bSPeter Xu .cmd = hmp_migrate_recover, 9693b563c4bSPeter Xu }, 9703b563c4bSPeter Xu 9713b563c4bSPeter XuSTEXI 9723b563c4bSPeter Xu@item migrate_recover @var{uri} 9733b563c4bSPeter Xu@findex migrate_recover 9743b563c4bSPeter XuContinue a paused incoming postcopy migration using the @var{uri}. 975bf1ae1f4SDr. David Alan GilbertETEXI 976bf1ae1f4SDr. David Alan Gilbert 977bf1ae1f4SDr. David Alan Gilbert { 978d37297dcSPeter Xu .name = "migrate_pause", 979d37297dcSPeter Xu .args_type = "", 980d37297dcSPeter Xu .params = "", 981d37297dcSPeter Xu .help = "Pause an ongoing migration (postcopy-only)", 982d37297dcSPeter Xu .cmd = hmp_migrate_pause, 983d37297dcSPeter Xu }, 984d37297dcSPeter Xu 985d37297dcSPeter XuSTEXI 986d37297dcSPeter Xu@item migrate_pause 987d37297dcSPeter Xu@findex migrate_pause 988d37297dcSPeter XuPause an ongoing migration. Currently it only supports postcopy. 989d37297dcSPeter XuETEXI 990d37297dcSPeter Xu 991d37297dcSPeter Xu { 9929e1ba4ccSOrit Wasserman .name = "migrate_set_cache_size", 9939e1ba4ccSOrit Wasserman .args_type = "value:o", 9949e1ba4ccSOrit Wasserman .params = "value", 9959e1ba4ccSOrit Wasserman .help = "set cache size (in bytes) for XBZRLE migrations," 9969e1ba4ccSOrit Wasserman "the cache size will be rounded down to the nearest " 9979e1ba4ccSOrit Wasserman "power of 2.\n" 9989e1ba4ccSOrit Wasserman "The cache size affects the number of cache misses." 9999e1ba4ccSOrit Wasserman "In case of a high cache miss ratio you need to increase" 10009e1ba4ccSOrit Wasserman " the cache size", 10012b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_cache_size, 10029e1ba4ccSOrit Wasserman }, 10039e1ba4ccSOrit Wasserman 10049e1ba4ccSOrit WassermanSTEXI 10059e1ba4ccSOrit Wasserman@item migrate_set_cache_size @var{value} 10069e1ba4ccSOrit Wasserman@findex migrate_set_cache_size 10079e1ba4ccSOrit WassermanSet cache size to @var{value} (in bytes) for xbzrle migrations. 10082313086aSBlue SwirlETEXI 10092313086aSBlue Swirl 1010d7f9b689SLuiz Capitulino { 1011d7f9b689SLuiz Capitulino .name = "migrate_set_speed", 1012ed3d4a80SJes Sorensen .args_type = "value:o", 1013d7f9b689SLuiz Capitulino .params = "value", 1014ed3d4a80SJes Sorensen .help = "set maximum speed (in bytes) for migrations. " 1015ed3d4a80SJes Sorensen "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T", 10162b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_speed, 1017d7f9b689SLuiz Capitulino }, 1018d7f9b689SLuiz Capitulino 10192313086aSBlue SwirlSTEXI 10202313086aSBlue Swirl@item migrate_set_speed @var{value} 102170fcbbe7SStefan Weil@findex migrate_set_speed 10222313086aSBlue SwirlSet maximum speed to @var{value} (in bytes) for migrations. 10232313086aSBlue SwirlETEXI 10242313086aSBlue Swirl 1025d7f9b689SLuiz Capitulino { 1026d7f9b689SLuiz Capitulino .name = "migrate_set_downtime", 1027b0fbf7d3SMarkus Armbruster .args_type = "value:T", 1028d7f9b689SLuiz Capitulino .params = "value", 1029d7f9b689SLuiz Capitulino .help = "set maximum tolerated downtime (in seconds) for migrations", 10302b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_downtime, 1031d7f9b689SLuiz Capitulino }, 10322ea42952SGlauber Costa 10332ea42952SGlauber CostaSTEXI 10342ea42952SGlauber Costa@item migrate_set_downtime @var{second} 103570fcbbe7SStefan Weil@findex migrate_set_downtime 10362ea42952SGlauber CostaSet maximum tolerated downtime (in seconds) for migration. 10372ea42952SGlauber CostaETEXI 10382ea42952SGlauber Costa 1039f8882568SJes Sorensen { 104000458433SOrit Wasserman .name = "migrate_set_capability", 104100458433SOrit Wasserman .args_type = "capability:s,state:b", 104200458433SOrit Wasserman .params = "capability state", 104300458433SOrit Wasserman .help = "Enable/Disable the usage of a capability for migration", 10442b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_capability, 1045c68a0409SHani Benhabiles .command_completion = migrate_set_capability_completion, 104600458433SOrit Wasserman }, 104700458433SOrit Wasserman 104800458433SOrit WassermanSTEXI 104900458433SOrit Wasserman@item migrate_set_capability @var{capability} @var{state} 105000458433SOrit Wasserman@findex migrate_set_capability 105100458433SOrit WassermanEnable/Disable the usage of a capability @var{capability} for migration. 105200458433SOrit WassermanETEXI 105300458433SOrit Wasserman 105400458433SOrit Wasserman { 105550e9a629SLiang Li .name = "migrate_set_parameter", 105669ef1f36SDaniel P. Berrange .args_type = "parameter:s,value:s", 105750e9a629SLiang Li .params = "parameter value", 105850e9a629SLiang Li .help = "Set the parameter for migration", 10592b9e3576SMarc-André Lureau .cmd = hmp_migrate_set_parameter, 106050e9a629SLiang Li .command_completion = migrate_set_parameter_completion, 106150e9a629SLiang Li }, 106250e9a629SLiang Li 106350e9a629SLiang LiSTEXI 106450e9a629SLiang Li@item migrate_set_parameter @var{parameter} @var{value} 106550e9a629SLiang Li@findex migrate_set_parameter 106650e9a629SLiang LiSet the parameter @var{parameter} for migration. 106750e9a629SLiang LiETEXI 106850e9a629SLiang Li 106950e9a629SLiang Li { 10704886a1bcSDr. David Alan Gilbert .name = "migrate_start_postcopy", 10714886a1bcSDr. David Alan Gilbert .args_type = "", 10724886a1bcSDr. David Alan Gilbert .params = "", 1073a54d340bSDr. David Alan Gilbert .help = "Followup to a migration command to switch the migration" 107432c3db5bSDr. David Alan Gilbert " to postcopy mode. The postcopy-ram capability must " 1075c2eb7f21SGreg Kurz "be set on both source and destination before the " 1076c2eb7f21SGreg Kurz "original migration command .", 10772b9e3576SMarc-André Lureau .cmd = hmp_migrate_start_postcopy, 10784886a1bcSDr. David Alan Gilbert }, 10794886a1bcSDr. David Alan Gilbert 10804886a1bcSDr. David Alan GilbertSTEXI 10814886a1bcSDr. David Alan Gilbert@item migrate_start_postcopy 10824886a1bcSDr. David Alan Gilbert@findex migrate_start_postcopy 10834886a1bcSDr. David Alan GilbertSwitch in-progress migration to postcopy mode. Ignored after the end of 10844886a1bcSDr. David Alan Gilbertmigration (or once already in postcopy). 10854886a1bcSDr. David Alan GilbertETEXI 10864886a1bcSDr. David Alan Gilbert 10874886a1bcSDr. David Alan Gilbert { 1088d89e666eSzhanghailiang .name = "x_colo_lost_heartbeat", 1089d89e666eSzhanghailiang .args_type = "", 1090d89e666eSzhanghailiang .params = "", 1091d89e666eSzhanghailiang .help = "Tell COLO that heartbeat is lost,\n\t\t\t" 1092d89e666eSzhanghailiang "a failover or takeover is needed.", 1093d89e666eSzhanghailiang .cmd = hmp_x_colo_lost_heartbeat, 1094d89e666eSzhanghailiang }, 1095d89e666eSzhanghailiang 1096d89e666eSzhanghailiangSTEXI 1097d89e666eSzhanghailiang@item x_colo_lost_heartbeat 1098d89e666eSzhanghailiang@findex x_colo_lost_heartbeat 1099d89e666eSzhanghailiangTell COLO that heartbeat is lost, a failover or takeover is needed. 1100d89e666eSzhanghailiangETEXI 1101d89e666eSzhanghailiang 1102d89e666eSzhanghailiang { 11032ea720dbSJes Sorensen .name = "client_migrate_info", 11042ea720dbSJes Sorensen .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?", 11052ea720dbSJes Sorensen .params = "protocol hostname port tls-port cert-subject", 110613cadefbSMarkus Armbruster .help = "set migration information for remote display", 11072b9e3576SMarc-André Lureau .cmd = hmp_client_migrate_info, 1108f8882568SJes Sorensen }, 1109f8882568SJes Sorensen 1110f8882568SJes SorensenSTEXI 1111e866e239SGerd Hoffmann@item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject} 1112e866e239SGerd Hoffmann@findex client_migrate_info 111313cadefbSMarkus ArmbrusterSet migration information for remote display. This makes the server 111413cadefbSMarkus Armbrusterask the client to automatically reconnect using the new parameters 111513cadefbSMarkus Armbrusteronce migration finished successfully. Only implemented for SPICE. 1116e866e239SGerd HoffmannETEXI 1117e866e239SGerd Hoffmann 1118783e9b48SWen Congyang { 1119783e9b48SWen Congyang .name = "dump-guest-memory", 112065fa57b0SSuraj Jitindar Singh .args_type = "paging:-p,detach:-d,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:l?,length:l?", 1121228de9cfSPeter Xu .params = "[-p] [-d] [-z|-l|-s] filename [begin length]", 1122c20499d9SQiao Nuohan .help = "dump guest memory into file 'filename'.\n\t\t\t" 1123c20499d9SQiao Nuohan "-p: do paging to get guest's memory mapping.\n\t\t\t" 1124228de9cfSPeter Xu "-d: return immediately (do not wait for completion).\n\t\t\t" 11251b7a0f75SQiao Nuohan "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t" 11261b7a0f75SQiao Nuohan "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t" 11271b7a0f75SQiao Nuohan "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t" 1128c20499d9SQiao Nuohan "begin: the starting physical address.\n\t\t\t" 1129c20499d9SQiao Nuohan "length: the memory size, in bytes.", 11302b9e3576SMarc-André Lureau .cmd = hmp_dump_guest_memory, 1131783e9b48SWen Congyang }, 1132783e9b48SWen Congyang 1133783e9b48SWen Congyang 1134783e9b48SWen CongyangSTEXI 1135c20499d9SQiao Nuohan@item dump-guest-memory [-p] @var{filename} @var{begin} @var{length} 11361b7a0f75SQiao Nuohan@item dump-guest-memory [-z|-l|-s] @var{filename} 1137783e9b48SWen Congyang@findex dump-guest-memory 1138783e9b48SWen CongyangDump guest memory to @var{protocol}. The file can be processed with crash or 11391b7a0f75SQiao Nuohangdb. Without -z|-l|-s, the dump format is ELF. 1140c20499d9SQiao Nuohan -p: do paging to get guest's memory mapping. 11411b7a0f75SQiao Nuohan -z: dump in kdump-compressed format, with zlib compression. 11421b7a0f75SQiao Nuohan -l: dump in kdump-compressed format, with lzo compression. 11431b7a0f75SQiao Nuohan -s: dump in kdump-compressed format, with snappy compression. 1144c20499d9SQiao Nuohan filename: dump file name. 1145783e9b48SWen Congyang begin: the starting physical address. It's optional, and should be 1146c20499d9SQiao Nuohan specified together with length. 1147783e9b48SWen Congyang length: the memory size, in bytes. It's optional, and should be specified 1148c20499d9SQiao Nuohan together with begin. 1149783e9b48SWen CongyangETEXI 1150783e9b48SWen Congyang 1151a4538a5cSJason J. Herne#if defined(TARGET_S390X) 1152a4538a5cSJason J. Herne { 1153a4538a5cSJason J. Herne .name = "dump-skeys", 1154a4538a5cSJason J. Herne .args_type = "filename:F", 1155a4538a5cSJason J. Herne .params = "", 1156a4538a5cSJason J. Herne .help = "Save guest storage keys into file 'filename'.\n", 11572b9e3576SMarc-André Lureau .cmd = hmp_dump_skeys, 1158a4538a5cSJason J. Herne }, 1159a4538a5cSJason J. Herne#endif 1160a4538a5cSJason J. Herne 1161a4538a5cSJason J. HerneSTEXI 1162a4538a5cSJason J. Herne@item dump-skeys @var{filename} 1163a4538a5cSJason J. Herne@findex dump-skeys 1164a4538a5cSJason J. HerneSave guest storage keys to a file. 1165a4538a5cSJason J. HerneETEXI 1166a4538a5cSJason J. Herne 1167f860d497SClaudio Imbrenda#if defined(TARGET_S390X) 1168f860d497SClaudio Imbrenda { 1169f860d497SClaudio Imbrenda .name = "migration_mode", 1170f860d497SClaudio Imbrenda .args_type = "mode:i", 1171f860d497SClaudio Imbrenda .params = "mode", 1172f860d497SClaudio Imbrenda .help = "Enables or disables migration mode\n", 1173f860d497SClaudio Imbrenda .cmd = hmp_migrationmode, 1174f860d497SClaudio Imbrenda }, 1175f860d497SClaudio Imbrenda#endif 1176f860d497SClaudio Imbrenda 1177f860d497SClaudio ImbrendaSTEXI 1178f860d497SClaudio Imbrenda@item migration_mode @var{mode} 1179f860d497SClaudio Imbrenda@findex migration_mode 1180f860d497SClaudio ImbrendaEnables or disables migration mode. 1181f860d497SClaudio ImbrendaETEXI 1182f860d497SClaudio Imbrenda 1183e866e239SGerd Hoffmann { 11842ea720dbSJes Sorensen .name = "snapshot_blkdev", 11856cc2a415SPaolo Bonzini .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?", 11866cc2a415SPaolo Bonzini .params = "[-n] device [new-image-file] [format]", 11872ea720dbSJes Sorensen .help = "initiates a live snapshot\n\t\t\t" 11882ea720dbSJes Sorensen "of device. If a new image file is specified, the\n\t\t\t" 11892ea720dbSJes Sorensen "new image file will become the new root image.\n\t\t\t" 11902ea720dbSJes Sorensen "If format is specified, the snapshot file will\n\t\t\t" 1191775ca88eSWenchao Xia "be created in that format.\n\t\t\t" 11926cc2a415SPaolo Bonzini "The default format is qcow2. The -n flag requests QEMU\n\t\t\t" 11936cc2a415SPaolo Bonzini "to reuse the image found in new-image-file, instead of\n\t\t\t" 11946cc2a415SPaolo Bonzini "recreating it from scratch.", 11952b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev, 1196e866e239SGerd Hoffmann }, 1197e866e239SGerd Hoffmann 1198e866e239SGerd HoffmannSTEXI 1199f8882568SJes Sorensen@item snapshot_blkdev 1200f8882568SJes Sorensen@findex snapshot_blkdev 1201f8882568SJes SorensenSnapshot device, using snapshot file as target if provided 1202f8882568SJes SorensenETEXI 1203f8882568SJes Sorensen 1204d7f9b689SLuiz Capitulino { 1205775ca88eSWenchao Xia .name = "snapshot_blkdev_internal", 1206775ca88eSWenchao Xia .args_type = "device:B,name:s", 1207775ca88eSWenchao Xia .params = "device name", 1208775ca88eSWenchao Xia .help = "take an internal snapshot of device.\n\t\t\t" 1209775ca88eSWenchao Xia "The format of the image used by device must\n\t\t\t" 1210775ca88eSWenchao Xia "support it, such as qcow2.\n\t\t\t", 12112b9e3576SMarc-André Lureau .cmd = hmp_snapshot_blkdev_internal, 1212775ca88eSWenchao Xia }, 1213775ca88eSWenchao Xia 1214775ca88eSWenchao XiaSTEXI 1215775ca88eSWenchao Xia@item snapshot_blkdev_internal 1216775ca88eSWenchao Xia@findex snapshot_blkdev_internal 1217775ca88eSWenchao XiaTake an internal snapshot on device if it support 1218775ca88eSWenchao XiaETEXI 1219775ca88eSWenchao Xia 1220775ca88eSWenchao Xia { 12217a4ed2eeSWenchao Xia .name = "snapshot_delete_blkdev_internal", 12227a4ed2eeSWenchao Xia .args_type = "device:B,name:s,id:s?", 12237a4ed2eeSWenchao Xia .params = "device name [id]", 12247a4ed2eeSWenchao Xia .help = "delete an internal snapshot of device.\n\t\t\t" 12257a4ed2eeSWenchao Xia "If id is specified, qemu will try delete\n\t\t\t" 12267a4ed2eeSWenchao Xia "the snapshot matching both id and name.\n\t\t\t" 12277a4ed2eeSWenchao Xia "The format of the image used by device must\n\t\t\t" 12287a4ed2eeSWenchao Xia "support it, such as qcow2.\n\t\t\t", 12292b9e3576SMarc-André Lureau .cmd = hmp_snapshot_delete_blkdev_internal, 12307a4ed2eeSWenchao Xia }, 12317a4ed2eeSWenchao Xia 12327a4ed2eeSWenchao XiaSTEXI 12337a4ed2eeSWenchao Xia@item snapshot_delete_blkdev_internal 12347a4ed2eeSWenchao Xia@findex snapshot_delete_blkdev_internal 12357a4ed2eeSWenchao XiaDelete an internal snapshot on device if it support 12367a4ed2eeSWenchao XiaETEXI 12377a4ed2eeSWenchao Xia 12387a4ed2eeSWenchao Xia { 1239d9b902dbSPaolo Bonzini .name = "drive_mirror", 1240d9b902dbSPaolo Bonzini .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?", 1241d9b902dbSPaolo Bonzini .params = "[-n] [-f] device target [format]", 1242d9b902dbSPaolo Bonzini .help = "initiates live storage\n\t\t\t" 1243d9b902dbSPaolo Bonzini "migration for a device. The device's contents are\n\t\t\t" 1244d9b902dbSPaolo Bonzini "copied to the new image file, including data that\n\t\t\t" 1245d9b902dbSPaolo Bonzini "is written after the command is started.\n\t\t\t" 1246d9b902dbSPaolo Bonzini "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1247d9b902dbSPaolo Bonzini "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1248d9b902dbSPaolo Bonzini "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 1249d9b902dbSPaolo Bonzini "so that the result does not need a backing file.\n\t\t\t", 12502b9e3576SMarc-André Lureau .cmd = hmp_drive_mirror, 1251d9b902dbSPaolo Bonzini }, 1252d9b902dbSPaolo BonziniSTEXI 1253d9b902dbSPaolo Bonzini@item drive_mirror 1254d9b902dbSPaolo Bonzini@findex drive_mirror 1255d9b902dbSPaolo BonziniStart mirroring a block device's writes to a new destination, 1256d9b902dbSPaolo Bonziniusing the specified target. 1257d9b902dbSPaolo BonziniETEXI 1258d9b902dbSPaolo Bonzini 1259d9b902dbSPaolo Bonzini { 1260de90930aSStefan Hajnoczi .name = "drive_backup", 126113b9414bSPavel Butsykin .args_type = "reuse:-n,full:-f,compress:-c,device:B,target:s,format:s?", 126213b9414bSPavel Butsykin .params = "[-n] [-f] [-c] device target [format]", 1263de90930aSStefan Hajnoczi .help = "initiates a point-in-time\n\t\t\t" 1264de90930aSStefan Hajnoczi "copy for a device. The device's contents are\n\t\t\t" 1265de90930aSStefan Hajnoczi "copied to the new image file, excluding data that\n\t\t\t" 1266de90930aSStefan Hajnoczi "is written after the command is started.\n\t\t\t" 1267de90930aSStefan Hajnoczi "The -n flag requests QEMU to reuse the image found\n\t\t\t" 1268de90930aSStefan Hajnoczi "in new-image-file, instead of recreating it from scratch.\n\t\t\t" 1269de90930aSStefan Hajnoczi "The -f flag requests QEMU to copy the whole disk,\n\t\t\t" 127013b9414bSPavel Butsykin "so that the result does not need a backing file.\n\t\t\t" 127113b9414bSPavel Butsykin "The -c flag requests QEMU to compress backup data\n\t\t\t" 127213b9414bSPavel Butsykin "(if the target format supports it).\n\t\t\t", 12732b9e3576SMarc-André Lureau .cmd = hmp_drive_backup, 1274de90930aSStefan Hajnoczi }, 1275de90930aSStefan HajnocziSTEXI 1276de90930aSStefan Hajnoczi@item drive_backup 1277de90930aSStefan Hajnoczi@findex drive_backup 1278de90930aSStefan HajnocziStart a point-in-time copy of a block device to a specificed target. 1279de90930aSStefan HajnocziETEXI 1280de90930aSStefan Hajnoczi 1281de90930aSStefan Hajnoczi { 1282d7f9b689SLuiz Capitulino .name = "drive_add", 1283abb21ac3SKevin Wolf .args_type = "node:-n,pci_addr:s,opts:s", 1284abb21ac3SKevin Wolf .params = "[-n] [[<domain>:]<bus>:]<slot>\n" 12852313086aSBlue Swirl "[file=file][,if=type][,bus=n]\n" 1286fb0490f6SStefan Hajnoczi "[,unit=m][,media=d][,index=i]\n" 1287fb0490f6SStefan Hajnoczi "[,snapshot=on|off][,cache=on|off]\n" 1288fb0490f6SStefan Hajnoczi "[,readonly=on|off][,copy-on-read=on|off]", 1289d7f9b689SLuiz Capitulino .help = "add drive to PCI storage controller", 12902b9e3576SMarc-André Lureau .cmd = hmp_drive_add, 1291d7f9b689SLuiz Capitulino }, 1292d7f9b689SLuiz Capitulino 12932313086aSBlue SwirlSTEXI 12942313086aSBlue Swirl@item drive_add 129570fcbbe7SStefan Weil@findex drive_add 12962313086aSBlue SwirlAdd drive to PCI storage controller. 12972313086aSBlue SwirlETEXI 12982313086aSBlue Swirl 1299d7f9b689SLuiz Capitulino { 13002ae63bdaSIsaku Yamahata .name = "pcie_aer_inject_error", 13012ae63bdaSIsaku Yamahata .args_type = "advisory_non_fatal:-a,correctable:-c," 13022ae63bdaSIsaku Yamahata "id:s,error_status:s," 13032ae63bdaSIsaku Yamahata "header0:i?,header1:i?,header2:i?,header3:i?," 13042ae63bdaSIsaku Yamahata "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?", 13052ae63bdaSIsaku Yamahata .params = "[-a] [-c] id " 13062ae63bdaSIsaku Yamahata "<error_status> [<tlp header> [<tlp header prefix>]]", 13072ae63bdaSIsaku Yamahata .help = "inject pcie aer error\n\t\t\t" 13082ae63bdaSIsaku Yamahata " -a for advisory non fatal error\n\t\t\t" 13092ae63bdaSIsaku Yamahata " -c for correctable error\n\t\t\t" 13102ae63bdaSIsaku Yamahata "<id> = qdev device id\n\t\t\t" 13112ae63bdaSIsaku Yamahata "<error_status> = error string or 32bit\n\t\t\t" 13122ae63bdaSIsaku Yamahata "<tlb header> = 32bit x 4\n\t\t\t" 13132ae63bdaSIsaku Yamahata "<tlb header prefix> = 32bit x 4", 13142b9e3576SMarc-André Lureau .cmd = hmp_pcie_aer_inject_error, 13152ae63bdaSIsaku Yamahata }, 13162ae63bdaSIsaku Yamahata 13172ae63bdaSIsaku YamahataSTEXI 13182ae63bdaSIsaku Yamahata@item pcie_aer_inject_error 13192ae63bdaSIsaku Yamahata@findex pcie_aer_inject_error 13202ae63bdaSIsaku YamahataInject PCIe AER error 13212ae63bdaSIsaku YamahataETEXI 13222ae63bdaSIsaku Yamahata 13232ae63bdaSIsaku Yamahata { 1324ae82d324SMarkus Armbruster .name = "netdev_add", 1325ae82d324SMarkus Armbruster .args_type = "netdev:O", 132603ce5744SNikolay Nikolaev .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]", 1327ae82d324SMarkus Armbruster .help = "add host network device", 13282b9e3576SMarc-André Lureau .cmd = hmp_netdev_add, 1329b162b49aSHani Benhabiles .command_completion = netdev_add_completion, 1330ae82d324SMarkus Armbruster }, 1331ae82d324SMarkus Armbruster 1332ae82d324SMarkus ArmbrusterSTEXI 1333ae82d324SMarkus Armbruster@item netdev_add 1334ae82d324SMarkus Armbruster@findex netdev_add 1335ae82d324SMarkus ArmbrusterAdd host network device. 1336ae82d324SMarkus ArmbrusterETEXI 1337ae82d324SMarkus Armbruster 1338ae82d324SMarkus Armbruster { 1339ae82d324SMarkus Armbruster .name = "netdev_del", 1340ae82d324SMarkus Armbruster .args_type = "id:s", 1341ae82d324SMarkus Armbruster .params = "id", 1342ae82d324SMarkus Armbruster .help = "remove host network device", 13432b9e3576SMarc-André Lureau .cmd = hmp_netdev_del, 134411b389f2SHani Benhabiles .command_completion = netdev_del_completion, 1345ae82d324SMarkus Armbruster }, 1346ae82d324SMarkus Armbruster 1347ae82d324SMarkus ArmbrusterSTEXI 1348ae82d324SMarkus Armbruster@item netdev_del 1349ae82d324SMarkus Armbruster@findex netdev_del 1350ae82d324SMarkus ArmbrusterRemove host network device. 1351ae82d324SMarkus ArmbrusterETEXI 1352ae82d324SMarkus Armbruster 1353ab2d0531SPaolo Bonzini { 1354cff8b2c6SPaolo Bonzini .name = "object_add", 1355cff8b2c6SPaolo Bonzini .args_type = "object:O", 1356cff8b2c6SPaolo Bonzini .params = "[qom-type=]type,id=str[,prop=value][,...]", 1357cff8b2c6SPaolo Bonzini .help = "create QOM object", 13582b9e3576SMarc-André Lureau .cmd = hmp_object_add, 1359bfa40f77SHani Benhabiles .command_completion = object_add_completion, 1360cff8b2c6SPaolo Bonzini }, 1361cff8b2c6SPaolo Bonzini 1362cff8b2c6SPaolo BonziniSTEXI 1363cff8b2c6SPaolo Bonzini@item object_add 1364cff8b2c6SPaolo Bonzini@findex object_add 1365cff8b2c6SPaolo BonziniCreate QOM object. 1366cff8b2c6SPaolo BonziniETEXI 1367cff8b2c6SPaolo Bonzini 1368cff8b2c6SPaolo Bonzini { 1369ab2d0531SPaolo Bonzini .name = "object_del", 1370ab2d0531SPaolo Bonzini .args_type = "id:s", 1371ab2d0531SPaolo Bonzini .params = "id", 1372ab2d0531SPaolo Bonzini .help = "destroy QOM object", 13732b9e3576SMarc-André Lureau .cmd = hmp_object_del, 1374bfa40f77SHani Benhabiles .command_completion = object_del_completion, 1375ab2d0531SPaolo Bonzini }, 1376ab2d0531SPaolo Bonzini 1377ab2d0531SPaolo BonziniSTEXI 1378ab2d0531SPaolo Bonzini@item object_del 1379ab2d0531SPaolo Bonzini@findex object_del 1380ab2d0531SPaolo BonziniDestroy QOM object. 1381ab2d0531SPaolo BonziniETEXI 1382ab2d0531SPaolo Bonzini 13832313086aSBlue Swirl#ifdef CONFIG_SLIRP 1384d7f9b689SLuiz Capitulino { 1385d7f9b689SLuiz Capitulino .name = "hostfwd_add", 1386d7f9b689SLuiz Capitulino .args_type = "arg1:s,arg2:s?,arg3:s?", 138793653066SThomas Huth .params = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", 1388d7f9b689SLuiz Capitulino .help = "redirect TCP or UDP connections from host to guest (requires -net user)", 13892b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_add, 1390d7f9b689SLuiz Capitulino }, 139121413d68SMarkus Armbruster#endif 139221413d68SMarkus ArmbrusterSTEXI 139321413d68SMarkus Armbruster@item hostfwd_add 139421413d68SMarkus Armbruster@findex hostfwd_add 139521413d68SMarkus ArmbrusterRedirect TCP or UDP connections from host to guest (requires -net user). 139621413d68SMarkus ArmbrusterETEXI 1397d7f9b689SLuiz Capitulino 139821413d68SMarkus Armbruster#ifdef CONFIG_SLIRP 1399d7f9b689SLuiz Capitulino { 1400d7f9b689SLuiz Capitulino .name = "hostfwd_remove", 1401d7f9b689SLuiz Capitulino .args_type = "arg1:s,arg2:s?,arg3:s?", 140293653066SThomas Huth .params = "[hub_id name]|[netdev_id] [tcp|udp]:[hostaddr]:hostport", 1403d7f9b689SLuiz Capitulino .help = "remove host-to-guest TCP or UDP redirection", 14042b9e3576SMarc-André Lureau .cmd = hmp_hostfwd_remove, 1405d7f9b689SLuiz Capitulino }, 1406d7f9b689SLuiz Capitulino 14072313086aSBlue Swirl#endif 14082313086aSBlue SwirlSTEXI 140921413d68SMarkus Armbruster@item hostfwd_remove 141021413d68SMarkus Armbruster@findex hostfwd_remove 141121413d68SMarkus ArmbrusterRemove host-to-guest TCP or UDP redirection. 14122313086aSBlue SwirlETEXI 14132313086aSBlue Swirl 1414d7f9b689SLuiz Capitulino { 1415d7f9b689SLuiz Capitulino .name = "balloon", 14163b0bd6ecSLuiz Capitulino .args_type = "value:M", 1417d7f9b689SLuiz Capitulino .params = "target", 14183c05613aSRiccardo Magliocchetti .help = "request VM to change its memory allocation (in MB)", 14192b9e3576SMarc-André Lureau .cmd = hmp_balloon, 1420d7f9b689SLuiz Capitulino }, 1421d7f9b689SLuiz Capitulino 14222313086aSBlue SwirlSTEXI 14232313086aSBlue Swirl@item balloon @var{value} 142470fcbbe7SStefan Weil@findex balloon 14252313086aSBlue SwirlRequest VM to change its memory allocation to @var{value} (in MB). 14262313086aSBlue SwirlETEXI 14272313086aSBlue Swirl 1428d7f9b689SLuiz Capitulino { 1429d7f9b689SLuiz Capitulino .name = "set_link", 1430c9b26a4cSMarkus Armbruster .args_type = "name:s,up:b", 1431c9b26a4cSMarkus Armbruster .params = "name on|off", 1432d7f9b689SLuiz Capitulino .help = "change the link status of a network adapter", 14332b9e3576SMarc-André Lureau .cmd = hmp_set_link, 143440d19394SHani Benhabiles .command_completion = set_link_completion, 1435d7f9b689SLuiz Capitulino }, 1436d7f9b689SLuiz Capitulino 14372313086aSBlue SwirlSTEXI 1438c9b26a4cSMarkus Armbruster@item set_link @var{name} [on|off] 143970fcbbe7SStefan Weil@findex set_link 1440c9b26a4cSMarkus ArmbrusterSwitch link @var{name} on (i.e. up) or off (i.e. down). 14412313086aSBlue SwirlETEXI 14422313086aSBlue Swirl 1443d7f9b689SLuiz Capitulino { 1444d7f9b689SLuiz Capitulino .name = "watchdog_action", 1445d7f9b689SLuiz Capitulino .args_type = "action:s", 1446d7f9b689SLuiz Capitulino .params = "[reset|shutdown|poweroff|pause|debug|none]", 1447d7f9b689SLuiz Capitulino .help = "change watchdog action", 14482b9e3576SMarc-André Lureau .cmd = hmp_watchdog_action, 1449d0ece345SHani Benhabiles .command_completion = watchdog_action_completion, 1450d7f9b689SLuiz Capitulino }, 1451d7f9b689SLuiz Capitulino 14522313086aSBlue SwirlSTEXI 14532313086aSBlue Swirl@item watchdog_action 145470fcbbe7SStefan Weil@findex watchdog_action 14552313086aSBlue SwirlChange watchdog action. 14562313086aSBlue SwirlETEXI 14572313086aSBlue Swirl 1458d7f9b689SLuiz Capitulino { 1459d7f9b689SLuiz Capitulino .name = "acl_show", 1460d7f9b689SLuiz Capitulino .args_type = "aclname:s", 1461d7f9b689SLuiz Capitulino .params = "aclname", 1462d7f9b689SLuiz Capitulino .help = "list rules in the access control list", 14632b9e3576SMarc-André Lureau .cmd = hmp_acl_show, 1464d7f9b689SLuiz Capitulino }, 1465d7f9b689SLuiz Capitulino 14662313086aSBlue SwirlSTEXI 146715dfcd45SJan Kiszka@item acl_show @var{aclname} 146870fcbbe7SStefan Weil@findex acl_show 146915dfcd45SJan KiszkaList all the matching rules in the access control list, and the default 147015dfcd45SJan Kiszkapolicy. There are currently two named access control lists, 147115dfcd45SJan Kiszka@var{vnc.x509dname} and @var{vnc.username} matching on the x509 client 147215dfcd45SJan Kiszkacertificate distinguished name, and SASL username respectively. 147315dfcd45SJan KiszkaETEXI 14742313086aSBlue Swirl 1475d7f9b689SLuiz Capitulino { 1476d7f9b689SLuiz Capitulino .name = "acl_policy", 1477d7f9b689SLuiz Capitulino .args_type = "aclname:s,policy:s", 1478d7f9b689SLuiz Capitulino .params = "aclname allow|deny", 1479d7f9b689SLuiz Capitulino .help = "set default access control list policy", 14802b9e3576SMarc-André Lureau .cmd = hmp_acl_policy, 1481d7f9b689SLuiz Capitulino }, 1482d7f9b689SLuiz Capitulino 148315dfcd45SJan KiszkaSTEXI 1484cbbfacc6SJan Kiszka@item acl_policy @var{aclname} @code{allow|deny} 148570fcbbe7SStefan Weil@findex acl_policy 148615dfcd45SJan KiszkaSet the default access control list policy, used in the event that 14872313086aSBlue Swirlnone of the explicit rules match. The default policy at startup is 148815dfcd45SJan Kiszkaalways @code{deny}. 148915dfcd45SJan KiszkaETEXI 149015dfcd45SJan Kiszka 1491d7f9b689SLuiz Capitulino { 1492d7f9b689SLuiz Capitulino .name = "acl_add", 1493d7f9b689SLuiz Capitulino .args_type = "aclname:s,match:s,policy:s,index:i?", 1494d7f9b689SLuiz Capitulino .params = "aclname match allow|deny [index]", 1495d7f9b689SLuiz Capitulino .help = "add a match rule to the access control list", 14962b9e3576SMarc-André Lureau .cmd = hmp_acl_add, 1497d7f9b689SLuiz Capitulino }, 1498d7f9b689SLuiz Capitulino 149915dfcd45SJan KiszkaSTEXI 15000e4aec98SMarkus Armbruster@item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}] 15010e4aec98SMarkus Armbruster@findex acl_add 150215dfcd45SJan KiszkaAdd a match rule to the access control list, allowing or denying access. 150315dfcd45SJan KiszkaThe match will normally be an exact username or x509 distinguished name, 150415dfcd45SJan Kiszkabut can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to 150515dfcd45SJan Kiszkaallow all users in the @code{EXAMPLE.COM} kerberos realm. The match will 15062313086aSBlue Swirlnormally be appended to the end of the ACL, but can be inserted 150715dfcd45SJan Kiszkaearlier in the list if the optional @var{index} parameter is supplied. 150815dfcd45SJan KiszkaETEXI 150915dfcd45SJan Kiszka 1510d7f9b689SLuiz Capitulino { 1511d7f9b689SLuiz Capitulino .name = "acl_remove", 1512d7f9b689SLuiz Capitulino .args_type = "aclname:s,match:s", 1513d7f9b689SLuiz Capitulino .params = "aclname match", 1514d7f9b689SLuiz Capitulino .help = "remove a match rule from the access control list", 15152b9e3576SMarc-André Lureau .cmd = hmp_acl_remove, 1516d7f9b689SLuiz Capitulino }, 1517d7f9b689SLuiz Capitulino 151815dfcd45SJan KiszkaSTEXI 151915dfcd45SJan Kiszka@item acl_remove @var{aclname} @var{match} 152070fcbbe7SStefan Weil@findex acl_remove 152115dfcd45SJan KiszkaRemove the specified match rule from the access control list. 152215dfcd45SJan KiszkaETEXI 152315dfcd45SJan Kiszka 1524d7f9b689SLuiz Capitulino { 1525d7f9b689SLuiz Capitulino .name = "acl_reset", 1526d7f9b689SLuiz Capitulino .args_type = "aclname:s", 1527d7f9b689SLuiz Capitulino .params = "aclname", 1528d7f9b689SLuiz Capitulino .help = "reset the access control list", 15292b9e3576SMarc-André Lureau .cmd = hmp_acl_reset, 1530d7f9b689SLuiz Capitulino }, 1531d7f9b689SLuiz Capitulino 153215dfcd45SJan KiszkaSTEXI 15330e4aec98SMarkus Armbruster@item acl_reset @var{aclname} 15340e4aec98SMarkus Armbruster@findex acl_reset 153515dfcd45SJan KiszkaRemove all matches from the access control list, and set the default 15362313086aSBlue Swirlpolicy back to @code{deny}. 15372313086aSBlue SwirlETEXI 15382313086aSBlue Swirl 15394057725fSPaolo Bonzini { 15404057725fSPaolo Bonzini .name = "nbd_server_start", 15414057725fSPaolo Bonzini .args_type = "all:-a,writable:-w,uri:s", 15424057725fSPaolo Bonzini .params = "nbd_server_start [-a] [-w] host:port", 15434057725fSPaolo Bonzini .help = "serve block devices on the given host and port", 15442b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_start, 15454057725fSPaolo Bonzini }, 15464057725fSPaolo BonziniSTEXI 15474057725fSPaolo Bonzini@item nbd_server_start @var{host}:@var{port} 15484057725fSPaolo Bonzini@findex nbd_server_start 15494057725fSPaolo BonziniStart an NBD server on the given host and/or port. If the @option{-a} 15504057725fSPaolo Bonzinioption is included, all of the virtual machine's block devices that 15514057725fSPaolo Bonzinihave an inserted media on them are automatically exported; in this case, 15524057725fSPaolo Bonzinithe @option{-w} option makes the devices writable too. 15534057725fSPaolo BonziniETEXI 15544057725fSPaolo Bonzini 15554057725fSPaolo Bonzini { 15564057725fSPaolo Bonzini .name = "nbd_server_add", 1557dba49323SEric Blake .args_type = "writable:-w,device:B,name:s?", 1558dba49323SEric Blake .params = "nbd_server_add [-w] device [name]", 15594057725fSPaolo Bonzini .help = "export a block device via NBD", 15602b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_add, 15614057725fSPaolo Bonzini }, 15624057725fSPaolo BonziniSTEXI 1563dba49323SEric Blake@item nbd_server_add @var{device} [ @var{name} ] 15644057725fSPaolo Bonzini@findex nbd_server_add 15654057725fSPaolo BonziniExport a block device through QEMU's NBD server, which must be started 15664057725fSPaolo Bonzinibeforehand with @command{nbd_server_start}. The @option{-w} option makes the 1567dba49323SEric Blakeexported device writable too. The export name is controlled by @var{name}, 1568dba49323SEric Blakedefaulting to @var{device}. 15694057725fSPaolo BonziniETEXI 15704057725fSPaolo Bonzini 15714057725fSPaolo Bonzini { 157208fb10a7SEric Blake .name = "nbd_server_remove", 157308fb10a7SEric Blake .args_type = "force:-f,name:s", 157408fb10a7SEric Blake .params = "nbd_server_remove [-f] name", 157508fb10a7SEric Blake .help = "remove an export previously exposed via NBD", 157608fb10a7SEric Blake .cmd = hmp_nbd_server_remove, 157708fb10a7SEric Blake }, 157808fb10a7SEric BlakeSTEXI 157908fb10a7SEric Blake@item nbd_server_remove [-f] @var{name} 158008fb10a7SEric Blake@findex nbd_server_remove 158108fb10a7SEric BlakeStop exporting a block device through QEMU's NBD server, which was 158208fb10a7SEric Blakepreviously started with @command{nbd_server_add}. The @option{-f} 158308fb10a7SEric Blakeoption forces the server to drop the export immediately even if 158408fb10a7SEric Blakeclients are connected; otherwise the command fails unless there are no 158508fb10a7SEric Blakeclients. 158608fb10a7SEric BlakeETEXI 158708fb10a7SEric Blake 158808fb10a7SEric Blake { 15894057725fSPaolo Bonzini .name = "nbd_server_stop", 15904057725fSPaolo Bonzini .args_type = "", 15914057725fSPaolo Bonzini .params = "nbd_server_stop", 15924057725fSPaolo Bonzini .help = "stop serving block devices using the NBD protocol", 15932b9e3576SMarc-André Lureau .cmd = hmp_nbd_server_stop, 15944057725fSPaolo Bonzini }, 15954057725fSPaolo BonziniSTEXI 15964057725fSPaolo Bonzini@item nbd_server_stop 15974057725fSPaolo Bonzini@findex nbd_server_stop 15984057725fSPaolo BonziniStop the QEMU embedded NBD server. 15994057725fSPaolo BonziniETEXI 16004057725fSPaolo Bonzini 16014057725fSPaolo Bonzini 160279c4f6b0SHuang Ying#if defined(TARGET_I386) 1603d7f9b689SLuiz Capitulino 1604d7f9b689SLuiz Capitulino { 1605d7f9b689SLuiz Capitulino .name = "mce", 160631ce5e0cSJin Dongming .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", 160731ce5e0cSJin Dongming .params = "[-b] cpu bank status mcgstatus addr misc", 160831ce5e0cSJin Dongming .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", 16092b9e3576SMarc-André Lureau .cmd = hmp_mce, 1610d7f9b689SLuiz Capitulino }, 1611d7f9b689SLuiz Capitulino 161279c4f6b0SHuang Ying#endif 161379c4f6b0SHuang YingSTEXI 161479c4f6b0SHuang Ying@item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc} 161570fcbbe7SStefan Weil@findex mce (x86) 161679c4f6b0SHuang YingInject an MCE on the given CPU (x86 only). 161779c4f6b0SHuang YingETEXI 161879c4f6b0SHuang Ying 1619d7f9b689SLuiz Capitulino { 1620d7f9b689SLuiz Capitulino .name = "getfd", 1621d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1622d7f9b689SLuiz Capitulino .params = "getfd name", 1623d7f9b689SLuiz Capitulino .help = "receive a file descriptor via SCM rights and assign it a name", 16242b9e3576SMarc-André Lureau .cmd = hmp_getfd, 1625d7f9b689SLuiz Capitulino }, 1626d7f9b689SLuiz Capitulino 1627f07918fdSMark McLoughlinSTEXI 1628f07918fdSMark McLoughlin@item getfd @var{fdname} 162970fcbbe7SStefan Weil@findex getfd 1630f07918fdSMark McLoughlinIf a file descriptor is passed alongside this command using the SCM_RIGHTS 1631f07918fdSMark McLoughlinmechanism on unix sockets, it is stored using the name @var{fdname} for 1632f07918fdSMark McLoughlinlater use by other monitor commands. 1633f07918fdSMark McLoughlinETEXI 1634f07918fdSMark McLoughlin 1635d7f9b689SLuiz Capitulino { 1636d7f9b689SLuiz Capitulino .name = "closefd", 1637d7f9b689SLuiz Capitulino .args_type = "fdname:s", 1638d7f9b689SLuiz Capitulino .params = "closefd name", 1639d7f9b689SLuiz Capitulino .help = "close a file descriptor previously passed via SCM rights", 16402b9e3576SMarc-André Lureau .cmd = hmp_closefd, 1641d7f9b689SLuiz Capitulino }, 1642d7f9b689SLuiz Capitulino 1643f07918fdSMark McLoughlinSTEXI 1644f07918fdSMark McLoughlin@item closefd @var{fdname} 164570fcbbe7SStefan Weil@findex closefd 1646f07918fdSMark McLoughlinClose the file descriptor previously assigned to @var{fdname} using the 1647f07918fdSMark McLoughlin@code{getfd} command. This is only needed if the file descriptor was never 1648f07918fdSMark McLoughlinused by another monitor command. 1649f07918fdSMark McLoughlinETEXI 1650f07918fdSMark McLoughlin 1651a3a55a2eSLuiz Capitulino { 1652a3a55a2eSLuiz Capitulino .name = "block_passwd", 1653a3a55a2eSLuiz Capitulino .args_type = "device:B,password:s", 1654a3a55a2eSLuiz Capitulino .params = "block_passwd device password", 1655a3a55a2eSLuiz Capitulino .help = "set the password of encrypted block devices", 16562b9e3576SMarc-André Lureau .cmd = hmp_block_passwd, 1657a3a55a2eSLuiz Capitulino }, 1658a3a55a2eSLuiz Capitulino 1659a3a55a2eSLuiz CapitulinoSTEXI 1660b76d799eSMarkus Armbruster@item block_passwd @var{device} @var{password} 1661b76d799eSMarkus Armbruster@findex block_passwd 1662b76d799eSMarkus ArmbrusterSet the encrypted device @var{device} password to @var{password} 1663c01c214bSDaniel P. Berrange 1664c01c214bSDaniel P. BerrangeThis command is now obsolete and will always return an error since 2.10 1665727f005eSZhi Yong WuETEXI 1666727f005eSZhi Yong Wu 1667727f005eSZhi Yong Wu { 1668727f005eSZhi Yong Wu .name = "block_set_io_throttle", 1669727f005eSZhi Yong Wu .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l", 1670727f005eSZhi Yong Wu .params = "device bps bps_rd bps_wr iops iops_rd iops_wr", 1671727f005eSZhi Yong Wu .help = "change I/O throttle limits for a block drive", 16722b9e3576SMarc-André Lureau .cmd = hmp_block_set_io_throttle, 1673727f005eSZhi Yong Wu }, 1674727f005eSZhi Yong Wu 1675727f005eSZhi Yong WuSTEXI 1676b76d799eSMarkus Armbruster@item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr} 1677b76d799eSMarkus Armbruster@findex block_set_io_throttle 167883592184SAlberto GarciaChange 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}. 167983592184SAlberto Garcia@var{device} can be a block device name, a qdev ID or a QOM path. 1680a3a55a2eSLuiz CapitulinoETEXI 1681b40292e7SJan Kiszka 168233572eceSJan Kiszka { 16837572150cSGerd Hoffmann .name = "set_password", 16847572150cSGerd Hoffmann .args_type = "protocol:s,password:s,connected:s?", 16857572150cSGerd Hoffmann .params = "protocol password action-if-connected", 16867572150cSGerd Hoffmann .help = "set spice/vnc password", 16872b9e3576SMarc-André Lureau .cmd = hmp_set_password, 16887572150cSGerd Hoffmann }, 16897572150cSGerd Hoffmann 16907572150cSGerd HoffmannSTEXI 16917572150cSGerd Hoffmann@item set_password [ vnc | spice ] password [ action-if-connected ] 16927572150cSGerd Hoffmann@findex set_password 16937572150cSGerd HoffmannChange spice/vnc password. Use zero to make the password stay valid 16947572150cSGerd Hoffmannforever. @var{action-if-connected} specifies what should happen in 16957572150cSGerd Hoffmanncase a connection is established: @var{fail} makes the password change 16967572150cSGerd Hoffmannfail. @var{disconnect} changes the password and disconnects the 16977572150cSGerd Hoffmannclient. @var{keep} changes the password and keeps the connection up. 16987572150cSGerd Hoffmann@var{keep} is the default. 16997572150cSGerd HoffmannETEXI 17007572150cSGerd Hoffmann 17017572150cSGerd Hoffmann { 17027572150cSGerd Hoffmann .name = "expire_password", 17037572150cSGerd Hoffmann .args_type = "protocol:s,time:s", 17047572150cSGerd Hoffmann .params = "protocol time", 17057572150cSGerd Hoffmann .help = "set spice/vnc password expire-time", 17062b9e3576SMarc-André Lureau .cmd = hmp_expire_password, 17077572150cSGerd Hoffmann }, 17087572150cSGerd Hoffmann 17097572150cSGerd HoffmannSTEXI 17107572150cSGerd Hoffmann@item expire_password [ vnc | spice ] expire-time 17117572150cSGerd Hoffmann@findex expire_password 17127572150cSGerd HoffmannSpecify when a password for spice/vnc becomes 17137572150cSGerd Hoffmanninvalid. @var{expire-time} accepts: 17147572150cSGerd Hoffmann 17157572150cSGerd Hoffmann@table @var 17167572150cSGerd Hoffmann@item now 17177572150cSGerd HoffmannInvalidate password instantly. 17187572150cSGerd Hoffmann 17197572150cSGerd Hoffmann@item never 17207572150cSGerd HoffmannPassword stays valid forever. 17217572150cSGerd Hoffmann 17227572150cSGerd Hoffmann@item +nsec 17237572150cSGerd HoffmannPassword stays valid for @var{nsec} seconds starting now. 17247572150cSGerd Hoffmann 17257572150cSGerd Hoffmann@item nsec 17267572150cSGerd HoffmannPassword is invalidated at the given time. @var{nsec} are the seconds 17277572150cSGerd Hoffmannpassed since 1970, i.e. unix epoch. 17287572150cSGerd Hoffmann 17297572150cSGerd Hoffmann@end table 17307572150cSGerd HoffmannETEXI 17317572150cSGerd Hoffmann 173246920825SGerd Hoffmann { 173346920825SGerd Hoffmann .name = "chardev-add", 173446920825SGerd Hoffmann .args_type = "args:s", 173546920825SGerd Hoffmann .params = "args", 173646920825SGerd Hoffmann .help = "add chardev", 17372b9e3576SMarc-André Lureau .cmd = hmp_chardev_add, 173813e315daSHani Benhabiles .command_completion = chardev_add_completion, 173946920825SGerd Hoffmann }, 174046920825SGerd Hoffmann 174146920825SGerd HoffmannSTEXI 1742b76d799eSMarkus Armbruster@item chardev-add args 1743b76d799eSMarkus Armbruster@findex chardev-add 174475b60160SAnton Nefedovchardev-add accepts the same parameters as the -chardev command line switch. 174575b60160SAnton Nefedov 174675b60160SAnton NefedovETEXI 174775b60160SAnton Nefedov 174875b60160SAnton Nefedov { 174975b60160SAnton Nefedov .name = "chardev-change", 175075b60160SAnton Nefedov .args_type = "id:s,args:s", 175175b60160SAnton Nefedov .params = "id args", 175275b60160SAnton Nefedov .help = "change chardev", 175375b60160SAnton Nefedov .cmd = hmp_chardev_change, 175475b60160SAnton Nefedov }, 175575b60160SAnton Nefedov 175675b60160SAnton NefedovSTEXI 175775b60160SAnton Nefedov@item chardev-change args 175875b60160SAnton Nefedov@findex chardev-change 175975b60160SAnton Nefedovchardev-change accepts existing chardev @var{id} and then the same arguments 176075b60160SAnton Nefedovas the -chardev command line switch (except for "id"). 176146920825SGerd Hoffmann 176246920825SGerd HoffmannETEXI 176346920825SGerd Hoffmann 176446920825SGerd Hoffmann { 176546920825SGerd Hoffmann .name = "chardev-remove", 176646920825SGerd Hoffmann .args_type = "id:s", 176746920825SGerd Hoffmann .params = "id", 176846920825SGerd Hoffmann .help = "remove chardev", 17692b9e3576SMarc-André Lureau .cmd = hmp_chardev_remove, 17706297d9a2SHani Benhabiles .command_completion = chardev_remove_completion, 177146920825SGerd Hoffmann }, 177246920825SGerd Hoffmann 177346920825SGerd HoffmannSTEXI 1774b76d799eSMarkus Armbruster@item chardev-remove id 1775b76d799eSMarkus Armbruster@findex chardev-remove 177646920825SGerd HoffmannRemoves the chardev @var{id}. 177746920825SGerd Hoffmann 177846920825SGerd HoffmannETEXI 1779f1088908SGerd Hoffmann 1780f1088908SGerd Hoffmann { 1781bd1d5ad9SStefan Fritsch .name = "chardev-send-break", 1782bd1d5ad9SStefan Fritsch .args_type = "id:s", 1783bd1d5ad9SStefan Fritsch .params = "id", 1784bd1d5ad9SStefan Fritsch .help = "send a break on chardev", 1785bd1d5ad9SStefan Fritsch .cmd = hmp_chardev_send_break, 1786bd1d5ad9SStefan Fritsch .command_completion = chardev_remove_completion, 1787bd1d5ad9SStefan Fritsch }, 1788bd1d5ad9SStefan Fritsch 1789bd1d5ad9SStefan FritschSTEXI 1790bd1d5ad9SStefan Fritsch@item chardev-send-break id 1791bd1d5ad9SStefan Fritsch@findex chardev-send-break 1792bd1d5ad9SStefan FritschSend a break on the chardev @var{id}. 1793bd1d5ad9SStefan Fritsch 1794bd1d5ad9SStefan FritschETEXI 1795bd1d5ad9SStefan Fritsch 1796bd1d5ad9SStefan Fritsch { 1797587da2c3SKevin Wolf .name = "qemu-io", 1798587da2c3SKevin Wolf .args_type = "device:B,command:s", 1799587da2c3SKevin Wolf .params = "[device] \"[command]\"", 1800587da2c3SKevin Wolf .help = "run a qemu-io command on a block device", 18012b9e3576SMarc-André Lureau .cmd = hmp_qemu_io, 1802587da2c3SKevin Wolf }, 1803587da2c3SKevin Wolf 1804587da2c3SKevin WolfSTEXI 1805587da2c3SKevin Wolf@item qemu-io @var{device} @var{command} 1806587da2c3SKevin Wolf@findex qemu-io 1807587da2c3SKevin WolfExecutes a qemu-io command on the given block device. 1808587da2c3SKevin Wolf 1809587da2c3SKevin WolfETEXI 1810587da2c3SKevin Wolf 1811587da2c3SKevin Wolf { 1812abf23329SJason J. Herne .name = "cpu-add", 1813abf23329SJason J. Herne .args_type = "id:i", 1814abf23329SJason J. Herne .params = "id", 1815abf23329SJason J. Herne .help = "add cpu", 18162b9e3576SMarc-André Lureau .cmd = hmp_cpu_add, 1817abf23329SJason J. Herne }, 1818abf23329SJason J. Herne 1819abf23329SJason J. HerneSTEXI 1820abf23329SJason J. Herne@item cpu-add @var{id} 1821b76d799eSMarkus Armbruster@findex cpu-add 1822abf23329SJason J. HerneAdd CPU with id @var{id} 1823abf23329SJason J. HerneETEXI 1824abf23329SJason J. Herne 1825abf23329SJason J. Herne { 182689d7fa9eSAndreas Färber .name = "qom-list", 182789d7fa9eSAndreas Färber .args_type = "path:s?", 182889d7fa9eSAndreas Färber .params = "path", 182989d7fa9eSAndreas Färber .help = "list QOM properties", 18302b9e3576SMarc-André Lureau .cmd = hmp_qom_list, 1831*8c7c7ecbSDr. David Alan Gilbert .flags = "p", 183289d7fa9eSAndreas Färber }, 183389d7fa9eSAndreas Färber 183489d7fa9eSAndreas FärberSTEXI 183589d7fa9eSAndreas Färber@item qom-list [@var{path}] 183689d7fa9eSAndreas FärberPrint QOM properties of object at location @var{path} 183789d7fa9eSAndreas FärberETEXI 183889d7fa9eSAndreas Färber 183989d7fa9eSAndreas Färber { 1840c0e6ee9eSAndreas Färber .name = "qom-set", 1841c0e6ee9eSAndreas Färber .args_type = "path:s,property:s,value:s", 1842c0e6ee9eSAndreas Färber .params = "path property value", 1843c0e6ee9eSAndreas Färber .help = "set QOM property", 18442b9e3576SMarc-André Lureau .cmd = hmp_qom_set, 1845*8c7c7ecbSDr. David Alan Gilbert .flags = "p", 1846c0e6ee9eSAndreas Färber }, 1847c0e6ee9eSAndreas Färber 1848c0e6ee9eSAndreas FärberSTEXI 1849c0e6ee9eSAndreas Färber@item qom-set @var{path} @var{property} @var{value} 1850c0e6ee9eSAndreas FärberSet QOM property @var{property} of object at location @var{path} to value @var{value} 1851c0e6ee9eSAndreas FärberETEXI 1852c0e6ee9eSAndreas Färber 1853c0e6ee9eSAndreas Färber { 185433572eceSJan Kiszka .name = "info", 185533572eceSJan Kiszka .args_type = "item:s?", 185633572eceSJan Kiszka .params = "[subcommand]", 185733572eceSJan Kiszka .help = "show various information about the system state", 18582b9e3576SMarc-André Lureau .cmd = hmp_info_help, 185984c44613SWenchao Xia .sub_table = info_cmds, 1860*8c7c7ecbSDr. David Alan Gilbert .flags = "p", 186133572eceSJan Kiszka }, 186233572eceSJan Kiszka 186333572eceSJan KiszkaSTEXI 186470703344SPavel Butsykin@end table 186570703344SPavel ButsykinETEXI 1866