hmp-commands.hx 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793
  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. #if defined(TARGET_I386) || defined(TARGET_S390X)
  710. {
  711. .name = "nmi",
  712. .args_type = "",
  713. .params = "",
  714. .help = "inject an NMI on all guest's CPUs",
  715. .mhandler.cmd = hmp_inject_nmi,
  716. },
  717. #endif
  718. STEXI
  719. @item nmi @var{cpu}
  720. @findex nmi
  721. Inject an NMI (x86) or RESTART (s390x) on the given CPU.
  722. ETEXI
  723. {
  724. .name = "ringbuf_write",
  725. .args_type = "device:s,data:s",
  726. .params = "device data",
  727. .help = "Write to a ring buffer character device",
  728. .mhandler.cmd = hmp_ringbuf_write,
  729. .command_completion = ringbuf_write_completion,
  730. },
  731. STEXI
  732. @item ringbuf_write @var{device} @var{data}
  733. @findex ringbuf_write
  734. Write @var{data} to ring buffer character device @var{device}.
  735. @var{data} must be a UTF-8 string.
  736. ETEXI
  737. {
  738. .name = "ringbuf_read",
  739. .args_type = "device:s,size:i",
  740. .params = "device size",
  741. .help = "Read from a ring buffer character device",
  742. .mhandler.cmd = hmp_ringbuf_read,
  743. .command_completion = ringbuf_write_completion,
  744. },
  745. STEXI
  746. @item ringbuf_read @var{device}
  747. @findex ringbuf_read
  748. Read and print up to @var{size} bytes from ring buffer character
  749. device @var{device}.
  750. Certain non-printable characters are printed \uXXXX, where XXXX is the
  751. character code in hexadecimal. Character \ is printed \\.
  752. Bug: can screw up when the buffer contains invalid UTF-8 sequences,
  753. NUL characters, after the ring buffer lost data, and when reading
  754. stops because the size limit is reached.
  755. ETEXI
  756. {
  757. .name = "migrate",
  758. .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
  759. .params = "[-d] [-b] [-i] uri",
  760. .help = "migrate to URI (using -d to not wait for completion)"
  761. "\n\t\t\t -b for migration without shared storage with"
  762. " full copy of disk\n\t\t\t -i for migration without "
  763. "shared storage with incremental copy of disk "
  764. "(base image shared between src and destination)",
  765. .mhandler.cmd = hmp_migrate,
  766. },
  767. STEXI
  768. @item migrate [-d] [-b] [-i] @var{uri}
  769. @findex migrate
  770. Migrate to @var{uri} (using -d to not wait for completion).
  771. -b for migration with full copy of disk
  772. -i for migration with incremental copy of disk (base image is shared)
  773. ETEXI
  774. {
  775. .name = "migrate_cancel",
  776. .args_type = "",
  777. .params = "",
  778. .help = "cancel the current VM migration",
  779. .mhandler.cmd = hmp_migrate_cancel,
  780. },
  781. STEXI
  782. @item migrate_cancel
  783. @findex migrate_cancel
  784. Cancel the current VM migration.
  785. ETEXI
  786. {
  787. .name = "migrate_set_cache_size",
  788. .args_type = "value:o",
  789. .params = "value",
  790. .help = "set cache size (in bytes) for XBZRLE migrations,"
  791. "the cache size will be rounded down to the nearest "
  792. "power of 2.\n"
  793. "The cache size affects the number of cache misses."
  794. "In case of a high cache miss ratio you need to increase"
  795. " the cache size",
  796. .mhandler.cmd = hmp_migrate_set_cache_size,
  797. },
  798. STEXI
  799. @item migrate_set_cache_size @var{value}
  800. @findex migrate_set_cache_size
  801. Set cache size to @var{value} (in bytes) for xbzrle migrations.
  802. ETEXI
  803. {
  804. .name = "migrate_set_speed",
  805. .args_type = "value:o",
  806. .params = "value",
  807. .help = "set maximum speed (in bytes) for migrations. "
  808. "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
  809. .mhandler.cmd = hmp_migrate_set_speed,
  810. },
  811. STEXI
  812. @item migrate_set_speed @var{value}
  813. @findex migrate_set_speed
  814. Set maximum speed to @var{value} (in bytes) for migrations.
  815. ETEXI
  816. {
  817. .name = "migrate_set_downtime",
  818. .args_type = "value:T",
  819. .params = "value",
  820. .help = "set maximum tolerated downtime (in seconds) for migrations",
  821. .mhandler.cmd = hmp_migrate_set_downtime,
  822. },
  823. STEXI
  824. @item migrate_set_downtime @var{second}
  825. @findex migrate_set_downtime
  826. Set maximum tolerated downtime (in seconds) for migration.
  827. ETEXI
  828. {
  829. .name = "migrate_set_capability",
  830. .args_type = "capability:s,state:b",
  831. .params = "capability state",
  832. .help = "Enable/Disable the usage of a capability for migration",
  833. .mhandler.cmd = hmp_migrate_set_capability,
  834. .command_completion = migrate_set_capability_completion,
  835. },
  836. STEXI
  837. @item migrate_set_capability @var{capability} @var{state}
  838. @findex migrate_set_capability
  839. Enable/Disable the usage of a capability @var{capability} for migration.
  840. ETEXI
  841. {
  842. .name = "client_migrate_info",
  843. .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
  844. .params = "protocol hostname port tls-port cert-subject",
  845. .help = "send migration info to spice/vnc client",
  846. .user_print = monitor_user_noop,
  847. .mhandler.cmd_async = client_migrate_info,
  848. .flags = MONITOR_CMD_ASYNC,
  849. },
  850. STEXI
  851. @item client_migrate_info @var{protocol} @var{hostname} @var{port} @var{tls-port} @var{cert-subject}
  852. @findex client_migrate_info
  853. Set the spice/vnc connection info for the migration target. The spice/vnc
  854. server will ask the spice/vnc client to automatically reconnect using the
  855. new parameters (if specified) once the vm migration finished successfully.
  856. ETEXI
  857. {
  858. .name = "dump-guest-memory",
  859. .args_type = "paging:-p,zlib:-z,lzo:-l,snappy:-s,filename:F,begin:i?,length:i?",
  860. .params = "[-p] [-z|-l|-s] filename [begin length]",
  861. .help = "dump guest memory into file 'filename'.\n\t\t\t"
  862. "-p: do paging to get guest's memory mapping.\n\t\t\t"
  863. "-z: dump in kdump-compressed format, with zlib compression.\n\t\t\t"
  864. "-l: dump in kdump-compressed format, with lzo compression.\n\t\t\t"
  865. "-s: dump in kdump-compressed format, with snappy compression.\n\t\t\t"
  866. "begin: the starting physical address.\n\t\t\t"
  867. "length: the memory size, in bytes.",
  868. .mhandler.cmd = hmp_dump_guest_memory,
  869. },
  870. STEXI
  871. @item dump-guest-memory [-p] @var{filename} @var{begin} @var{length}
  872. @item dump-guest-memory [-z|-l|-s] @var{filename}
  873. @findex dump-guest-memory
  874. Dump guest memory to @var{protocol}. The file can be processed with crash or
  875. gdb. Without -z|-l|-s, the dump format is ELF.
  876. -p: do paging to get guest's memory mapping.
  877. -z: dump in kdump-compressed format, with zlib compression.
  878. -l: dump in kdump-compressed format, with lzo compression.
  879. -s: dump in kdump-compressed format, with snappy compression.
  880. filename: dump file name.
  881. begin: the starting physical address. It's optional, and should be
  882. specified together with length.
  883. length: the memory size, in bytes. It's optional, and should be specified
  884. together with begin.
  885. ETEXI
  886. {
  887. .name = "snapshot_blkdev",
  888. .args_type = "reuse:-n,device:B,snapshot-file:s?,format:s?",
  889. .params = "[-n] device [new-image-file] [format]",
  890. .help = "initiates a live snapshot\n\t\t\t"
  891. "of device. If a new image file is specified, the\n\t\t\t"
  892. "new image file will become the new root image.\n\t\t\t"
  893. "If format is specified, the snapshot file will\n\t\t\t"
  894. "be created in that format.\n\t\t\t"
  895. "The default format is qcow2. The -n flag requests QEMU\n\t\t\t"
  896. "to reuse the image found in new-image-file, instead of\n\t\t\t"
  897. "recreating it from scratch.",
  898. .mhandler.cmd = hmp_snapshot_blkdev,
  899. },
  900. STEXI
  901. @item snapshot_blkdev
  902. @findex snapshot_blkdev
  903. Snapshot device, using snapshot file as target if provided
  904. ETEXI
  905. {
  906. .name = "snapshot_blkdev_internal",
  907. .args_type = "device:B,name:s",
  908. .params = "device name",
  909. .help = "take an internal snapshot of device.\n\t\t\t"
  910. "The format of the image used by device must\n\t\t\t"
  911. "support it, such as qcow2.\n\t\t\t",
  912. .mhandler.cmd = hmp_snapshot_blkdev_internal,
  913. },
  914. STEXI
  915. @item snapshot_blkdev_internal
  916. @findex snapshot_blkdev_internal
  917. Take an internal snapshot on device if it support
  918. ETEXI
  919. {
  920. .name = "snapshot_delete_blkdev_internal",
  921. .args_type = "device:B,name:s,id:s?",
  922. .params = "device name [id]",
  923. .help = "delete an internal snapshot of device.\n\t\t\t"
  924. "If id is specified, qemu will try delete\n\t\t\t"
  925. "the snapshot matching both id and name.\n\t\t\t"
  926. "The format of the image used by device must\n\t\t\t"
  927. "support it, such as qcow2.\n\t\t\t",
  928. .mhandler.cmd = hmp_snapshot_delete_blkdev_internal,
  929. },
  930. STEXI
  931. @item snapshot_delete_blkdev_internal
  932. @findex snapshot_delete_blkdev_internal
  933. Delete an internal snapshot on device if it support
  934. ETEXI
  935. {
  936. .name = "drive_mirror",
  937. .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
  938. .params = "[-n] [-f] device target [format]",
  939. .help = "initiates live storage\n\t\t\t"
  940. "migration for a device. The device's contents are\n\t\t\t"
  941. "copied to the new image file, including data that\n\t\t\t"
  942. "is written after the command is started.\n\t\t\t"
  943. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  944. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  945. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  946. "so that the result does not need a backing file.\n\t\t\t",
  947. .mhandler.cmd = hmp_drive_mirror,
  948. },
  949. STEXI
  950. @item drive_mirror
  951. @findex drive_mirror
  952. Start mirroring a block device's writes to a new destination,
  953. using the specified target.
  954. ETEXI
  955. {
  956. .name = "drive_backup",
  957. .args_type = "reuse:-n,full:-f,device:B,target:s,format:s?",
  958. .params = "[-n] [-f] device target [format]",
  959. .help = "initiates a point-in-time\n\t\t\t"
  960. "copy for a device. The device's contents are\n\t\t\t"
  961. "copied to the new image file, excluding data that\n\t\t\t"
  962. "is written after the command is started.\n\t\t\t"
  963. "The -n flag requests QEMU to reuse the image found\n\t\t\t"
  964. "in new-image-file, instead of recreating it from scratch.\n\t\t\t"
  965. "The -f flag requests QEMU to copy the whole disk,\n\t\t\t"
  966. "so that the result does not need a backing file.\n\t\t\t",
  967. .mhandler.cmd = hmp_drive_backup,
  968. },
  969. STEXI
  970. @item drive_backup
  971. @findex drive_backup
  972. Start a point-in-time copy of a block device to a specificed target.
  973. ETEXI
  974. {
  975. .name = "drive_add",
  976. .args_type = "pci_addr:s,opts:s",
  977. .params = "[[<domain>:]<bus>:]<slot>\n"
  978. "[file=file][,if=type][,bus=n]\n"
  979. "[,unit=m][,media=d][,index=i]\n"
  980. "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
  981. "[,snapshot=on|off][,cache=on|off]\n"
  982. "[,readonly=on|off][,copy-on-read=on|off]",
  983. .help = "add drive to PCI storage controller",
  984. .mhandler.cmd = drive_hot_add,
  985. },
  986. STEXI
  987. @item drive_add
  988. @findex drive_add
  989. Add drive to PCI storage controller.
  990. ETEXI
  991. #if defined(CONFIG_PCI_HOTPLUG_OLD)
  992. {
  993. .name = "pci_add",
  994. .args_type = "pci_addr:s,type:s,opts:s?",
  995. .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
  996. .help = "hot-add PCI device",
  997. .mhandler.cmd = pci_device_hot_add,
  998. },
  999. #endif
  1000. STEXI
  1001. @item pci_add
  1002. @findex pci_add
  1003. Hot-add PCI device.
  1004. ETEXI
  1005. #if defined(CONFIG_PCI_HOTPLUG_OLD)
  1006. {
  1007. .name = "pci_del",
  1008. .args_type = "pci_addr:s",
  1009. .params = "[[<domain>:]<bus>:]<slot>",
  1010. .help = "hot remove PCI device",
  1011. .mhandler.cmd = do_pci_device_hot_remove,
  1012. },
  1013. #endif
  1014. STEXI
  1015. @item pci_del
  1016. @findex pci_del
  1017. Hot remove PCI device.
  1018. ETEXI
  1019. {
  1020. .name = "pcie_aer_inject_error",
  1021. .args_type = "advisory_non_fatal:-a,correctable:-c,"
  1022. "id:s,error_status:s,"
  1023. "header0:i?,header1:i?,header2:i?,header3:i?,"
  1024. "prefix0:i?,prefix1:i?,prefix2:i?,prefix3:i?",
  1025. .params = "[-a] [-c] id "
  1026. "<error_status> [<tlp header> [<tlp header prefix>]]",
  1027. .help = "inject pcie aer error\n\t\t\t"
  1028. " -a for advisory non fatal error\n\t\t\t"
  1029. " -c for correctable error\n\t\t\t"
  1030. "<id> = qdev device id\n\t\t\t"
  1031. "<error_status> = error string or 32bit\n\t\t\t"
  1032. "<tlb header> = 32bit x 4\n\t\t\t"
  1033. "<tlb header prefix> = 32bit x 4",
  1034. .user_print = pcie_aer_inject_error_print,
  1035. .mhandler.cmd_new = do_pcie_aer_inject_error,
  1036. },
  1037. STEXI
  1038. @item pcie_aer_inject_error
  1039. @findex pcie_aer_inject_error
  1040. Inject PCIe AER error
  1041. ETEXI
  1042. {
  1043. .name = "host_net_add",
  1044. .args_type = "device:s,opts:s?",
  1045. .params = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
  1046. .help = "add host VLAN client",
  1047. .mhandler.cmd = net_host_device_add,
  1048. .command_completion = host_net_add_completion,
  1049. },
  1050. STEXI
  1051. @item host_net_add
  1052. @findex host_net_add
  1053. Add host VLAN client.
  1054. ETEXI
  1055. {
  1056. .name = "host_net_remove",
  1057. .args_type = "vlan_id:i,device:s",
  1058. .params = "vlan_id name",
  1059. .help = "remove host VLAN client",
  1060. .mhandler.cmd = net_host_device_remove,
  1061. .command_completion = host_net_remove_completion,
  1062. },
  1063. STEXI
  1064. @item host_net_remove
  1065. @findex host_net_remove
  1066. Remove host VLAN client.
  1067. ETEXI
  1068. {
  1069. .name = "netdev_add",
  1070. .args_type = "netdev:O",
  1071. .params = "[user|tap|socket|vde|bridge|hubport|netmap|vhost-user],id=str[,prop=value][,...]",
  1072. .help = "add host network device",
  1073. .mhandler.cmd = hmp_netdev_add,
  1074. .command_completion = netdev_add_completion,
  1075. },
  1076. STEXI
  1077. @item netdev_add
  1078. @findex netdev_add
  1079. Add host network device.
  1080. ETEXI
  1081. {
  1082. .name = "netdev_del",
  1083. .args_type = "id:s",
  1084. .params = "id",
  1085. .help = "remove host network device",
  1086. .mhandler.cmd = hmp_netdev_del,
  1087. .command_completion = netdev_del_completion,
  1088. },
  1089. STEXI
  1090. @item netdev_del
  1091. @findex netdev_del
  1092. Remove host network device.
  1093. ETEXI
  1094. {
  1095. .name = "object_add",
  1096. .args_type = "object:O",
  1097. .params = "[qom-type=]type,id=str[,prop=value][,...]",
  1098. .help = "create QOM object",
  1099. .mhandler.cmd = hmp_object_add,
  1100. .command_completion = object_add_completion,
  1101. },
  1102. STEXI
  1103. @item object_add
  1104. @findex object_add
  1105. Create QOM object.
  1106. ETEXI
  1107. {
  1108. .name = "object_del",
  1109. .args_type = "id:s",
  1110. .params = "id",
  1111. .help = "destroy QOM object",
  1112. .mhandler.cmd = hmp_object_del,
  1113. .command_completion = object_del_completion,
  1114. },
  1115. STEXI
  1116. @item object_del
  1117. @findex object_del
  1118. Destroy QOM object.
  1119. ETEXI
  1120. #ifdef CONFIG_SLIRP
  1121. {
  1122. .name = "hostfwd_add",
  1123. .args_type = "arg1:s,arg2:s?,arg3:s?",
  1124. .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
  1125. .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
  1126. .mhandler.cmd = net_slirp_hostfwd_add,
  1127. },
  1128. #endif
  1129. STEXI
  1130. @item hostfwd_add
  1131. @findex hostfwd_add
  1132. Redirect TCP or UDP connections from host to guest (requires -net user).
  1133. ETEXI
  1134. #ifdef CONFIG_SLIRP
  1135. {
  1136. .name = "hostfwd_remove",
  1137. .args_type = "arg1:s,arg2:s?,arg3:s?",
  1138. .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
  1139. .help = "remove host-to-guest TCP or UDP redirection",
  1140. .mhandler.cmd = net_slirp_hostfwd_remove,
  1141. },
  1142. #endif
  1143. STEXI
  1144. @item hostfwd_remove
  1145. @findex hostfwd_remove
  1146. Remove host-to-guest TCP or UDP redirection.
  1147. ETEXI
  1148. {
  1149. .name = "balloon",
  1150. .args_type = "value:M",
  1151. .params = "target",
  1152. .help = "request VM to change its memory allocation (in MB)",
  1153. .mhandler.cmd = hmp_balloon,
  1154. },
  1155. STEXI
  1156. @item balloon @var{value}
  1157. @findex balloon
  1158. Request VM to change its memory allocation to @var{value} (in MB).
  1159. ETEXI
  1160. {
  1161. .name = "set_link",
  1162. .args_type = "name:s,up:b",
  1163. .params = "name on|off",
  1164. .help = "change the link status of a network adapter",
  1165. .mhandler.cmd = hmp_set_link,
  1166. .command_completion = set_link_completion,
  1167. },
  1168. STEXI
  1169. @item set_link @var{name} [on|off]
  1170. @findex set_link
  1171. Switch link @var{name} on (i.e. up) or off (i.e. down).
  1172. ETEXI
  1173. {
  1174. .name = "watchdog_action",
  1175. .args_type = "action:s",
  1176. .params = "[reset|shutdown|poweroff|pause|debug|none]",
  1177. .help = "change watchdog action",
  1178. .mhandler.cmd = do_watchdog_action,
  1179. .command_completion = watchdog_action_completion,
  1180. },
  1181. STEXI
  1182. @item watchdog_action
  1183. @findex watchdog_action
  1184. Change watchdog action.
  1185. ETEXI
  1186. {
  1187. .name = "acl_show",
  1188. .args_type = "aclname:s",
  1189. .params = "aclname",
  1190. .help = "list rules in the access control list",
  1191. .mhandler.cmd = do_acl_show,
  1192. },
  1193. STEXI
  1194. @item acl_show @var{aclname}
  1195. @findex acl_show
  1196. List all the matching rules in the access control list, and the default
  1197. policy. There are currently two named access control lists,
  1198. @var{vnc.x509dname} and @var{vnc.username} matching on the x509 client
  1199. certificate distinguished name, and SASL username respectively.
  1200. ETEXI
  1201. {
  1202. .name = "acl_policy",
  1203. .args_type = "aclname:s,policy:s",
  1204. .params = "aclname allow|deny",
  1205. .help = "set default access control list policy",
  1206. .mhandler.cmd = do_acl_policy,
  1207. },
  1208. STEXI
  1209. @item acl_policy @var{aclname} @code{allow|deny}
  1210. @findex acl_policy
  1211. Set the default access control list policy, used in the event that
  1212. none of the explicit rules match. The default policy at startup is
  1213. always @code{deny}.
  1214. ETEXI
  1215. {
  1216. .name = "acl_add",
  1217. .args_type = "aclname:s,match:s,policy:s,index:i?",
  1218. .params = "aclname match allow|deny [index]",
  1219. .help = "add a match rule to the access control list",
  1220. .mhandler.cmd = do_acl_add,
  1221. },
  1222. STEXI
  1223. @item acl_add @var{aclname} @var{match} @code{allow|deny} [@var{index}]
  1224. @findex acl_add
  1225. Add a match rule to the access control list, allowing or denying access.
  1226. The match will normally be an exact username or x509 distinguished name,
  1227. but can optionally include wildcard globs. eg @code{*@@EXAMPLE.COM} to
  1228. allow all users in the @code{EXAMPLE.COM} kerberos realm. The match will
  1229. normally be appended to the end of the ACL, but can be inserted
  1230. earlier in the list if the optional @var{index} parameter is supplied.
  1231. ETEXI
  1232. {
  1233. .name = "acl_remove",
  1234. .args_type = "aclname:s,match:s",
  1235. .params = "aclname match",
  1236. .help = "remove a match rule from the access control list",
  1237. .mhandler.cmd = do_acl_remove,
  1238. },
  1239. STEXI
  1240. @item acl_remove @var{aclname} @var{match}
  1241. @findex acl_remove
  1242. Remove the specified match rule from the access control list.
  1243. ETEXI
  1244. {
  1245. .name = "acl_reset",
  1246. .args_type = "aclname:s",
  1247. .params = "aclname",
  1248. .help = "reset the access control list",
  1249. .mhandler.cmd = do_acl_reset,
  1250. },
  1251. STEXI
  1252. @item acl_reset @var{aclname}
  1253. @findex acl_reset
  1254. Remove all matches from the access control list, and set the default
  1255. policy back to @code{deny}.
  1256. ETEXI
  1257. {
  1258. .name = "nbd_server_start",
  1259. .args_type = "all:-a,writable:-w,uri:s",
  1260. .params = "nbd_server_start [-a] [-w] host:port",
  1261. .help = "serve block devices on the given host and port",
  1262. .mhandler.cmd = hmp_nbd_server_start,
  1263. },
  1264. STEXI
  1265. @item nbd_server_start @var{host}:@var{port}
  1266. @findex nbd_server_start
  1267. Start an NBD server on the given host and/or port. If the @option{-a}
  1268. option is included, all of the virtual machine's block devices that
  1269. have an inserted media on them are automatically exported; in this case,
  1270. the @option{-w} option makes the devices writable too.
  1271. ETEXI
  1272. {
  1273. .name = "nbd_server_add",
  1274. .args_type = "writable:-w,device:B",
  1275. .params = "nbd_server_add [-w] device",
  1276. .help = "export a block device via NBD",
  1277. .mhandler.cmd = hmp_nbd_server_add,
  1278. },
  1279. STEXI
  1280. @item nbd_server_add @var{device}
  1281. @findex nbd_server_add
  1282. Export a block device through QEMU's NBD server, which must be started
  1283. beforehand with @command{nbd_server_start}. The @option{-w} option makes the
  1284. exported device writable too.
  1285. ETEXI
  1286. {
  1287. .name = "nbd_server_stop",
  1288. .args_type = "",
  1289. .params = "nbd_server_stop",
  1290. .help = "stop serving block devices using the NBD protocol",
  1291. .mhandler.cmd = hmp_nbd_server_stop,
  1292. },
  1293. STEXI
  1294. @item nbd_server_stop
  1295. @findex nbd_server_stop
  1296. Stop the QEMU embedded NBD server.
  1297. ETEXI
  1298. #if defined(TARGET_I386)
  1299. {
  1300. .name = "mce",
  1301. .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
  1302. .params = "[-b] cpu bank status mcgstatus addr misc",
  1303. .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
  1304. .mhandler.cmd = do_inject_mce,
  1305. },
  1306. #endif
  1307. STEXI
  1308. @item mce @var{cpu} @var{bank} @var{status} @var{mcgstatus} @var{addr} @var{misc}
  1309. @findex mce (x86)
  1310. Inject an MCE on the given CPU (x86 only).
  1311. ETEXI
  1312. {
  1313. .name = "getfd",
  1314. .args_type = "fdname:s",
  1315. .params = "getfd name",
  1316. .help = "receive a file descriptor via SCM rights and assign it a name",
  1317. .mhandler.cmd = hmp_getfd,
  1318. },
  1319. STEXI
  1320. @item getfd @var{fdname}
  1321. @findex getfd
  1322. If a file descriptor is passed alongside this command using the SCM_RIGHTS
  1323. mechanism on unix sockets, it is stored using the name @var{fdname} for
  1324. later use by other monitor commands.
  1325. ETEXI
  1326. {
  1327. .name = "closefd",
  1328. .args_type = "fdname:s",
  1329. .params = "closefd name",
  1330. .help = "close a file descriptor previously passed via SCM rights",
  1331. .mhandler.cmd = hmp_closefd,
  1332. },
  1333. STEXI
  1334. @item closefd @var{fdname}
  1335. @findex closefd
  1336. Close the file descriptor previously assigned to @var{fdname} using the
  1337. @code{getfd} command. This is only needed if the file descriptor was never
  1338. used by another monitor command.
  1339. ETEXI
  1340. {
  1341. .name = "block_passwd",
  1342. .args_type = "device:B,password:s",
  1343. .params = "block_passwd device password",
  1344. .help = "set the password of encrypted block devices",
  1345. .mhandler.cmd = hmp_block_passwd,
  1346. },
  1347. STEXI
  1348. @item block_set_io_throttle @var{device} @var{bps} @var{bps_rd} @var{bps_wr} @var{iops} @var{iops_rd} @var{iops_wr}
  1349. @findex block_set_io_throttle
  1350. 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}
  1351. ETEXI
  1352. {
  1353. .name = "block_set_io_throttle",
  1354. .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
  1355. .params = "device bps bps_rd bps_wr iops iops_rd iops_wr",
  1356. .help = "change I/O throttle limits for a block drive",
  1357. .mhandler.cmd = hmp_block_set_io_throttle,
  1358. },
  1359. STEXI
  1360. @item block_passwd @var{device} @var{password}
  1361. @findex block_passwd
  1362. Set the encrypted device @var{device} password to @var{password}
  1363. ETEXI
  1364. {
  1365. .name = "set_password",
  1366. .args_type = "protocol:s,password:s,connected:s?",
  1367. .params = "protocol password action-if-connected",
  1368. .help = "set spice/vnc password",
  1369. .mhandler.cmd = hmp_set_password,
  1370. },
  1371. STEXI
  1372. @item set_password [ vnc | spice ] password [ action-if-connected ]
  1373. @findex set_password
  1374. Change spice/vnc password. Use zero to make the password stay valid
  1375. forever. @var{action-if-connected} specifies what should happen in
  1376. case a connection is established: @var{fail} makes the password change
  1377. fail. @var{disconnect} changes the password and disconnects the
  1378. client. @var{keep} changes the password and keeps the connection up.
  1379. @var{keep} is the default.
  1380. ETEXI
  1381. {
  1382. .name = "expire_password",
  1383. .args_type = "protocol:s,time:s",
  1384. .params = "protocol time",
  1385. .help = "set spice/vnc password expire-time",
  1386. .mhandler.cmd = hmp_expire_password,
  1387. },
  1388. STEXI
  1389. @item expire_password [ vnc | spice ] expire-time
  1390. @findex expire_password
  1391. Specify when a password for spice/vnc becomes
  1392. invalid. @var{expire-time} accepts:
  1393. @table @var
  1394. @item now
  1395. Invalidate password instantly.
  1396. @item never
  1397. Password stays valid forever.
  1398. @item +nsec
  1399. Password stays valid for @var{nsec} seconds starting now.
  1400. @item nsec
  1401. Password is invalidated at the given time. @var{nsec} are the seconds
  1402. passed since 1970, i.e. unix epoch.
  1403. @end table
  1404. ETEXI
  1405. {
  1406. .name = "chardev-add",
  1407. .args_type = "args:s",
  1408. .params = "args",
  1409. .help = "add chardev",
  1410. .mhandler.cmd = hmp_chardev_add,
  1411. .command_completion = chardev_add_completion,
  1412. },
  1413. STEXI
  1414. @item chardev_add args
  1415. @findex chardev_add
  1416. chardev_add accepts the same parameters as the -chardev command line switch.
  1417. ETEXI
  1418. {
  1419. .name = "chardev-remove",
  1420. .args_type = "id:s",
  1421. .params = "id",
  1422. .help = "remove chardev",
  1423. .mhandler.cmd = hmp_chardev_remove,
  1424. .command_completion = chardev_remove_completion,
  1425. },
  1426. STEXI
  1427. @item chardev_remove id
  1428. @findex chardev_remove
  1429. Removes the chardev @var{id}.
  1430. ETEXI
  1431. {
  1432. .name = "qemu-io",
  1433. .args_type = "device:B,command:s",
  1434. .params = "[device] \"[command]\"",
  1435. .help = "run a qemu-io command on a block device",
  1436. .mhandler.cmd = hmp_qemu_io,
  1437. },
  1438. STEXI
  1439. @item qemu-io @var{device} @var{command}
  1440. @findex qemu-io
  1441. Executes a qemu-io command on the given block device.
  1442. ETEXI
  1443. {
  1444. .name = "cpu-add",
  1445. .args_type = "id:i",
  1446. .params = "id",
  1447. .help = "add cpu",
  1448. .mhandler.cmd = hmp_cpu_add,
  1449. },
  1450. STEXI
  1451. @item cpu-add @var{id}
  1452. Add CPU with id @var{id}
  1453. ETEXI
  1454. {
  1455. .name = "info",
  1456. .args_type = "item:s?",
  1457. .params = "[subcommand]",
  1458. .help = "show various information about the system state",
  1459. .mhandler.cmd = do_info_help,
  1460. .sub_table = info_cmds,
  1461. },
  1462. STEXI
  1463. @item info @var{subcommand}
  1464. @findex info
  1465. Show various information about the system state.
  1466. @table @option
  1467. @item info version
  1468. show the version of QEMU
  1469. @item info network
  1470. show the various VLANs and the associated devices
  1471. @item info chardev
  1472. show the character devices
  1473. @item info block
  1474. show the block devices
  1475. @item info blockstats
  1476. show block device statistics
  1477. @item info registers
  1478. show the cpu registers
  1479. @item info cpus
  1480. show infos for each CPU
  1481. @item info history
  1482. show the command line history
  1483. @item info irq
  1484. show the interrupts statistics (if available)
  1485. @item info pic
  1486. show i8259 (PIC) state
  1487. @item info pci
  1488. show emulated PCI device info
  1489. @item info tlb
  1490. show virtual to physical memory mappings (i386, SH4, SPARC, PPC, and Xtensa only)
  1491. @item info mem
  1492. show the active virtual memory mappings (i386 only)
  1493. @item info jit
  1494. show dynamic compiler info
  1495. @item info numa
  1496. show NUMA information
  1497. @item info kvm
  1498. show KVM information
  1499. @item info usb
  1500. show USB devices plugged on the virtual USB hub
  1501. @item info usbhost
  1502. show all USB host devices
  1503. @item info profile
  1504. show profiling information
  1505. @item info capture
  1506. show information about active capturing
  1507. @item info snapshots
  1508. show list of VM snapshots
  1509. @item info status
  1510. show the current VM status (running|paused)
  1511. @item info pcmcia
  1512. show guest PCMCIA status
  1513. @item info mice
  1514. show which guest mouse is receiving events
  1515. @item info vnc
  1516. show the vnc server status
  1517. @item info name
  1518. show the current VM name
  1519. @item info uuid
  1520. show the current VM UUID
  1521. @item info cpustats
  1522. show CPU statistics
  1523. @item info usernet
  1524. show user network stack connection states
  1525. @item info migrate
  1526. show migration status
  1527. @item info migrate_capabilities
  1528. show current migration capabilities
  1529. @item info migrate_cache_size
  1530. show current migration XBZRLE cache size
  1531. @item info balloon
  1532. show balloon information
  1533. @item info qtree
  1534. show device tree
  1535. @item info qdm
  1536. show qdev device model list
  1537. @item info roms
  1538. show roms
  1539. @item info tpm
  1540. show the TPM device
  1541. @end table
  1542. ETEXI
  1543. STEXI
  1544. @item info trace-events
  1545. show available trace events and their state
  1546. ETEXI
  1547. STEXI
  1548. @end table
  1549. ETEXI