qmp-commands.hx 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516
  1. HXCOMM QMP dispatch table and documentation
  2. HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
  3. HXCOMM does not show up in the other formats.
  4. SQMP
  5. QMP Supported Commands
  6. ----------------------
  7. This document describes all commands currently supported by QMP.
  8. Most of the time their usage is exactly the same as in the user Monitor, this
  9. means that any other document which also describe commands (the manpage,
  10. QEMU's manual, etc) can and should be consulted.
  11. QMP has two types of commands: regular and query commands. Regular commands
  12. usually change the Virtual Machine's state someway, while query commands just
  13. return information. The sections below are divided accordingly.
  14. It's important to observe that all communication examples are formatted in
  15. a reader-friendly way, so that they're easier to understand. However, in real
  16. protocol usage, they're emitted as a single line.
  17. Also, the following notation is used to denote data flow:
  18. -> data issued by the Client
  19. <- Server data response
  20. Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
  21. information on the Server command and response formats.
  22. NOTE: This document is temporary and will be replaced soon.
  23. 1. Stability Considerations
  24. ===========================
  25. The current QMP command set (described in this file) may be useful for a
  26. number of use cases, however it's limited and several commands have bad
  27. defined semantics, specially with regard to command completion.
  28. These problems are going to be solved incrementally in the next QEMU releases
  29. and we're going to establish a deprecation policy for badly defined commands.
  30. If you're planning to adopt QMP, please observe the following:
  31. 1. The deprecation policy will take effect and be documented soon, please
  32. check the documentation of each used command as soon as a new release of
  33. QEMU is available
  34. 2. DO NOT rely on anything which is not explicit documented
  35. 3. Errors, in special, are not documented. Applications should NOT check
  36. for specific errors classes or data (it's strongly recommended to only
  37. check for the "error" key)
  38. 2. Regular Commands
  39. ===================
  40. Server's responses in the examples below are always a success response, please
  41. refer to the QMP specification for more details on error responses.
  42. EQMP
  43. {
  44. .name = "quit",
  45. .args_type = "",
  46. .mhandler.cmd_new = qmp_marshal_input_quit,
  47. },
  48. SQMP
  49. quit
  50. ----
  51. Quit the emulator.
  52. Arguments: None.
  53. Example:
  54. -> { "execute": "quit" }
  55. <- { "return": {} }
  56. EQMP
  57. {
  58. .name = "eject",
  59. .args_type = "force:-f,device:B",
  60. .mhandler.cmd_new = qmp_marshal_input_eject,
  61. },
  62. SQMP
  63. eject
  64. -----
  65. Eject a removable medium.
  66. Arguments:
  67. - force: force ejection (json-bool, optional)
  68. - device: device name (json-string)
  69. Example:
  70. -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
  71. <- { "return": {} }
  72. Note: The "force" argument defaults to false.
  73. EQMP
  74. {
  75. .name = "change",
  76. .args_type = "device:B,target:F,arg:s?",
  77. .mhandler.cmd_new = qmp_marshal_input_change,
  78. },
  79. SQMP
  80. change
  81. ------
  82. Change a removable medium or VNC configuration.
  83. Arguments:
  84. - "device": device name (json-string)
  85. - "target": filename or item (json-string)
  86. - "arg": additional argument (json-string, optional)
  87. Examples:
  88. 1. Change a removable medium
  89. -> { "execute": "change",
  90. "arguments": { "device": "ide1-cd0",
  91. "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
  92. <- { "return": {} }
  93. 2. Change VNC password
  94. -> { "execute": "change",
  95. "arguments": { "device": "vnc", "target": "password",
  96. "arg": "foobar1" } }
  97. <- { "return": {} }
  98. EQMP
  99. {
  100. .name = "screendump",
  101. .args_type = "filename:F",
  102. .params = "filename",
  103. .help = "save screen into PPM image 'filename'",
  104. .user_print = monitor_user_noop,
  105. .mhandler.cmd_new = do_screen_dump,
  106. },
  107. SQMP
  108. screendump
  109. ----------
  110. Save screen into PPM image.
  111. Arguments:
  112. - "filename": file path (json-string)
  113. Example:
  114. -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
  115. <- { "return": {} }
  116. EQMP
  117. {
  118. .name = "stop",
  119. .args_type = "",
  120. .mhandler.cmd_new = qmp_marshal_input_stop,
  121. },
  122. SQMP
  123. stop
  124. ----
  125. Stop the emulator.
  126. Arguments: None.
  127. Example:
  128. -> { "execute": "stop" }
  129. <- { "return": {} }
  130. EQMP
  131. {
  132. .name = "cont",
  133. .args_type = "",
  134. .mhandler.cmd_new = qmp_marshal_input_cont,
  135. },
  136. SQMP
  137. cont
  138. ----
  139. Resume emulation.
  140. Arguments: None.
  141. Example:
  142. -> { "execute": "cont" }
  143. <- { "return": {} }
  144. EQMP
  145. {
  146. .name = "system_wakeup",
  147. .args_type = "",
  148. .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
  149. },
  150. SQMP
  151. system_wakeup
  152. -------------
  153. Wakeup guest from suspend.
  154. Arguments: None.
  155. Example:
  156. -> { "execute": "system_wakeup" }
  157. <- { "return": {} }
  158. EQMP
  159. {
  160. .name = "system_reset",
  161. .args_type = "",
  162. .mhandler.cmd_new = qmp_marshal_input_system_reset,
  163. },
  164. SQMP
  165. system_reset
  166. ------------
  167. Reset the system.
  168. Arguments: None.
  169. Example:
  170. -> { "execute": "system_reset" }
  171. <- { "return": {} }
  172. EQMP
  173. {
  174. .name = "system_powerdown",
  175. .args_type = "",
  176. .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
  177. },
  178. SQMP
  179. system_powerdown
  180. ----------------
  181. Send system power down event.
  182. Arguments: None.
  183. Example:
  184. -> { "execute": "system_powerdown" }
  185. <- { "return": {} }
  186. EQMP
  187. {
  188. .name = "device_add",
  189. .args_type = "device:O",
  190. .params = "driver[,prop=value][,...]",
  191. .help = "add device, like -device on the command line",
  192. .user_print = monitor_user_noop,
  193. .mhandler.cmd_new = do_device_add,
  194. },
  195. SQMP
  196. device_add
  197. ----------
  198. Add a device.
  199. Arguments:
  200. - "driver": the name of the new device's driver (json-string)
  201. - "bus": the device's parent bus (device tree path, json-string, optional)
  202. - "id": the device's ID, must be unique (json-string)
  203. - device properties
  204. Example:
  205. -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
  206. <- { "return": {} }
  207. Notes:
  208. (1) For detailed information about this command, please refer to the
  209. 'docs/qdev-device-use.txt' file.
  210. (2) It's possible to list device properties by running QEMU with the
  211. "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
  212. EQMP
  213. {
  214. .name = "device_del",
  215. .args_type = "id:s",
  216. .mhandler.cmd_new = qmp_marshal_input_device_del,
  217. },
  218. SQMP
  219. device_del
  220. ----------
  221. Remove a device.
  222. Arguments:
  223. - "id": the device's ID (json-string)
  224. Example:
  225. -> { "execute": "device_del", "arguments": { "id": "net1" } }
  226. <- { "return": {} }
  227. EQMP
  228. {
  229. .name = "cpu",
  230. .args_type = "index:i",
  231. .mhandler.cmd_new = qmp_marshal_input_cpu,
  232. },
  233. SQMP
  234. cpu
  235. ---
  236. Set the default CPU.
  237. Arguments:
  238. - "index": the CPU's index (json-int)
  239. Example:
  240. -> { "execute": "cpu", "arguments": { "index": 0 } }
  241. <- { "return": {} }
  242. Note: CPUs' indexes are obtained with the 'query-cpus' command.
  243. EQMP
  244. {
  245. .name = "memsave",
  246. .args_type = "val:l,size:i,filename:s,cpu:i?",
  247. .mhandler.cmd_new = qmp_marshal_input_memsave,
  248. },
  249. SQMP
  250. memsave
  251. -------
  252. Save to disk virtual memory dump starting at 'val' of size 'size'.
  253. Arguments:
  254. - "val": the starting address (json-int)
  255. - "size": the memory size, in bytes (json-int)
  256. - "filename": file path (json-string)
  257. - "cpu": virtual CPU index (json-int, optional)
  258. Example:
  259. -> { "execute": "memsave",
  260. "arguments": { "val": 10,
  261. "size": 100,
  262. "filename": "/tmp/virtual-mem-dump" } }
  263. <- { "return": {} }
  264. EQMP
  265. {
  266. .name = "pmemsave",
  267. .args_type = "val:l,size:i,filename:s",
  268. .mhandler.cmd_new = qmp_marshal_input_pmemsave,
  269. },
  270. SQMP
  271. pmemsave
  272. --------
  273. Save to disk physical memory dump starting at 'val' of size 'size'.
  274. Arguments:
  275. - "val": the starting address (json-int)
  276. - "size": the memory size, in bytes (json-int)
  277. - "filename": file path (json-string)
  278. Example:
  279. -> { "execute": "pmemsave",
  280. "arguments": { "val": 10,
  281. "size": 100,
  282. "filename": "/tmp/physical-mem-dump" } }
  283. <- { "return": {} }
  284. EQMP
  285. {
  286. .name = "inject-nmi",
  287. .args_type = "",
  288. .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
  289. },
  290. SQMP
  291. inject-nmi
  292. ----------
  293. Inject an NMI on guest's CPUs.
  294. Arguments: None.
  295. Example:
  296. -> { "execute": "inject-nmi" }
  297. <- { "return": {} }
  298. Note: inject-nmi fails when the guest doesn't support injecting.
  299. Currently, only x86 guests do.
  300. EQMP
  301. {
  302. .name = "xen-save-devices-state",
  303. .args_type = "filename:F",
  304. .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
  305. },
  306. SQMP
  307. xen-save-devices-state
  308. -------
  309. Save the state of all devices to file. The RAM and the block devices
  310. of the VM are not saved by this command.
  311. Arguments:
  312. - "filename": the file to save the state of the devices to as binary
  313. data. See xen-save-devices-state.txt for a description of the binary
  314. format.
  315. Example:
  316. -> { "execute": "xen-save-devices-state",
  317. "arguments": { "filename": "/tmp/save" } }
  318. <- { "return": {} }
  319. EQMP
  320. {
  321. .name = "migrate",
  322. .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
  323. .mhandler.cmd_new = qmp_marshal_input_migrate,
  324. },
  325. SQMP
  326. migrate
  327. -------
  328. Migrate to URI.
  329. Arguments:
  330. - "blk": block migration, full disk copy (json-bool, optional)
  331. - "inc": incremental disk copy (json-bool, optional)
  332. - "uri": Destination URI (json-string)
  333. Example:
  334. -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
  335. <- { "return": {} }
  336. Notes:
  337. (1) The 'query-migrate' command should be used to check migration's progress
  338. and final result (this information is provided by the 'status' member)
  339. (2) All boolean arguments default to false
  340. (3) The user Monitor's "detach" argument is invalid in QMP and should not
  341. be used
  342. EQMP
  343. {
  344. .name = "migrate_cancel",
  345. .args_type = "",
  346. .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
  347. },
  348. SQMP
  349. migrate_cancel
  350. --------------
  351. Cancel the current migration.
  352. Arguments: None.
  353. Example:
  354. -> { "execute": "migrate_cancel" }
  355. <- { "return": {} }
  356. EQMP
  357. {
  358. .name = "migrate-set-cache-size",
  359. .args_type = "value:o",
  360. .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
  361. },
  362. SQMP
  363. migrate-set-cache-size
  364. ---------------------
  365. Set cache size to be used by XBZRLE migration, the cache size will be rounded
  366. down to the nearest power of 2
  367. Arguments:
  368. - "value": cache size in bytes (json-int)
  369. Example:
  370. -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
  371. <- { "return": {} }
  372. EQMP
  373. {
  374. .name = "query-migrate-cache-size",
  375. .args_type = "",
  376. .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
  377. },
  378. SQMP
  379. query-migrate-cache-size
  380. ---------------------
  381. Show cache size to be used by XBZRLE migration
  382. returns a json-object with the following information:
  383. - "size" : json-int
  384. Example:
  385. -> { "execute": "query-migrate-cache-size" }
  386. <- { "return": 67108864 }
  387. EQMP
  388. {
  389. .name = "migrate_set_speed",
  390. .args_type = "value:o",
  391. .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
  392. },
  393. SQMP
  394. migrate_set_speed
  395. -----------------
  396. Set maximum speed for migrations.
  397. Arguments:
  398. - "value": maximum speed, in bytes per second (json-int)
  399. Example:
  400. -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
  401. <- { "return": {} }
  402. EQMP
  403. {
  404. .name = "migrate_set_downtime",
  405. .args_type = "value:T",
  406. .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
  407. },
  408. SQMP
  409. migrate_set_downtime
  410. --------------------
  411. Set maximum tolerated downtime (in seconds) for migrations.
  412. Arguments:
  413. - "value": maximum downtime (json-number)
  414. Example:
  415. -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
  416. <- { "return": {} }
  417. EQMP
  418. {
  419. .name = "client_migrate_info",
  420. .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
  421. .params = "protocol hostname port tls-port cert-subject",
  422. .help = "send migration info to spice/vnc client",
  423. .user_print = monitor_user_noop,
  424. .mhandler.cmd_async = client_migrate_info,
  425. .flags = MONITOR_CMD_ASYNC,
  426. },
  427. SQMP
  428. client_migrate_info
  429. ------------------
  430. Set the spice/vnc connection info for the migration target. The spice/vnc
  431. server will ask the spice/vnc client to automatically reconnect using the
  432. new parameters (if specified) once the vm migration finished successfully.
  433. Arguments:
  434. - "protocol": protocol: "spice" or "vnc" (json-string)
  435. - "hostname": migration target hostname (json-string)
  436. - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
  437. - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
  438. - "cert-subject": server certificate subject (json-string, optional)
  439. Example:
  440. -> { "execute": "client_migrate_info",
  441. "arguments": { "protocol": "spice",
  442. "hostname": "virt42.lab.kraxel.org",
  443. "port": 1234 } }
  444. <- { "return": {} }
  445. EQMP
  446. {
  447. .name = "dump-guest-memory",
  448. .args_type = "paging:b,protocol:s,begin:i?,end:i?",
  449. .params = "-p protocol [begin] [length]",
  450. .help = "dump guest memory to file",
  451. .user_print = monitor_user_noop,
  452. .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
  453. },
  454. SQMP
  455. dump
  456. Dump guest memory to file. The file can be processed with crash or gdb.
  457. Arguments:
  458. - "paging": do paging to get guest's memory mapping (json-bool)
  459. - "protocol": destination file(started with "file:") or destination file
  460. descriptor (started with "fd:") (json-string)
  461. - "begin": the starting physical address. It's optional, and should be specified
  462. with length together (json-int)
  463. - "length": the memory size, in bytes. It's optional, and should be specified
  464. with begin together (json-int)
  465. Example:
  466. -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
  467. <- { "return": {} }
  468. Notes:
  469. (1) All boolean arguments default to false
  470. EQMP
  471. {
  472. .name = "netdev_add",
  473. .args_type = "netdev:O",
  474. .mhandler.cmd_new = qmp_netdev_add,
  475. },
  476. SQMP
  477. netdev_add
  478. ----------
  479. Add host network device.
  480. Arguments:
  481. - "type": the device type, "tap", "user", ... (json-string)
  482. - "id": the device's ID, must be unique (json-string)
  483. - device options
  484. Example:
  485. -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
  486. <- { "return": {} }
  487. Note: The supported device options are the same ones supported by the '-net'
  488. command-line argument, which are listed in the '-help' output or QEMU's
  489. manual
  490. EQMP
  491. {
  492. .name = "netdev_del",
  493. .args_type = "id:s",
  494. .mhandler.cmd_new = qmp_marshal_input_netdev_del,
  495. },
  496. SQMP
  497. netdev_del
  498. ----------
  499. Remove host network device.
  500. Arguments:
  501. - "id": the device's ID, must be unique (json-string)
  502. Example:
  503. -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
  504. <- { "return": {} }
  505. EQMP
  506. {
  507. .name = "block_resize",
  508. .args_type = "device:B,size:o",
  509. .mhandler.cmd_new = qmp_marshal_input_block_resize,
  510. },
  511. SQMP
  512. block_resize
  513. ------------
  514. Resize a block image while a guest is running.
  515. Arguments:
  516. - "device": the device's ID, must be unique (json-string)
  517. - "size": new size
  518. Example:
  519. -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
  520. <- { "return": {} }
  521. EQMP
  522. {
  523. .name = "block-stream",
  524. .args_type = "device:B,base:s?,speed:o?",
  525. .mhandler.cmd_new = qmp_marshal_input_block_stream,
  526. },
  527. {
  528. .name = "block-job-set-speed",
  529. .args_type = "device:B,speed:o",
  530. .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
  531. },
  532. {
  533. .name = "block-job-cancel",
  534. .args_type = "device:B",
  535. .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
  536. },
  537. {
  538. .name = "transaction",
  539. .args_type = "actions:q",
  540. .mhandler.cmd_new = qmp_marshal_input_transaction,
  541. },
  542. SQMP
  543. transaction
  544. -----------
  545. Atomically operate on one or more block devices. The only supported
  546. operation for now is snapshotting. If there is any failure performing
  547. any of the operations, all snapshots for the group are abandoned, and
  548. the original disks pre-snapshot attempt are used.
  549. A list of dictionaries is accepted, that contains the actions to be performed.
  550. For snapshots this is the device, the file to use for the new snapshot,
  551. and the format. The default format, if not specified, is qcow2.
  552. Each new snapshot defaults to being created by QEMU (wiping any
  553. contents if the file already exists), but it is also possible to reuse
  554. an externally-created file. In the latter case, you should ensure that
  555. the new image file has the same contents as the current one; QEMU cannot
  556. perform any meaningful check. Typically this is achieved by using the
  557. current image file as the backing file for the new image.
  558. Arguments:
  559. actions array:
  560. - "type": the operation to perform. The only supported
  561. value is "blockdev-snapshot-sync". (json-string)
  562. - "data": a dictionary. The contents depend on the value
  563. of "type". When "type" is "blockdev-snapshot-sync":
  564. - "device": device name to snapshot (json-string)
  565. - "snapshot-file": name of new image file (json-string)
  566. - "format": format of new image (json-string, optional)
  567. - "mode": whether and how QEMU should create the snapshot file
  568. (NewImageMode, optional, default "absolute-paths")
  569. Example:
  570. -> { "execute": "transaction",
  571. "arguments": { "actions": [
  572. { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
  573. "snapshot-file": "/some/place/my-image",
  574. "format": "qcow2" } },
  575. { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
  576. "snapshot-file": "/some/place/my-image2",
  577. "mode": "existing",
  578. "format": "qcow2" } } ] } }
  579. <- { "return": {} }
  580. EQMP
  581. {
  582. .name = "blockdev-snapshot-sync",
  583. .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
  584. .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
  585. },
  586. SQMP
  587. blockdev-snapshot-sync
  588. ----------------------
  589. Synchronous snapshot of a block device. snapshot-file specifies the
  590. target of the new image. If the file exists, or if it is a device, the
  591. snapshot will be created in the existing file/device. If does not
  592. exist, a new file will be created. format specifies the format of the
  593. snapshot image, default is qcow2.
  594. Arguments:
  595. - "device": device name to snapshot (json-string)
  596. - "snapshot-file": name of new image file (json-string)
  597. - "mode": whether and how QEMU should create the snapshot file
  598. (NewImageMode, optional, default "absolute-paths")
  599. - "format": format of new image (json-string, optional)
  600. Example:
  601. -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
  602. "snapshot-file":
  603. "/some/place/my-image",
  604. "format": "qcow2" } }
  605. <- { "return": {} }
  606. EQMP
  607. {
  608. .name = "balloon",
  609. .args_type = "value:M",
  610. .mhandler.cmd_new = qmp_marshal_input_balloon,
  611. },
  612. SQMP
  613. balloon
  614. -------
  615. Request VM to change its memory allocation (in bytes).
  616. Arguments:
  617. - "value": New memory allocation (json-int)
  618. Example:
  619. -> { "execute": "balloon", "arguments": { "value": 536870912 } }
  620. <- { "return": {} }
  621. EQMP
  622. {
  623. .name = "set_link",
  624. .args_type = "name:s,up:b",
  625. .mhandler.cmd_new = qmp_marshal_input_set_link,
  626. },
  627. SQMP
  628. set_link
  629. --------
  630. Change the link status of a network adapter.
  631. Arguments:
  632. - "name": network device name (json-string)
  633. - "up": status is up (json-bool)
  634. Example:
  635. -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
  636. <- { "return": {} }
  637. EQMP
  638. {
  639. .name = "getfd",
  640. .args_type = "fdname:s",
  641. .params = "getfd name",
  642. .help = "receive a file descriptor via SCM rights and assign it a name",
  643. .mhandler.cmd_new = qmp_marshal_input_getfd,
  644. },
  645. SQMP
  646. getfd
  647. -----
  648. Receive a file descriptor via SCM rights and assign it a name.
  649. Arguments:
  650. - "fdname": file descriptor name (json-string)
  651. Example:
  652. -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
  653. <- { "return": {} }
  654. Notes:
  655. (1) If the name specified by the "fdname" argument already exists,
  656. the file descriptor assigned to it will be closed and replaced
  657. by the received file descriptor.
  658. (2) The 'closefd' command can be used to explicitly close the file
  659. descriptor when it is no longer needed.
  660. EQMP
  661. {
  662. .name = "closefd",
  663. .args_type = "fdname:s",
  664. .params = "closefd name",
  665. .help = "close a file descriptor previously passed via SCM rights",
  666. .mhandler.cmd_new = qmp_marshal_input_closefd,
  667. },
  668. SQMP
  669. closefd
  670. -------
  671. Close a file descriptor previously passed via SCM rights.
  672. Arguments:
  673. - "fdname": file descriptor name (json-string)
  674. Example:
  675. -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
  676. <- { "return": {} }
  677. EQMP
  678. {
  679. .name = "add-fd",
  680. .args_type = "fdset-id:i?,opaque:s?",
  681. .params = "add-fd fdset-id opaque",
  682. .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
  683. .mhandler.cmd_new = qmp_marshal_input_add_fd,
  684. },
  685. SQMP
  686. add-fd
  687. -------
  688. Add a file descriptor, that was passed via SCM rights, to an fd set.
  689. Arguments:
  690. - "fdset-id": The ID of the fd set to add the file descriptor to.
  691. (json-int, optional)
  692. - "opaque": A free-form string that can be used to describe the fd.
  693. (json-string, optional)
  694. Return a json-object with the following information:
  695. - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
  696. - "fd": The file descriptor that was received via SCM rights and added to the
  697. fd set. (json-int)
  698. Example:
  699. -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
  700. <- { "return": { "fdset-id": 1, "fd": 3 } }
  701. Notes:
  702. (1) The list of fd sets is shared by all monitor connections.
  703. (2) If "fdset-id" is not specified, a new fd set will be created.
  704. EQMP
  705. {
  706. .name = "remove-fd",
  707. .args_type = "fdset-id:i,fd:i?",
  708. .params = "remove-fd fdset-id fd",
  709. .help = "Remove a file descriptor from an fd set",
  710. .mhandler.cmd_new = qmp_marshal_input_remove_fd,
  711. },
  712. SQMP
  713. remove-fd
  714. ---------
  715. Remove a file descriptor from an fd set.
  716. Arguments:
  717. - "fdset-id": The ID of the fd set that the file descriptor belongs to.
  718. (json-int)
  719. - "fd": The file descriptor that is to be removed. (json-int, optional)
  720. Example:
  721. -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
  722. <- { "return": {} }
  723. Notes:
  724. (1) The list of fd sets is shared by all monitor connections.
  725. (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
  726. removed.
  727. EQMP
  728. {
  729. .name = "query-fdsets",
  730. .args_type = "",
  731. .help = "Return information describing all fd sets",
  732. .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
  733. },
  734. SQMP
  735. query-fdsets
  736. -------------
  737. Return information describing all fd sets.
  738. Arguments: None
  739. Example:
  740. -> { "execute": "query-fdsets" }
  741. <- { "return": [
  742. {
  743. "fds": [
  744. {
  745. "fd": 30,
  746. "opaque": "rdonly:/path/to/file"
  747. },
  748. {
  749. "fd": 24,
  750. "opaque": "rdwr:/path/to/file"
  751. }
  752. ],
  753. "fdset-id": 1
  754. },
  755. {
  756. "fds": [
  757. {
  758. "fd": 28
  759. },
  760. {
  761. "fd": 29
  762. }
  763. ],
  764. "fdset-id": 0
  765. }
  766. ]
  767. }
  768. Note: The list of fd sets is shared by all monitor connections.
  769. EQMP
  770. {
  771. .name = "block_passwd",
  772. .args_type = "device:B,password:s",
  773. .mhandler.cmd_new = qmp_marshal_input_block_passwd,
  774. },
  775. SQMP
  776. block_passwd
  777. ------------
  778. Set the password of encrypted block devices.
  779. Arguments:
  780. - "device": device name (json-string)
  781. - "password": password (json-string)
  782. Example:
  783. -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
  784. "password": "12345" } }
  785. <- { "return": {} }
  786. EQMP
  787. {
  788. .name = "block_set_io_throttle",
  789. .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
  790. .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
  791. },
  792. SQMP
  793. block_set_io_throttle
  794. ------------
  795. Change I/O throttle limits for a block drive.
  796. Arguments:
  797. - "device": device name (json-string)
  798. - "bps": total throughput limit in bytes per second(json-int)
  799. - "bps_rd": read throughput limit in bytes per second(json-int)
  800. - "bps_wr": read throughput limit in bytes per second(json-int)
  801. - "iops": total I/O operations per second(json-int)
  802. - "iops_rd": read I/O operations per second(json-int)
  803. - "iops_wr": write I/O operations per second(json-int)
  804. Example:
  805. -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
  806. "bps": "1000000",
  807. "bps_rd": "0",
  808. "bps_wr": "0",
  809. "iops": "0",
  810. "iops_rd": "0",
  811. "iops_wr": "0" } }
  812. <- { "return": {} }
  813. EQMP
  814. {
  815. .name = "set_password",
  816. .args_type = "protocol:s,password:s,connected:s?",
  817. .mhandler.cmd_new = qmp_marshal_input_set_password,
  818. },
  819. SQMP
  820. set_password
  821. ------------
  822. Set the password for vnc/spice protocols.
  823. Arguments:
  824. - "protocol": protocol name (json-string)
  825. - "password": password (json-string)
  826. - "connected": [ keep | disconnect | fail ] (josn-string, optional)
  827. Example:
  828. -> { "execute": "set_password", "arguments": { "protocol": "vnc",
  829. "password": "secret" } }
  830. <- { "return": {} }
  831. EQMP
  832. {
  833. .name = "expire_password",
  834. .args_type = "protocol:s,time:s",
  835. .mhandler.cmd_new = qmp_marshal_input_expire_password,
  836. },
  837. SQMP
  838. expire_password
  839. ---------------
  840. Set the password expire time for vnc/spice protocols.
  841. Arguments:
  842. - "protocol": protocol name (json-string)
  843. - "time": [ now | never | +secs | secs ] (json-string)
  844. Example:
  845. -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
  846. "time": "+60" } }
  847. <- { "return": {} }
  848. EQMP
  849. {
  850. .name = "add_client",
  851. .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
  852. .params = "protocol fdname skipauth tls",
  853. .help = "add a graphics client",
  854. .user_print = monitor_user_noop,
  855. .mhandler.cmd_new = add_graphics_client,
  856. },
  857. SQMP
  858. add_client
  859. ----------
  860. Add a graphics client
  861. Arguments:
  862. - "protocol": protocol name (json-string)
  863. - "fdname": file descriptor name (json-string)
  864. - "skipauth": whether to skip authentication (json-bool, optional)
  865. - "tls": whether to perform TLS (json-bool, optional)
  866. Example:
  867. -> { "execute": "add_client", "arguments": { "protocol": "vnc",
  868. "fdname": "myclient" } }
  869. <- { "return": {} }
  870. EQMP
  871. {
  872. .name = "qmp_capabilities",
  873. .args_type = "",
  874. .params = "",
  875. .help = "enable QMP capabilities",
  876. .user_print = monitor_user_noop,
  877. .mhandler.cmd_new = do_qmp_capabilities,
  878. },
  879. SQMP
  880. qmp_capabilities
  881. ----------------
  882. Enable QMP capabilities.
  883. Arguments: None.
  884. Example:
  885. -> { "execute": "qmp_capabilities" }
  886. <- { "return": {} }
  887. Note: This command must be issued before issuing any other command.
  888. EQMP
  889. {
  890. .name = "human-monitor-command",
  891. .args_type = "command-line:s,cpu-index:i?",
  892. .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
  893. },
  894. SQMP
  895. human-monitor-command
  896. ---------------------
  897. Execute a Human Monitor command.
  898. Arguments:
  899. - command-line: the command name and its arguments, just like the
  900. Human Monitor's shell (json-string)
  901. - cpu-index: select the CPU number to be used by commands which access CPU
  902. data, like 'info registers'. The Monitor selects CPU 0 if this
  903. argument is not provided (json-int, optional)
  904. Example:
  905. -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
  906. <- { "return": "kvm support: enabled\r\n" }
  907. Notes:
  908. (1) The Human Monitor is NOT an stable interface, this means that command
  909. names, arguments and responses can change or be removed at ANY time.
  910. Applications that rely on long term stability guarantees should NOT
  911. use this command
  912. (2) Limitations:
  913. o This command is stateless, this means that commands that depend
  914. on state information (such as getfd) might not work
  915. o Commands that prompt the user for data (eg. 'cont' when the block
  916. device is encrypted) don't currently work
  917. 3. Query Commands
  918. =================
  919. HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
  920. HXCOMM this! We will possibly move query commands definitions inside those
  921. HXCOMM sections, just like regular commands.
  922. EQMP
  923. SQMP
  924. query-version
  925. -------------
  926. Show QEMU version.
  927. Return a json-object with the following information:
  928. - "qemu": A json-object containing three integer values:
  929. - "major": QEMU's major version (json-int)
  930. - "minor": QEMU's minor version (json-int)
  931. - "micro": QEMU's micro version (json-int)
  932. - "package": package's version (json-string)
  933. Example:
  934. -> { "execute": "query-version" }
  935. <- {
  936. "return":{
  937. "qemu":{
  938. "major":0,
  939. "minor":11,
  940. "micro":5
  941. },
  942. "package":""
  943. }
  944. }
  945. EQMP
  946. {
  947. .name = "query-version",
  948. .args_type = "",
  949. .mhandler.cmd_new = qmp_marshal_input_query_version,
  950. },
  951. SQMP
  952. query-commands
  953. --------------
  954. List QMP available commands.
  955. Each command is represented by a json-object, the returned value is a json-array
  956. of all commands.
  957. Each json-object contain:
  958. - "name": command's name (json-string)
  959. Example:
  960. -> { "execute": "query-commands" }
  961. <- {
  962. "return":[
  963. {
  964. "name":"query-balloon"
  965. },
  966. {
  967. "name":"system_powerdown"
  968. }
  969. ]
  970. }
  971. Note: This example has been shortened as the real response is too long.
  972. EQMP
  973. {
  974. .name = "query-commands",
  975. .args_type = "",
  976. .mhandler.cmd_new = qmp_marshal_input_query_commands,
  977. },
  978. SQMP
  979. query-events
  980. --------------
  981. List QMP available events.
  982. Each event is represented by a json-object, the returned value is a json-array
  983. of all events.
  984. Each json-object contains:
  985. - "name": event's name (json-string)
  986. Example:
  987. -> { "execute": "query-events" }
  988. <- {
  989. "return":[
  990. {
  991. "name":"SHUTDOWN"
  992. },
  993. {
  994. "name":"RESET"
  995. }
  996. ]
  997. }
  998. Note: This example has been shortened as the real response is too long.
  999. EQMP
  1000. {
  1001. .name = "query-events",
  1002. .args_type = "",
  1003. .mhandler.cmd_new = qmp_marshal_input_query_events,
  1004. },
  1005. SQMP
  1006. query-chardev
  1007. -------------
  1008. Each device is represented by a json-object. The returned value is a json-array
  1009. of all devices.
  1010. Each json-object contain the following:
  1011. - "label": device's label (json-string)
  1012. - "filename": device's file (json-string)
  1013. Example:
  1014. -> { "execute": "query-chardev" }
  1015. <- {
  1016. "return":[
  1017. {
  1018. "label":"monitor",
  1019. "filename":"stdio"
  1020. },
  1021. {
  1022. "label":"serial0",
  1023. "filename":"vc"
  1024. }
  1025. ]
  1026. }
  1027. EQMP
  1028. {
  1029. .name = "query-chardev",
  1030. .args_type = "",
  1031. .mhandler.cmd_new = qmp_marshal_input_query_chardev,
  1032. },
  1033. SQMP
  1034. query-block
  1035. -----------
  1036. Show the block devices.
  1037. Each block device information is stored in a json-object and the returned value
  1038. is a json-array of all devices.
  1039. Each json-object contain the following:
  1040. - "device": device name (json-string)
  1041. - "type": device type (json-string)
  1042. - deprecated, retained for backward compatibility
  1043. - Possible values: "unknown"
  1044. - "removable": true if the device is removable, false otherwise (json-bool)
  1045. - "locked": true if the device is locked, false otherwise (json-bool)
  1046. - "tray-open": only present if removable, true if the device has a tray,
  1047. and it is open (json-bool)
  1048. - "inserted": only present if the device is inserted, it is a json-object
  1049. containing the following:
  1050. - "file": device file name (json-string)
  1051. - "ro": true if read-only, false otherwise (json-bool)
  1052. - "drv": driver format name (json-string)
  1053. - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
  1054. "file", "file", "ftp", "ftps", "host_cdrom",
  1055. "host_device", "host_floppy", "http", "https",
  1056. "nbd", "parallels", "qcow", "qcow2", "raw",
  1057. "tftp", "vdi", "vmdk", "vpc", "vvfat"
  1058. - "backing_file": backing file name (json-string, optional)
  1059. - "backing_file_depth": number of files in the backing file chain (json-int)
  1060. - "encrypted": true if encrypted, false otherwise (json-bool)
  1061. - "bps": limit total bytes per second (json-int)
  1062. - "bps_rd": limit read bytes per second (json-int)
  1063. - "bps_wr": limit write bytes per second (json-int)
  1064. - "iops": limit total I/O operations per second (json-int)
  1065. - "iops_rd": limit read operations per second (json-int)
  1066. - "iops_wr": limit write operations per second (json-int)
  1067. - "io-status": I/O operation status, only present if the device supports it
  1068. and the VM is configured to stop on errors. It's always reset
  1069. to "ok" when the "cont" command is issued (json_string, optional)
  1070. - Possible values: "ok", "failed", "nospace"
  1071. Example:
  1072. -> { "execute": "query-block" }
  1073. <- {
  1074. "return":[
  1075. {
  1076. "io-status": "ok",
  1077. "device":"ide0-hd0",
  1078. "locked":false,
  1079. "removable":false,
  1080. "inserted":{
  1081. "ro":false,
  1082. "drv":"qcow2",
  1083. "encrypted":false,
  1084. "file":"disks/test.img",
  1085. "backing_file_depth":0,
  1086. "bps":1000000,
  1087. "bps_rd":0,
  1088. "bps_wr":0,
  1089. "iops":1000000,
  1090. "iops_rd":0,
  1091. "iops_wr":0,
  1092. },
  1093. "type":"unknown"
  1094. },
  1095. {
  1096. "io-status": "ok",
  1097. "device":"ide1-cd0",
  1098. "locked":false,
  1099. "removable":true,
  1100. "type":"unknown"
  1101. },
  1102. {
  1103. "device":"floppy0",
  1104. "locked":false,
  1105. "removable":true,
  1106. "type":"unknown"
  1107. },
  1108. {
  1109. "device":"sd0",
  1110. "locked":false,
  1111. "removable":true,
  1112. "type":"unknown"
  1113. }
  1114. ]
  1115. }
  1116. EQMP
  1117. {
  1118. .name = "query-block",
  1119. .args_type = "",
  1120. .mhandler.cmd_new = qmp_marshal_input_query_block,
  1121. },
  1122. SQMP
  1123. query-blockstats
  1124. ----------------
  1125. Show block device statistics.
  1126. Each device statistic information is stored in a json-object and the returned
  1127. value is a json-array of all devices.
  1128. Each json-object contain the following:
  1129. - "device": device name (json-string)
  1130. - "stats": A json-object with the statistics information, it contains:
  1131. - "rd_bytes": bytes read (json-int)
  1132. - "wr_bytes": bytes written (json-int)
  1133. - "rd_operations": read operations (json-int)
  1134. - "wr_operations": write operations (json-int)
  1135. - "flush_operations": cache flush operations (json-int)
  1136. - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
  1137. - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
  1138. - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
  1139. - "wr_highest_offset": Highest offset of a sector written since the
  1140. BlockDriverState has been opened (json-int)
  1141. - "parent": Contains recursively the statistics of the underlying
  1142. protocol (e.g. the host file for a qcow2 image). If there is
  1143. no underlying protocol, this field is omitted
  1144. (json-object, optional)
  1145. Example:
  1146. -> { "execute": "query-blockstats" }
  1147. <- {
  1148. "return":[
  1149. {
  1150. "device":"ide0-hd0",
  1151. "parent":{
  1152. "stats":{
  1153. "wr_highest_offset":3686448128,
  1154. "wr_bytes":9786368,
  1155. "wr_operations":751,
  1156. "rd_bytes":122567168,
  1157. "rd_operations":36772
  1158. "wr_total_times_ns":313253456
  1159. "rd_total_times_ns":3465673657
  1160. "flush_total_times_ns":49653
  1161. "flush_operations":61,
  1162. }
  1163. },
  1164. "stats":{
  1165. "wr_highest_offset":2821110784,
  1166. "wr_bytes":9786368,
  1167. "wr_operations":692,
  1168. "rd_bytes":122739200,
  1169. "rd_operations":36604
  1170. "flush_operations":51,
  1171. "wr_total_times_ns":313253456
  1172. "rd_total_times_ns":3465673657
  1173. "flush_total_times_ns":49653
  1174. }
  1175. },
  1176. {
  1177. "device":"ide1-cd0",
  1178. "stats":{
  1179. "wr_highest_offset":0,
  1180. "wr_bytes":0,
  1181. "wr_operations":0,
  1182. "rd_bytes":0,
  1183. "rd_operations":0
  1184. "flush_operations":0,
  1185. "wr_total_times_ns":0
  1186. "rd_total_times_ns":0
  1187. "flush_total_times_ns":0
  1188. }
  1189. },
  1190. {
  1191. "device":"floppy0",
  1192. "stats":{
  1193. "wr_highest_offset":0,
  1194. "wr_bytes":0,
  1195. "wr_operations":0,
  1196. "rd_bytes":0,
  1197. "rd_operations":0
  1198. "flush_operations":0,
  1199. "wr_total_times_ns":0
  1200. "rd_total_times_ns":0
  1201. "flush_total_times_ns":0
  1202. }
  1203. },
  1204. {
  1205. "device":"sd0",
  1206. "stats":{
  1207. "wr_highest_offset":0,
  1208. "wr_bytes":0,
  1209. "wr_operations":0,
  1210. "rd_bytes":0,
  1211. "rd_operations":0
  1212. "flush_operations":0,
  1213. "wr_total_times_ns":0
  1214. "rd_total_times_ns":0
  1215. "flush_total_times_ns":0
  1216. }
  1217. }
  1218. ]
  1219. }
  1220. EQMP
  1221. {
  1222. .name = "query-blockstats",
  1223. .args_type = "",
  1224. .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
  1225. },
  1226. SQMP
  1227. query-cpus
  1228. ----------
  1229. Show CPU information.
  1230. Return a json-array. Each CPU is represented by a json-object, which contains:
  1231. - "CPU": CPU index (json-int)
  1232. - "current": true if this is the current CPU, false otherwise (json-bool)
  1233. - "halted": true if the cpu is halted, false otherwise (json-bool)
  1234. - Current program counter. The key's name depends on the architecture:
  1235. "pc": i386/x86_64 (json-int)
  1236. "nip": PPC (json-int)
  1237. "pc" and "npc": sparc (json-int)
  1238. "PC": mips (json-int)
  1239. - "thread_id": ID of the underlying host thread (json-int)
  1240. Example:
  1241. -> { "execute": "query-cpus" }
  1242. <- {
  1243. "return":[
  1244. {
  1245. "CPU":0,
  1246. "current":true,
  1247. "halted":false,
  1248. "pc":3227107138
  1249. "thread_id":3134
  1250. },
  1251. {
  1252. "CPU":1,
  1253. "current":false,
  1254. "halted":true,
  1255. "pc":7108165
  1256. "thread_id":3135
  1257. }
  1258. ]
  1259. }
  1260. EQMP
  1261. {
  1262. .name = "query-cpus",
  1263. .args_type = "",
  1264. .mhandler.cmd_new = qmp_marshal_input_query_cpus,
  1265. },
  1266. SQMP
  1267. query-pci
  1268. ---------
  1269. PCI buses and devices information.
  1270. The returned value is a json-array of all buses. Each bus is represented by
  1271. a json-object, which has a key with a json-array of all PCI devices attached
  1272. to it. Each device is represented by a json-object.
  1273. The bus json-object contains the following:
  1274. - "bus": bus number (json-int)
  1275. - "devices": a json-array of json-objects, each json-object represents a
  1276. PCI device
  1277. The PCI device json-object contains the following:
  1278. - "bus": identical to the parent's bus number (json-int)
  1279. - "slot": slot number (json-int)
  1280. - "function": function number (json-int)
  1281. - "class_info": a json-object containing:
  1282. - "desc": device class description (json-string, optional)
  1283. - "class": device class number (json-int)
  1284. - "id": a json-object containing:
  1285. - "device": device ID (json-int)
  1286. - "vendor": vendor ID (json-int)
  1287. - "irq": device's IRQ if assigned (json-int, optional)
  1288. - "qdev_id": qdev id string (json-string)
  1289. - "pci_bridge": It's a json-object, only present if this device is a
  1290. PCI bridge, contains:
  1291. - "bus": bus number (json-int)
  1292. - "secondary": secondary bus number (json-int)
  1293. - "subordinate": subordinate bus number (json-int)
  1294. - "io_range": I/O memory range information, a json-object with the
  1295. following members:
  1296. - "base": base address, in bytes (json-int)
  1297. - "limit": limit address, in bytes (json-int)
  1298. - "memory_range": memory range information, a json-object with the
  1299. following members:
  1300. - "base": base address, in bytes (json-int)
  1301. - "limit": limit address, in bytes (json-int)
  1302. - "prefetchable_range": Prefetchable memory range information, a
  1303. json-object with the following members:
  1304. - "base": base address, in bytes (json-int)
  1305. - "limit": limit address, in bytes (json-int)
  1306. - "devices": a json-array of PCI devices if there's any attached, each
  1307. each element is represented by a json-object, which contains
  1308. the same members of the 'PCI device json-object' described
  1309. above (optional)
  1310. - "regions": a json-array of json-objects, each json-object represents a
  1311. memory region of this device
  1312. The memory range json-object contains the following:
  1313. - "base": base memory address (json-int)
  1314. - "limit": limit value (json-int)
  1315. The region json-object can be an I/O region or a memory region, an I/O region
  1316. json-object contains the following:
  1317. - "type": "io" (json-string, fixed)
  1318. - "bar": BAR number (json-int)
  1319. - "address": memory address (json-int)
  1320. - "size": memory size (json-int)
  1321. A memory region json-object contains the following:
  1322. - "type": "memory" (json-string, fixed)
  1323. - "bar": BAR number (json-int)
  1324. - "address": memory address (json-int)
  1325. - "size": memory size (json-int)
  1326. - "mem_type_64": true or false (json-bool)
  1327. - "prefetch": true or false (json-bool)
  1328. Example:
  1329. -> { "execute": "query-pci" }
  1330. <- {
  1331. "return":[
  1332. {
  1333. "bus":0,
  1334. "devices":[
  1335. {
  1336. "bus":0,
  1337. "qdev_id":"",
  1338. "slot":0,
  1339. "class_info":{
  1340. "class":1536,
  1341. "desc":"Host bridge"
  1342. },
  1343. "id":{
  1344. "device":32902,
  1345. "vendor":4663
  1346. },
  1347. "function":0,
  1348. "regions":[
  1349. ]
  1350. },
  1351. {
  1352. "bus":0,
  1353. "qdev_id":"",
  1354. "slot":1,
  1355. "class_info":{
  1356. "class":1537,
  1357. "desc":"ISA bridge"
  1358. },
  1359. "id":{
  1360. "device":32902,
  1361. "vendor":28672
  1362. },
  1363. "function":0,
  1364. "regions":[
  1365. ]
  1366. },
  1367. {
  1368. "bus":0,
  1369. "qdev_id":"",
  1370. "slot":1,
  1371. "class_info":{
  1372. "class":257,
  1373. "desc":"IDE controller"
  1374. },
  1375. "id":{
  1376. "device":32902,
  1377. "vendor":28688
  1378. },
  1379. "function":1,
  1380. "regions":[
  1381. {
  1382. "bar":4,
  1383. "size":16,
  1384. "address":49152,
  1385. "type":"io"
  1386. }
  1387. ]
  1388. },
  1389. {
  1390. "bus":0,
  1391. "qdev_id":"",
  1392. "slot":2,
  1393. "class_info":{
  1394. "class":768,
  1395. "desc":"VGA controller"
  1396. },
  1397. "id":{
  1398. "device":4115,
  1399. "vendor":184
  1400. },
  1401. "function":0,
  1402. "regions":[
  1403. {
  1404. "prefetch":true,
  1405. "mem_type_64":false,
  1406. "bar":0,
  1407. "size":33554432,
  1408. "address":4026531840,
  1409. "type":"memory"
  1410. },
  1411. {
  1412. "prefetch":false,
  1413. "mem_type_64":false,
  1414. "bar":1,
  1415. "size":4096,
  1416. "address":4060086272,
  1417. "type":"memory"
  1418. },
  1419. {
  1420. "prefetch":false,
  1421. "mem_type_64":false,
  1422. "bar":6,
  1423. "size":65536,
  1424. "address":-1,
  1425. "type":"memory"
  1426. }
  1427. ]
  1428. },
  1429. {
  1430. "bus":0,
  1431. "qdev_id":"",
  1432. "irq":11,
  1433. "slot":4,
  1434. "class_info":{
  1435. "class":1280,
  1436. "desc":"RAM controller"
  1437. },
  1438. "id":{
  1439. "device":6900,
  1440. "vendor":4098
  1441. },
  1442. "function":0,
  1443. "regions":[
  1444. {
  1445. "bar":0,
  1446. "size":32,
  1447. "address":49280,
  1448. "type":"io"
  1449. }
  1450. ]
  1451. }
  1452. ]
  1453. }
  1454. ]
  1455. }
  1456. Note: This example has been shortened as the real response is too long.
  1457. EQMP
  1458. {
  1459. .name = "query-pci",
  1460. .args_type = "",
  1461. .mhandler.cmd_new = qmp_marshal_input_query_pci,
  1462. },
  1463. SQMP
  1464. query-kvm
  1465. ---------
  1466. Show KVM information.
  1467. Return a json-object with the following information:
  1468. - "enabled": true if KVM support is enabled, false otherwise (json-bool)
  1469. - "present": true if QEMU has KVM support, false otherwise (json-bool)
  1470. Example:
  1471. -> { "execute": "query-kvm" }
  1472. <- { "return": { "enabled": true, "present": true } }
  1473. EQMP
  1474. {
  1475. .name = "query-kvm",
  1476. .args_type = "",
  1477. .mhandler.cmd_new = qmp_marshal_input_query_kvm,
  1478. },
  1479. SQMP
  1480. query-status
  1481. ------------
  1482. Return a json-object with the following information:
  1483. - "running": true if the VM is running, or false if it is paused (json-bool)
  1484. - "singlestep": true if the VM is in single step mode,
  1485. false otherwise (json-bool)
  1486. - "status": one of the following values (json-string)
  1487. "debug" - QEMU is running on a debugger
  1488. "inmigrate" - guest is paused waiting for an incoming migration
  1489. "internal-error" - An internal error that prevents further guest
  1490. execution has occurred
  1491. "io-error" - the last IOP has failed and the device is configured
  1492. to pause on I/O errors
  1493. "paused" - guest has been paused via the 'stop' command
  1494. "postmigrate" - guest is paused following a successful 'migrate'
  1495. "prelaunch" - QEMU was started with -S and guest has not started
  1496. "finish-migrate" - guest is paused to finish the migration process
  1497. "restore-vm" - guest is paused to restore VM state
  1498. "running" - guest is actively running
  1499. "save-vm" - guest is paused to save the VM state
  1500. "shutdown" - guest is shut down (and -no-shutdown is in use)
  1501. "watchdog" - the watchdog action is configured to pause and
  1502. has been triggered
  1503. Example:
  1504. -> { "execute": "query-status" }
  1505. <- { "return": { "running": true, "singlestep": false, "status": "running" } }
  1506. EQMP
  1507. {
  1508. .name = "query-status",
  1509. .args_type = "",
  1510. .mhandler.cmd_new = qmp_marshal_input_query_status,
  1511. },
  1512. SQMP
  1513. query-mice
  1514. ----------
  1515. Show VM mice information.
  1516. Each mouse is represented by a json-object, the returned value is a json-array
  1517. of all mice.
  1518. The mouse json-object contains the following:
  1519. - "name": mouse's name (json-string)
  1520. - "index": mouse's index (json-int)
  1521. - "current": true if this mouse is receiving events, false otherwise (json-bool)
  1522. - "absolute": true if the mouse generates absolute input events (json-bool)
  1523. Example:
  1524. -> { "execute": "query-mice" }
  1525. <- {
  1526. "return":[
  1527. {
  1528. "name":"QEMU Microsoft Mouse",
  1529. "index":0,
  1530. "current":false,
  1531. "absolute":false
  1532. },
  1533. {
  1534. "name":"QEMU PS/2 Mouse",
  1535. "index":1,
  1536. "current":true,
  1537. "absolute":true
  1538. }
  1539. ]
  1540. }
  1541. EQMP
  1542. {
  1543. .name = "query-mice",
  1544. .args_type = "",
  1545. .mhandler.cmd_new = qmp_marshal_input_query_mice,
  1546. },
  1547. SQMP
  1548. query-vnc
  1549. ---------
  1550. Show VNC server information.
  1551. Return a json-object with server information. Connected clients are returned
  1552. as a json-array of json-objects.
  1553. The main json-object contains the following:
  1554. - "enabled": true or false (json-bool)
  1555. - "host": server's IP address (json-string)
  1556. - "family": address family (json-string)
  1557. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  1558. - "service": server's port number (json-string)
  1559. - "auth": authentication method (json-string)
  1560. - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
  1561. "tls", "ultra", "unknown", "vencrypt", "vencrypt",
  1562. "vencrypt+plain", "vencrypt+tls+none",
  1563. "vencrypt+tls+plain", "vencrypt+tls+sasl",
  1564. "vencrypt+tls+vnc", "vencrypt+x509+none",
  1565. "vencrypt+x509+plain", "vencrypt+x509+sasl",
  1566. "vencrypt+x509+vnc", "vnc"
  1567. - "clients": a json-array of all connected clients
  1568. Clients are described by a json-object, each one contain the following:
  1569. - "host": client's IP address (json-string)
  1570. - "family": address family (json-string)
  1571. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  1572. - "service": client's port number (json-string)
  1573. - "x509_dname": TLS dname (json-string, optional)
  1574. - "sasl_username": SASL username (json-string, optional)
  1575. Example:
  1576. -> { "execute": "query-vnc" }
  1577. <- {
  1578. "return":{
  1579. "enabled":true,
  1580. "host":"0.0.0.0",
  1581. "service":"50402",
  1582. "auth":"vnc",
  1583. "family":"ipv4",
  1584. "clients":[
  1585. {
  1586. "host":"127.0.0.1",
  1587. "service":"50401",
  1588. "family":"ipv4"
  1589. }
  1590. ]
  1591. }
  1592. }
  1593. EQMP
  1594. {
  1595. .name = "query-vnc",
  1596. .args_type = "",
  1597. .mhandler.cmd_new = qmp_marshal_input_query_vnc,
  1598. },
  1599. SQMP
  1600. query-spice
  1601. -----------
  1602. Show SPICE server information.
  1603. Return a json-object with server information. Connected clients are returned
  1604. as a json-array of json-objects.
  1605. The main json-object contains the following:
  1606. - "enabled": true or false (json-bool)
  1607. - "host": server's IP address (json-string)
  1608. - "port": server's port number (json-int, optional)
  1609. - "tls-port": server's port number (json-int, optional)
  1610. - "auth": authentication method (json-string)
  1611. - Possible values: "none", "spice"
  1612. - "channels": a json-array of all active channels clients
  1613. Channels are described by a json-object, each one contain the following:
  1614. - "host": client's IP address (json-string)
  1615. - "family": address family (json-string)
  1616. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  1617. - "port": client's port number (json-string)
  1618. - "connection-id": spice connection id. All channels with the same id
  1619. belong to the same spice session (json-int)
  1620. - "channel-type": channel type. "1" is the main control channel, filter for
  1621. this one if you want track spice sessions only (json-int)
  1622. - "channel-id": channel id. Usually "0", might be different needed when
  1623. multiple channels of the same type exist, such as multiple
  1624. display channels in a multihead setup (json-int)
  1625. - "tls": whevener the channel is encrypted (json-bool)
  1626. Example:
  1627. -> { "execute": "query-spice" }
  1628. <- {
  1629. "return": {
  1630. "enabled": true,
  1631. "auth": "spice",
  1632. "port": 5920,
  1633. "tls-port": 5921,
  1634. "host": "0.0.0.0",
  1635. "channels": [
  1636. {
  1637. "port": "54924",
  1638. "family": "ipv4",
  1639. "channel-type": 1,
  1640. "connection-id": 1804289383,
  1641. "host": "127.0.0.1",
  1642. "channel-id": 0,
  1643. "tls": true
  1644. },
  1645. {
  1646. "port": "36710",
  1647. "family": "ipv4",
  1648. "channel-type": 4,
  1649. "connection-id": 1804289383,
  1650. "host": "127.0.0.1",
  1651. "channel-id": 0,
  1652. "tls": false
  1653. },
  1654. [ ... more channels follow ... ]
  1655. ]
  1656. }
  1657. }
  1658. EQMP
  1659. #if defined(CONFIG_SPICE)
  1660. {
  1661. .name = "query-spice",
  1662. .args_type = "",
  1663. .mhandler.cmd_new = qmp_marshal_input_query_spice,
  1664. },
  1665. #endif
  1666. SQMP
  1667. query-name
  1668. ----------
  1669. Show VM name.
  1670. Return a json-object with the following information:
  1671. - "name": VM's name (json-string, optional)
  1672. Example:
  1673. -> { "execute": "query-name" }
  1674. <- { "return": { "name": "qemu-name" } }
  1675. EQMP
  1676. {
  1677. .name = "query-name",
  1678. .args_type = "",
  1679. .mhandler.cmd_new = qmp_marshal_input_query_name,
  1680. },
  1681. SQMP
  1682. query-uuid
  1683. ----------
  1684. Show VM UUID.
  1685. Return a json-object with the following information:
  1686. - "UUID": Universally Unique Identifier (json-string)
  1687. Example:
  1688. -> { "execute": "query-uuid" }
  1689. <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
  1690. EQMP
  1691. {
  1692. .name = "query-uuid",
  1693. .args_type = "",
  1694. .mhandler.cmd_new = qmp_marshal_input_query_uuid,
  1695. },
  1696. SQMP
  1697. query-migrate
  1698. -------------
  1699. Migration status.
  1700. Return a json-object. If migration is active there will be another json-object
  1701. with RAM migration status and if block migration is active another one with
  1702. block migration status.
  1703. The main json-object contains the following:
  1704. - "status": migration status (json-string)
  1705. - Possible values: "active", "completed", "failed", "cancelled"
  1706. - "total-time": total amount of ms since migration started. If
  1707. migration has ended, it returns the total migration
  1708. time (json-int)
  1709. - "ram": only present if "status" is "active", it is a json-object with the
  1710. following RAM information (in bytes):
  1711. - "transferred": amount transferred (json-int)
  1712. - "remaining": amount remaining (json-int)
  1713. - "total": total (json-int)
  1714. - "duplicate": number of duplicated pages (json-int)
  1715. - "normal" : number of normal pages transferred (json-int)
  1716. - "normal-bytes" : number of normal bytes transferred (json-int)
  1717. - "disk": only present if "status" is "active" and it is a block migration,
  1718. it is a json-object with the following disk information (in bytes):
  1719. - "transferred": amount transferred (json-int)
  1720. - "remaining": amount remaining (json-int)
  1721. - "total": total (json-int)
  1722. - "xbzrle-cache": only present if XBZRLE is active.
  1723. It is a json-object with the following XBZRLE information:
  1724. - "cache-size": XBZRLE cache size
  1725. - "bytes": total XBZRLE bytes transferred
  1726. - "pages": number of XBZRLE compressed pages
  1727. - "cache-miss": number of cache misses
  1728. - "overflow": number of XBZRLE overflows
  1729. Examples:
  1730. 1. Before the first migration
  1731. -> { "execute": "query-migrate" }
  1732. <- { "return": {} }
  1733. 2. Migration is done and has succeeded
  1734. -> { "execute": "query-migrate" }
  1735. <- { "return": {
  1736. "status": "completed",
  1737. "ram":{
  1738. "transferred":123,
  1739. "remaining":123,
  1740. "total":246,
  1741. "total-time":12345,
  1742. "duplicate":123,
  1743. "normal":123,
  1744. "normal-bytes":123456
  1745. }
  1746. }
  1747. }
  1748. 3. Migration is done and has failed
  1749. -> { "execute": "query-migrate" }
  1750. <- { "return": { "status": "failed" } }
  1751. 4. Migration is being performed and is not a block migration:
  1752. -> { "execute": "query-migrate" }
  1753. <- {
  1754. "return":{
  1755. "status":"active",
  1756. "ram":{
  1757. "transferred":123,
  1758. "remaining":123,
  1759. "total":246,
  1760. "total-time":12345,
  1761. "duplicate":123,
  1762. "normal":123,
  1763. "normal-bytes":123456
  1764. }
  1765. }
  1766. }
  1767. 5. Migration is being performed and is a block migration:
  1768. -> { "execute": "query-migrate" }
  1769. <- {
  1770. "return":{
  1771. "status":"active",
  1772. "ram":{
  1773. "total":1057024,
  1774. "remaining":1053304,
  1775. "transferred":3720,
  1776. "total-time":12345,
  1777. "duplicate":123,
  1778. "normal":123,
  1779. "normal-bytes":123456
  1780. },
  1781. "disk":{
  1782. "total":20971520,
  1783. "remaining":20880384,
  1784. "transferred":91136
  1785. }
  1786. }
  1787. }
  1788. 6. Migration is being performed and XBZRLE is active:
  1789. -> { "execute": "query-migrate" }
  1790. <- {
  1791. "return":{
  1792. "status":"active",
  1793. "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
  1794. "ram":{
  1795. "total":1057024,
  1796. "remaining":1053304,
  1797. "transferred":3720,
  1798. "total-time":12345,
  1799. "duplicate":10,
  1800. "normal":3333,
  1801. "normal-bytes":3412992
  1802. },
  1803. "xbzrle-cache":{
  1804. "cache-size":67108864,
  1805. "bytes":20971520,
  1806. "pages":2444343,
  1807. "cache-miss":2244,
  1808. "overflow":34434
  1809. }
  1810. }
  1811. }
  1812. EQMP
  1813. {
  1814. .name = "query-migrate",
  1815. .args_type = "",
  1816. .mhandler.cmd_new = qmp_marshal_input_query_migrate,
  1817. },
  1818. SQMP
  1819. migrate-set-capabilities
  1820. -------
  1821. Enable/Disable migration capabilities
  1822. - "xbzrle": xbzrle support
  1823. Arguments:
  1824. Example:
  1825. -> { "execute": "migrate-set-capabilities" , "arguments":
  1826. { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
  1827. EQMP
  1828. {
  1829. .name = "migrate-set-capabilities",
  1830. .args_type = "capabilities:O",
  1831. .params = "capability:s,state:b",
  1832. .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
  1833. },
  1834. SQMP
  1835. query-migrate-capabilities
  1836. -------
  1837. Query current migration capabilities
  1838. - "capabilities": migration capabilities state
  1839. - "xbzrle" : XBZRLE state (json-bool)
  1840. Arguments:
  1841. Example:
  1842. -> { "execute": "query-migrate-capabilities" }
  1843. <- { "return": {
  1844. "capabilities" : [ { "capability" : "xbzrle", "state" : false } ]
  1845. }
  1846. }
  1847. EQMP
  1848. {
  1849. .name = "query-migrate-capabilities",
  1850. .args_type = "",
  1851. .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
  1852. },
  1853. SQMP
  1854. query-balloon
  1855. -------------
  1856. Show balloon information.
  1857. Make an asynchronous request for balloon info. When the request completes a
  1858. json-object will be returned containing the following data:
  1859. - "actual": current balloon value in bytes (json-int)
  1860. - "mem_swapped_in": Amount of memory swapped in bytes (json-int, optional)
  1861. - "mem_swapped_out": Amount of memory swapped out in bytes (json-int, optional)
  1862. - "major_page_faults": Number of major faults (json-int, optional)
  1863. - "minor_page_faults": Number of minor faults (json-int, optional)
  1864. - "free_mem": Total amount of free and unused memory in
  1865. bytes (json-int, optional)
  1866. - "total_mem": Total amount of available memory in bytes (json-int, optional)
  1867. Example:
  1868. -> { "execute": "query-balloon" }
  1869. <- {
  1870. "return":{
  1871. "actual":1073741824,
  1872. "mem_swapped_in":0,
  1873. "mem_swapped_out":0,
  1874. "major_page_faults":142,
  1875. "minor_page_faults":239245,
  1876. "free_mem":1014185984,
  1877. "total_mem":1044668416
  1878. }
  1879. }
  1880. EQMP
  1881. {
  1882. .name = "query-balloon",
  1883. .args_type = "",
  1884. .mhandler.cmd_new = qmp_marshal_input_query_balloon,
  1885. },
  1886. {
  1887. .name = "query-block-jobs",
  1888. .args_type = "",
  1889. .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
  1890. },
  1891. {
  1892. .name = "qom-list",
  1893. .args_type = "path:s",
  1894. .mhandler.cmd_new = qmp_marshal_input_qom_list,
  1895. },
  1896. {
  1897. .name = "qom-set",
  1898. .args_type = "path:s,property:s,value:q",
  1899. .mhandler.cmd_new = qmp_qom_set,
  1900. },
  1901. {
  1902. .name = "qom-get",
  1903. .args_type = "path:s,property:s",
  1904. .mhandler.cmd_new = qmp_qom_get,
  1905. },
  1906. {
  1907. .name = "change-vnc-password",
  1908. .args_type = "password:s",
  1909. .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
  1910. },
  1911. {
  1912. .name = "qom-list-types",
  1913. .args_type = "implements:s?,abstract:b?",
  1914. .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
  1915. },
  1916. {
  1917. .name = "device-list-properties",
  1918. .args_type = "typename:s",
  1919. .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
  1920. },
  1921. {
  1922. .name = "query-machines",
  1923. .args_type = "",
  1924. .mhandler.cmd_new = qmp_marshal_input_query_machines,
  1925. },
  1926. {
  1927. .name = "query-cpu-definitions",
  1928. .args_type = "",
  1929. .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
  1930. },
  1931. {
  1932. .name = "query-target",
  1933. .args_type = "",
  1934. .mhandler.cmd_new = qmp_marshal_input_query_target,
  1935. },