2
0

hmp-commands.hx 50 KB

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