2
0

qmp-commands.hx 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856
  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. .mhandler.cmd_new = qmp_marshal_input_screendump,
  103. },
  104. SQMP
  105. screendump
  106. ----------
  107. Save screen into PPM image.
  108. Arguments:
  109. - "filename": file path (json-string)
  110. Example:
  111. -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
  112. <- { "return": {} }
  113. EQMP
  114. {
  115. .name = "stop",
  116. .args_type = "",
  117. .mhandler.cmd_new = qmp_marshal_input_stop,
  118. },
  119. SQMP
  120. stop
  121. ----
  122. Stop the emulator.
  123. Arguments: None.
  124. Example:
  125. -> { "execute": "stop" }
  126. <- { "return": {} }
  127. EQMP
  128. {
  129. .name = "cont",
  130. .args_type = "",
  131. .mhandler.cmd_new = qmp_marshal_input_cont,
  132. },
  133. SQMP
  134. cont
  135. ----
  136. Resume emulation.
  137. Arguments: None.
  138. Example:
  139. -> { "execute": "cont" }
  140. <- { "return": {} }
  141. EQMP
  142. {
  143. .name = "system_wakeup",
  144. .args_type = "",
  145. .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
  146. },
  147. SQMP
  148. system_wakeup
  149. -------------
  150. Wakeup guest from suspend.
  151. Arguments: None.
  152. Example:
  153. -> { "execute": "system_wakeup" }
  154. <- { "return": {} }
  155. EQMP
  156. {
  157. .name = "system_reset",
  158. .args_type = "",
  159. .mhandler.cmd_new = qmp_marshal_input_system_reset,
  160. },
  161. SQMP
  162. system_reset
  163. ------------
  164. Reset the system.
  165. Arguments: None.
  166. Example:
  167. -> { "execute": "system_reset" }
  168. <- { "return": {} }
  169. EQMP
  170. {
  171. .name = "system_powerdown",
  172. .args_type = "",
  173. .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
  174. },
  175. SQMP
  176. system_powerdown
  177. ----------------
  178. Send system power down event.
  179. Arguments: None.
  180. Example:
  181. -> { "execute": "system_powerdown" }
  182. <- { "return": {} }
  183. EQMP
  184. {
  185. .name = "device_add",
  186. .args_type = "device:O",
  187. .params = "driver[,prop=value][,...]",
  188. .help = "add device, like -device on the command line",
  189. .user_print = monitor_user_noop,
  190. .mhandler.cmd_new = do_device_add,
  191. },
  192. SQMP
  193. device_add
  194. ----------
  195. Add a device.
  196. Arguments:
  197. - "driver": the name of the new device's driver (json-string)
  198. - "bus": the device's parent bus (device tree path, json-string, optional)
  199. - "id": the device's ID, must be unique (json-string)
  200. - device properties
  201. Example:
  202. -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
  203. <- { "return": {} }
  204. Notes:
  205. (1) For detailed information about this command, please refer to the
  206. 'docs/qdev-device-use.txt' file.
  207. (2) It's possible to list device properties by running QEMU with the
  208. "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
  209. EQMP
  210. {
  211. .name = "device_del",
  212. .args_type = "id:s",
  213. .mhandler.cmd_new = qmp_marshal_input_device_del,
  214. },
  215. SQMP
  216. device_del
  217. ----------
  218. Remove a device.
  219. Arguments:
  220. - "id": the device's ID (json-string)
  221. Example:
  222. -> { "execute": "device_del", "arguments": { "id": "net1" } }
  223. <- { "return": {} }
  224. EQMP
  225. {
  226. .name = "send-key",
  227. .args_type = "keys:O,hold-time:i?",
  228. .mhandler.cmd_new = qmp_marshal_input_send_key,
  229. },
  230. SQMP
  231. send-key
  232. ----------
  233. Send keys to VM.
  234. Arguments:
  235. keys array:
  236. - "key": key sequence (a json-array of key union values,
  237. union can be number or qcode enum)
  238. - hold-time: time to delay key up events, milliseconds. Defaults to 100
  239. (json-int, optional)
  240. Example:
  241. -> { "execute": "send-key",
  242. "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
  243. { "type": "qcode", "data": "alt" },
  244. { "type": "qcode", "data": "delete" } ] } }
  245. <- { "return": {} }
  246. EQMP
  247. {
  248. .name = "cpu",
  249. .args_type = "index:i",
  250. .mhandler.cmd_new = qmp_marshal_input_cpu,
  251. },
  252. SQMP
  253. cpu
  254. ---
  255. Set the default CPU.
  256. Arguments:
  257. - "index": the CPU's index (json-int)
  258. Example:
  259. -> { "execute": "cpu", "arguments": { "index": 0 } }
  260. <- { "return": {} }
  261. Note: CPUs' indexes are obtained with the 'query-cpus' command.
  262. EQMP
  263. {
  264. .name = "cpu-add",
  265. .args_type = "id:i",
  266. .mhandler.cmd_new = qmp_marshal_input_cpu_add,
  267. },
  268. SQMP
  269. cpu-add
  270. -------
  271. Adds virtual cpu
  272. Arguments:
  273. - "id": cpu id (json-int)
  274. Example:
  275. -> { "execute": "cpu-add", "arguments": { "id": 2 } }
  276. <- { "return": {} }
  277. EQMP
  278. {
  279. .name = "memsave",
  280. .args_type = "val:l,size:i,filename:s,cpu:i?",
  281. .mhandler.cmd_new = qmp_marshal_input_memsave,
  282. },
  283. SQMP
  284. memsave
  285. -------
  286. Save to disk virtual memory dump starting at 'val' of size 'size'.
  287. Arguments:
  288. - "val": the starting address (json-int)
  289. - "size": the memory size, in bytes (json-int)
  290. - "filename": file path (json-string)
  291. - "cpu": virtual CPU index (json-int, optional)
  292. Example:
  293. -> { "execute": "memsave",
  294. "arguments": { "val": 10,
  295. "size": 100,
  296. "filename": "/tmp/virtual-mem-dump" } }
  297. <- { "return": {} }
  298. EQMP
  299. {
  300. .name = "pmemsave",
  301. .args_type = "val:l,size:i,filename:s",
  302. .mhandler.cmd_new = qmp_marshal_input_pmemsave,
  303. },
  304. SQMP
  305. pmemsave
  306. --------
  307. Save to disk physical memory dump starting at 'val' of size 'size'.
  308. Arguments:
  309. - "val": the starting address (json-int)
  310. - "size": the memory size, in bytes (json-int)
  311. - "filename": file path (json-string)
  312. Example:
  313. -> { "execute": "pmemsave",
  314. "arguments": { "val": 10,
  315. "size": 100,
  316. "filename": "/tmp/physical-mem-dump" } }
  317. <- { "return": {} }
  318. EQMP
  319. {
  320. .name = "inject-nmi",
  321. .args_type = "",
  322. .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
  323. },
  324. SQMP
  325. inject-nmi
  326. ----------
  327. Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
  328. Arguments: None.
  329. Example:
  330. -> { "execute": "inject-nmi" }
  331. <- { "return": {} }
  332. Note: inject-nmi fails when the guest doesn't support injecting.
  333. EQMP
  334. {
  335. .name = "ringbuf-write",
  336. .args_type = "device:s,data:s,format:s?",
  337. .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
  338. },
  339. SQMP
  340. ringbuf-write
  341. -------------
  342. Write to a ring buffer character device.
  343. Arguments:
  344. - "device": ring buffer character device name (json-string)
  345. - "data": data to write (json-string)
  346. - "format": data format (json-string, optional)
  347. - Possible values: "utf8" (default), "base64"
  348. Bug: invalid base64 is currently not rejected.
  349. Whitespace *is* invalid.
  350. Example:
  351. -> { "execute": "ringbuf-write",
  352. "arguments": { "device": "foo",
  353. "data": "abcdefgh",
  354. "format": "utf8" } }
  355. <- { "return": {} }
  356. EQMP
  357. {
  358. .name = "ringbuf-read",
  359. .args_type = "device:s,size:i,format:s?",
  360. .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
  361. },
  362. SQMP
  363. ringbuf-read
  364. -------------
  365. Read from a ring buffer character device.
  366. Arguments:
  367. - "device": ring buffer character device name (json-string)
  368. - "size": how many bytes to read at most (json-int)
  369. - Number of data bytes, not number of characters in encoded data
  370. - "format": data format (json-string, optional)
  371. - Possible values: "utf8" (default), "base64"
  372. - Naturally, format "utf8" works only when the ring buffer
  373. contains valid UTF-8 text. Invalid UTF-8 sequences get
  374. replaced. Bug: replacement doesn't work. Bug: can screw
  375. up on encountering NUL characters, after the ring buffer
  376. lost data, and when reading stops because the size limit
  377. is reached.
  378. Example:
  379. -> { "execute": "ringbuf-read",
  380. "arguments": { "device": "foo",
  381. "size": 1000,
  382. "format": "utf8" } }
  383. <- {"return": "abcdefgh"}
  384. EQMP
  385. {
  386. .name = "xen-save-devices-state",
  387. .args_type = "filename:F",
  388. .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
  389. },
  390. SQMP
  391. xen-save-devices-state
  392. -------
  393. Save the state of all devices to file. The RAM and the block devices
  394. of the VM are not saved by this command.
  395. Arguments:
  396. - "filename": the file to save the state of the devices to as binary
  397. data. See xen-save-devices-state.txt for a description of the binary
  398. format.
  399. Example:
  400. -> { "execute": "xen-save-devices-state",
  401. "arguments": { "filename": "/tmp/save" } }
  402. <- { "return": {} }
  403. EQMP
  404. {
  405. .name = "xen-set-global-dirty-log",
  406. .args_type = "enable:b",
  407. .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
  408. },
  409. SQMP
  410. xen-set-global-dirty-log
  411. -------
  412. Enable or disable the global dirty log mode.
  413. Arguments:
  414. - "enable": Enable it or disable it.
  415. Example:
  416. -> { "execute": "xen-set-global-dirty-log",
  417. "arguments": { "enable": true } }
  418. <- { "return": {} }
  419. EQMP
  420. {
  421. .name = "migrate",
  422. .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
  423. .mhandler.cmd_new = qmp_marshal_input_migrate,
  424. },
  425. SQMP
  426. migrate
  427. -------
  428. Migrate to URI.
  429. Arguments:
  430. - "blk": block migration, full disk copy (json-bool, optional)
  431. - "inc": incremental disk copy (json-bool, optional)
  432. - "uri": Destination URI (json-string)
  433. Example:
  434. -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
  435. <- { "return": {} }
  436. Notes:
  437. (1) The 'query-migrate' command should be used to check migration's progress
  438. and final result (this information is provided by the 'status' member)
  439. (2) All boolean arguments default to false
  440. (3) The user Monitor's "detach" argument is invalid in QMP and should not
  441. be used
  442. EQMP
  443. {
  444. .name = "migrate_cancel",
  445. .args_type = "",
  446. .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
  447. },
  448. SQMP
  449. migrate_cancel
  450. --------------
  451. Cancel the current migration.
  452. Arguments: None.
  453. Example:
  454. -> { "execute": "migrate_cancel" }
  455. <- { "return": {} }
  456. EQMP
  457. {
  458. .name = "migrate-set-cache-size",
  459. .args_type = "value:o",
  460. .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
  461. },
  462. SQMP
  463. migrate-set-cache-size
  464. ----------------------
  465. Set cache size to be used by XBZRLE migration, the cache size will be rounded
  466. down to the nearest power of 2
  467. Arguments:
  468. - "value": cache size in bytes (json-int)
  469. Example:
  470. -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
  471. <- { "return": {} }
  472. EQMP
  473. {
  474. .name = "query-migrate-cache-size",
  475. .args_type = "",
  476. .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
  477. },
  478. SQMP
  479. query-migrate-cache-size
  480. ------------------------
  481. Show cache size to be used by XBZRLE migration
  482. returns a json-object with the following information:
  483. - "size" : json-int
  484. Example:
  485. -> { "execute": "query-migrate-cache-size" }
  486. <- { "return": 67108864 }
  487. EQMP
  488. {
  489. .name = "migrate_set_speed",
  490. .args_type = "value:o",
  491. .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
  492. },
  493. SQMP
  494. migrate_set_speed
  495. -----------------
  496. Set maximum speed for migrations.
  497. Arguments:
  498. - "value": maximum speed, in bytes per second (json-int)
  499. Example:
  500. -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
  501. <- { "return": {} }
  502. EQMP
  503. {
  504. .name = "migrate_set_downtime",
  505. .args_type = "value:T",
  506. .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
  507. },
  508. SQMP
  509. migrate_set_downtime
  510. --------------------
  511. Set maximum tolerated downtime (in seconds) for migrations.
  512. Arguments:
  513. - "value": maximum downtime (json-number)
  514. Example:
  515. -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
  516. <- { "return": {} }
  517. EQMP
  518. {
  519. .name = "client_migrate_info",
  520. .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
  521. .params = "protocol hostname port tls-port cert-subject",
  522. .help = "send migration info to spice/vnc client",
  523. .user_print = monitor_user_noop,
  524. .mhandler.cmd_async = client_migrate_info,
  525. .flags = MONITOR_CMD_ASYNC,
  526. },
  527. SQMP
  528. client_migrate_info
  529. ------------------
  530. Set the spice/vnc connection info for the migration target. The spice/vnc
  531. server will ask the spice/vnc client to automatically reconnect using the
  532. new parameters (if specified) once the vm migration finished successfully.
  533. Arguments:
  534. - "protocol": protocol: "spice" or "vnc" (json-string)
  535. - "hostname": migration target hostname (json-string)
  536. - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
  537. - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
  538. - "cert-subject": server certificate subject (json-string, optional)
  539. Example:
  540. -> { "execute": "client_migrate_info",
  541. "arguments": { "protocol": "spice",
  542. "hostname": "virt42.lab.kraxel.org",
  543. "port": 1234 } }
  544. <- { "return": {} }
  545. EQMP
  546. {
  547. .name = "dump-guest-memory",
  548. .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
  549. .params = "-p protocol [begin] [length] [format]",
  550. .help = "dump guest memory to file",
  551. .user_print = monitor_user_noop,
  552. .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
  553. },
  554. SQMP
  555. dump
  556. Dump guest memory to file. The file can be processed with crash or gdb.
  557. Arguments:
  558. - "paging": do paging to get guest's memory mapping (json-bool)
  559. - "protocol": destination file(started with "file:") or destination file
  560. descriptor (started with "fd:") (json-string)
  561. - "begin": the starting physical address. It's optional, and should be specified
  562. with length together (json-int)
  563. - "length": the memory size, in bytes. It's optional, and should be specified
  564. with begin together (json-int)
  565. - "format": the format of guest memory dump. It's optional, and can be
  566. elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
  567. conflict with paging and filter, ie. begin and length (json-string)
  568. Example:
  569. -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
  570. <- { "return": {} }
  571. Notes:
  572. (1) All boolean arguments default to false
  573. EQMP
  574. {
  575. .name = "query-dump-guest-memory-capability",
  576. .args_type = "",
  577. .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
  578. },
  579. SQMP
  580. query-dump-guest-memory-capability
  581. ----------
  582. Show available formats for 'dump-guest-memory'
  583. Example:
  584. -> { "execute": "query-dump-guest-memory-capability" }
  585. <- { "return": { "formats":
  586. ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
  587. EQMP
  588. {
  589. .name = "netdev_add",
  590. .args_type = "netdev:O",
  591. .mhandler.cmd_new = qmp_netdev_add,
  592. },
  593. SQMP
  594. netdev_add
  595. ----------
  596. Add host network device.
  597. Arguments:
  598. - "type": the device type, "tap", "user", ... (json-string)
  599. - "id": the device's ID, must be unique (json-string)
  600. - device options
  601. Example:
  602. -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
  603. <- { "return": {} }
  604. Note: The supported device options are the same ones supported by the '-netdev'
  605. command-line argument, which are listed in the '-help' output or QEMU's
  606. manual
  607. EQMP
  608. {
  609. .name = "netdev_del",
  610. .args_type = "id:s",
  611. .mhandler.cmd_new = qmp_marshal_input_netdev_del,
  612. },
  613. SQMP
  614. netdev_del
  615. ----------
  616. Remove host network device.
  617. Arguments:
  618. - "id": the device's ID, must be unique (json-string)
  619. Example:
  620. -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
  621. <- { "return": {} }
  622. EQMP
  623. {
  624. .name = "object-add",
  625. .args_type = "qom-type:s,id:s,props:q?",
  626. .mhandler.cmd_new = qmp_object_add,
  627. },
  628. SQMP
  629. object-add
  630. ----------
  631. Create QOM object.
  632. Arguments:
  633. - "qom-type": the object's QOM type, i.e. the class name (json-string)
  634. - "id": the object's ID, must be unique (json-string)
  635. - "props": a dictionary of object property values (optional, json-dict)
  636. Example:
  637. -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
  638. "props": { "filename": "/dev/hwrng" } } }
  639. <- { "return": {} }
  640. EQMP
  641. {
  642. .name = "object-del",
  643. .args_type = "id:s",
  644. .mhandler.cmd_new = qmp_marshal_input_object_del,
  645. },
  646. SQMP
  647. object-del
  648. ----------
  649. Remove QOM object.
  650. Arguments:
  651. - "id": the object's ID (json-string)
  652. Example:
  653. -> { "execute": "object-del", "arguments": { "id": "rng1" } }
  654. <- { "return": {} }
  655. EQMP
  656. {
  657. .name = "block_resize",
  658. .args_type = "device:s?,node-name:s?,size:o",
  659. .mhandler.cmd_new = qmp_marshal_input_block_resize,
  660. },
  661. SQMP
  662. block_resize
  663. ------------
  664. Resize a block image while a guest is running.
  665. Arguments:
  666. - "device": the device's ID, must be unique (json-string)
  667. - "node-name": the node name in the block driver state graph (json-string)
  668. - "size": new size
  669. Example:
  670. -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
  671. <- { "return": {} }
  672. EQMP
  673. {
  674. .name = "block-stream",
  675. .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
  676. .mhandler.cmd_new = qmp_marshal_input_block_stream,
  677. },
  678. {
  679. .name = "block-commit",
  680. .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
  681. .mhandler.cmd_new = qmp_marshal_input_block_commit,
  682. },
  683. SQMP
  684. block-commit
  685. ------------
  686. Live commit of data from overlay image nodes into backing nodes - i.e., writes
  687. data between 'top' and 'base' into 'base'.
  688. Arguments:
  689. - "device": The device's ID, must be unique (json-string)
  690. - "base": The file name of the backing image to write data into.
  691. If not specified, this is the deepest backing image
  692. (json-string, optional)
  693. - "top": The file name of the backing image within the image chain,
  694. which contains the topmost data to be committed down. If
  695. not specified, this is the active layer. (json-string, optional)
  696. - backing-file: The backing file string to write into the overlay
  697. image of 'top'. If 'top' is the active layer,
  698. specifying a backing file string is an error. This
  699. filename is not validated.
  700. If a pathname string is such that it cannot be
  701. resolved by QEMU, that means that subsequent QMP or
  702. HMP commands must use node-names for the image in
  703. question, as filename lookup methods will fail.
  704. If not specified, QEMU will automatically determine
  705. the backing file string to use, or error out if
  706. there is no obvious choice. Care should be taken
  707. when specifying the string, to specify a valid
  708. filename or protocol.
  709. (json-string, optional) (Since 2.1)
  710. If top == base, that is an error.
  711. If top == active, the job will not be completed by itself,
  712. user needs to complete the job with the block-job-complete
  713. command after getting the ready event. (Since 2.0)
  714. If the base image is smaller than top, then the base image
  715. will be resized to be the same size as top. If top is
  716. smaller than the base image, the base will not be
  717. truncated. If you want the base image size to match the
  718. size of the smaller top, you can safely truncate it
  719. yourself once the commit operation successfully completes.
  720. (json-string)
  721. - "speed": the maximum speed, in bytes per second (json-int, optional)
  722. Example:
  723. -> { "execute": "block-commit", "arguments": { "device": "virtio0",
  724. "top": "/tmp/snap1.qcow2" } }
  725. <- { "return": {} }
  726. EQMP
  727. {
  728. .name = "drive-backup",
  729. .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
  730. "on-source-error:s?,on-target-error:s?",
  731. .mhandler.cmd_new = qmp_marshal_input_drive_backup,
  732. },
  733. SQMP
  734. drive-backup
  735. ------------
  736. Start a point-in-time copy of a block device to a new destination. The
  737. status of ongoing drive-backup operations can be checked with
  738. query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
  739. The operation can be stopped before it has completed using the
  740. block-job-cancel command.
  741. Arguments:
  742. - "device": the name of the device which should be copied.
  743. (json-string)
  744. - "target": the target of the new image. If the file exists, or if it is a
  745. device, the existing file/device will be used as the new
  746. destination. If it does not exist, a new file will be created.
  747. (json-string)
  748. - "format": the format of the new destination, default is to probe if 'mode' is
  749. 'existing', else the format of the source
  750. (json-string, optional)
  751. - "sync": what parts of the disk image should be copied to the destination;
  752. possibilities include "full" for all the disk, "top" for only the sectors
  753. allocated in the topmost image, or "none" to only replicate new I/O
  754. (MirrorSyncMode).
  755. - "mode": whether and how QEMU should create a new image
  756. (NewImageMode, optional, default 'absolute-paths')
  757. - "speed": the maximum speed, in bytes per second (json-int, optional)
  758. - "on-source-error": the action to take on an error on the source, default
  759. 'report'. 'stop' and 'enospc' can only be used
  760. if the block device supports io-status.
  761. (BlockdevOnError, optional)
  762. - "on-target-error": the action to take on an error on the target, default
  763. 'report' (no limitations, since this applies to
  764. a different block device than device).
  765. (BlockdevOnError, optional)
  766. Example:
  767. -> { "execute": "drive-backup", "arguments": { "device": "drive0",
  768. "sync": "full",
  769. "target": "backup.img" } }
  770. <- { "return": {} }
  771. EQMP
  772. {
  773. .name = "block-job-set-speed",
  774. .args_type = "device:B,speed:o",
  775. .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
  776. },
  777. {
  778. .name = "block-job-cancel",
  779. .args_type = "device:B,force:b?",
  780. .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
  781. },
  782. {
  783. .name = "block-job-pause",
  784. .args_type = "device:B",
  785. .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
  786. },
  787. {
  788. .name = "block-job-resume",
  789. .args_type = "device:B",
  790. .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
  791. },
  792. {
  793. .name = "block-job-complete",
  794. .args_type = "device:B",
  795. .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
  796. },
  797. {
  798. .name = "transaction",
  799. .args_type = "actions:q",
  800. .mhandler.cmd_new = qmp_marshal_input_transaction,
  801. },
  802. SQMP
  803. transaction
  804. -----------
  805. Atomically operate on one or more block devices. The only supported operations
  806. for now are drive-backup, internal and external snapshotting. A list of
  807. dictionaries is accepted, that contains the actions to be performed.
  808. If there is any failure performing any of the operations, all operations
  809. for the group are abandoned.
  810. For external snapshots, the dictionary contains the device, the file to use for
  811. the new snapshot, and the format. The default format, if not specified, is
  812. qcow2.
  813. Each new snapshot defaults to being created by QEMU (wiping any
  814. contents if the file already exists), but it is also possible to reuse
  815. an externally-created file. In the latter case, you should ensure that
  816. the new image file has the same contents as the current one; QEMU cannot
  817. perform any meaningful check. Typically this is achieved by using the
  818. current image file as the backing file for the new image.
  819. On failure, the original disks pre-snapshot attempt will be used.
  820. For internal snapshots, the dictionary contains the device and the snapshot's
  821. name. If an internal snapshot matching name already exists, the request will
  822. be rejected. Only some image formats support it, for example, qcow2, rbd,
  823. and sheepdog.
  824. On failure, qemu will try delete the newly created internal snapshot in the
  825. transaction. When an I/O error occurs during deletion, the user needs to fix
  826. it later with qemu-img or other command.
  827. Arguments:
  828. actions array:
  829. - "type": the operation to perform. The only supported
  830. value is "blockdev-snapshot-sync". (json-string)
  831. - "data": a dictionary. The contents depend on the value
  832. of "type". When "type" is "blockdev-snapshot-sync":
  833. - "device": device name to snapshot (json-string)
  834. - "node-name": graph node name to snapshot (json-string)
  835. - "snapshot-file": name of new image file (json-string)
  836. - "snapshot-node-name": graph node name of the new snapshot (json-string)
  837. - "format": format of new image (json-string, optional)
  838. - "mode": whether and how QEMU should create the snapshot file
  839. (NewImageMode, optional, default "absolute-paths")
  840. When "type" is "blockdev-snapshot-internal-sync":
  841. - "device": device name to snapshot (json-string)
  842. - "name": name of the new snapshot (json-string)
  843. Example:
  844. -> { "execute": "transaction",
  845. "arguments": { "actions": [
  846. { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
  847. "snapshot-file": "/some/place/my-image",
  848. "format": "qcow2" } },
  849. { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
  850. "snapshot-file": "/some/place/my-image2",
  851. "snapshot-node-name": "node3432",
  852. "mode": "existing",
  853. "format": "qcow2" } },
  854. { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
  855. "snapshot-file": "/some/place/my-image2",
  856. "mode": "existing",
  857. "format": "qcow2" } },
  858. { "type": "blockdev-snapshot-internal-sync", "data" : {
  859. "device": "ide-hd2",
  860. "name": "snapshot0" } } ] } }
  861. <- { "return": {} }
  862. EQMP
  863. {
  864. .name = "blockdev-snapshot-sync",
  865. .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
  866. .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
  867. },
  868. SQMP
  869. blockdev-snapshot-sync
  870. ----------------------
  871. Synchronous snapshot of a block device. snapshot-file specifies the
  872. target of the new image. If the file exists, or if it is a device, the
  873. snapshot will be created in the existing file/device. If does not
  874. exist, a new file will be created. format specifies the format of the
  875. snapshot image, default is qcow2.
  876. Arguments:
  877. - "device": device name to snapshot (json-string)
  878. - "node-name": graph node name to snapshot (json-string)
  879. - "snapshot-file": name of new image file (json-string)
  880. - "snapshot-node-name": graph node name of the new snapshot (json-string)
  881. - "mode": whether and how QEMU should create the snapshot file
  882. (NewImageMode, optional, default "absolute-paths")
  883. - "format": format of new image (json-string, optional)
  884. Example:
  885. -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
  886. "snapshot-file":
  887. "/some/place/my-image",
  888. "format": "qcow2" } }
  889. <- { "return": {} }
  890. EQMP
  891. {
  892. .name = "blockdev-snapshot-internal-sync",
  893. .args_type = "device:B,name:s",
  894. .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
  895. },
  896. SQMP
  897. blockdev-snapshot-internal-sync
  898. -------------------------------
  899. Synchronously take an internal snapshot of a block device when the format of
  900. image used supports it. If the name is an empty string, or a snapshot with
  901. name already exists, the operation will fail.
  902. Arguments:
  903. - "device": device name to snapshot (json-string)
  904. - "name": name of the new snapshot (json-string)
  905. Example:
  906. -> { "execute": "blockdev-snapshot-internal-sync",
  907. "arguments": { "device": "ide-hd0",
  908. "name": "snapshot0" }
  909. }
  910. <- { "return": {} }
  911. EQMP
  912. {
  913. .name = "blockdev-snapshot-delete-internal-sync",
  914. .args_type = "device:B,id:s?,name:s?",
  915. .mhandler.cmd_new =
  916. qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
  917. },
  918. SQMP
  919. blockdev-snapshot-delete-internal-sync
  920. --------------------------------------
  921. Synchronously delete an internal snapshot of a block device when the format of
  922. image used supports it. The snapshot is identified by name or id or both. One
  923. of name or id is required. If the snapshot is not found, the operation will
  924. fail.
  925. Arguments:
  926. - "device": device name (json-string)
  927. - "id": ID of the snapshot (json-string, optional)
  928. - "name": name of the snapshot (json-string, optional)
  929. Example:
  930. -> { "execute": "blockdev-snapshot-delete-internal-sync",
  931. "arguments": { "device": "ide-hd0",
  932. "name": "snapshot0" }
  933. }
  934. <- { "return": {
  935. "id": "1",
  936. "name": "snapshot0",
  937. "vm-state-size": 0,
  938. "date-sec": 1000012,
  939. "date-nsec": 10,
  940. "vm-clock-sec": 100,
  941. "vm-clock-nsec": 20
  942. }
  943. }
  944. EQMP
  945. {
  946. .name = "drive-mirror",
  947. .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
  948. "node-name:s?,replaces:s?,"
  949. "on-source-error:s?,on-target-error:s?,"
  950. "granularity:i?,buf-size:i?",
  951. .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
  952. },
  953. SQMP
  954. drive-mirror
  955. ------------
  956. Start mirroring a block device's writes to a new destination. target
  957. specifies the target of the new image. If the file exists, or if it is
  958. a device, it will be used as the new destination for writes. If it does not
  959. exist, a new file will be created. format specifies the format of the
  960. mirror image, default is to probe if mode='existing', else the format
  961. of the source.
  962. Arguments:
  963. - "device": device name to operate on (json-string)
  964. - "target": name of new image file (json-string)
  965. - "format": format of new image (json-string, optional)
  966. - "node-name": the name of the new block driver state in the node graph
  967. (json-string, optional)
  968. - "replaces": the block driver node name to replace when finished
  969. (json-string, optional)
  970. - "mode": how an image file should be created into the target
  971. file/device (NewImageMode, optional, default 'absolute-paths')
  972. - "speed": maximum speed of the streaming job, in bytes per second
  973. (json-int)
  974. - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
  975. - "buf_size": maximum amount of data in flight from source to target, in bytes
  976. (json-int, default 10M)
  977. - "sync": what parts of the disk image should be copied to the destination;
  978. possibilities include "full" for all the disk, "top" for only the sectors
  979. allocated in the topmost image, or "none" to only replicate new I/O
  980. (MirrorSyncMode).
  981. - "on-source-error": the action to take on an error on the source
  982. (BlockdevOnError, default 'report')
  983. - "on-target-error": the action to take on an error on the target
  984. (BlockdevOnError, default 'report')
  985. The default value of the granularity is the image cluster size clamped
  986. between 4096 and 65536, if the image format defines one. If the format
  987. does not define a cluster size, the default value of the granularity
  988. is 65536.
  989. Example:
  990. -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
  991. "target": "/some/place/my-image",
  992. "sync": "full",
  993. "format": "qcow2" } }
  994. <- { "return": {} }
  995. EQMP
  996. {
  997. .name = "change-backing-file",
  998. .args_type = "device:s,image-node-name:s,backing-file:s",
  999. .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
  1000. },
  1001. SQMP
  1002. change-backing-file
  1003. -------------------
  1004. Since: 2.1
  1005. Change the backing file in the image file metadata. This does not cause
  1006. QEMU to reopen the image file to reparse the backing filename (it may,
  1007. however, perform a reopen to change permissions from r/o -> r/w -> r/o,
  1008. if needed). The new backing file string is written into the image file
  1009. metadata, and the QEMU internal strings are updated.
  1010. Arguments:
  1011. - "image-node-name": The name of the block driver state node of the
  1012. image to modify. The "device" is argument is used to
  1013. verify "image-node-name" is in the chain described by
  1014. "device".
  1015. (json-string, optional)
  1016. - "device": The name of the device.
  1017. (json-string)
  1018. - "backing-file": The string to write as the backing file. This string is
  1019. not validated, so care should be taken when specifying
  1020. the string or the image chain may not be able to be
  1021. reopened again.
  1022. (json-string)
  1023. Returns: Nothing on success
  1024. If "device" does not exist or cannot be determined, DeviceNotFound
  1025. EQMP
  1026. {
  1027. .name = "balloon",
  1028. .args_type = "value:M",
  1029. .mhandler.cmd_new = qmp_marshal_input_balloon,
  1030. },
  1031. SQMP
  1032. balloon
  1033. -------
  1034. Request VM to change its memory allocation (in bytes).
  1035. Arguments:
  1036. - "value": New memory allocation (json-int)
  1037. Example:
  1038. -> { "execute": "balloon", "arguments": { "value": 536870912 } }
  1039. <- { "return": {} }
  1040. EQMP
  1041. {
  1042. .name = "set_link",
  1043. .args_type = "name:s,up:b",
  1044. .mhandler.cmd_new = qmp_marshal_input_set_link,
  1045. },
  1046. SQMP
  1047. set_link
  1048. --------
  1049. Change the link status of a network adapter.
  1050. Arguments:
  1051. - "name": network device name (json-string)
  1052. - "up": status is up (json-bool)
  1053. Example:
  1054. -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
  1055. <- { "return": {} }
  1056. EQMP
  1057. {
  1058. .name = "getfd",
  1059. .args_type = "fdname:s",
  1060. .params = "getfd name",
  1061. .help = "receive a file descriptor via SCM rights and assign it a name",
  1062. .mhandler.cmd_new = qmp_marshal_input_getfd,
  1063. },
  1064. SQMP
  1065. getfd
  1066. -----
  1067. Receive a file descriptor via SCM rights and assign it a name.
  1068. Arguments:
  1069. - "fdname": file descriptor name (json-string)
  1070. Example:
  1071. -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
  1072. <- { "return": {} }
  1073. Notes:
  1074. (1) If the name specified by the "fdname" argument already exists,
  1075. the file descriptor assigned to it will be closed and replaced
  1076. by the received file descriptor.
  1077. (2) The 'closefd' command can be used to explicitly close the file
  1078. descriptor when it is no longer needed.
  1079. EQMP
  1080. {
  1081. .name = "closefd",
  1082. .args_type = "fdname:s",
  1083. .params = "closefd name",
  1084. .help = "close a file descriptor previously passed via SCM rights",
  1085. .mhandler.cmd_new = qmp_marshal_input_closefd,
  1086. },
  1087. SQMP
  1088. closefd
  1089. -------
  1090. Close a file descriptor previously passed via SCM rights.
  1091. Arguments:
  1092. - "fdname": file descriptor name (json-string)
  1093. Example:
  1094. -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
  1095. <- { "return": {} }
  1096. EQMP
  1097. {
  1098. .name = "add-fd",
  1099. .args_type = "fdset-id:i?,opaque:s?",
  1100. .params = "add-fd fdset-id opaque",
  1101. .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
  1102. .mhandler.cmd_new = qmp_marshal_input_add_fd,
  1103. },
  1104. SQMP
  1105. add-fd
  1106. -------
  1107. Add a file descriptor, that was passed via SCM rights, to an fd set.
  1108. Arguments:
  1109. - "fdset-id": The ID of the fd set to add the file descriptor to.
  1110. (json-int, optional)
  1111. - "opaque": A free-form string that can be used to describe the fd.
  1112. (json-string, optional)
  1113. Return a json-object with the following information:
  1114. - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
  1115. - "fd": The file descriptor that was received via SCM rights and added to the
  1116. fd set. (json-int)
  1117. Example:
  1118. -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
  1119. <- { "return": { "fdset-id": 1, "fd": 3 } }
  1120. Notes:
  1121. (1) The list of fd sets is shared by all monitor connections.
  1122. (2) If "fdset-id" is not specified, a new fd set will be created.
  1123. EQMP
  1124. {
  1125. .name = "remove-fd",
  1126. .args_type = "fdset-id:i,fd:i?",
  1127. .params = "remove-fd fdset-id fd",
  1128. .help = "Remove a file descriptor from an fd set",
  1129. .mhandler.cmd_new = qmp_marshal_input_remove_fd,
  1130. },
  1131. SQMP
  1132. remove-fd
  1133. ---------
  1134. Remove a file descriptor from an fd set.
  1135. Arguments:
  1136. - "fdset-id": The ID of the fd set that the file descriptor belongs to.
  1137. (json-int)
  1138. - "fd": The file descriptor that is to be removed. (json-int, optional)
  1139. Example:
  1140. -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
  1141. <- { "return": {} }
  1142. Notes:
  1143. (1) The list of fd sets is shared by all monitor connections.
  1144. (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
  1145. removed.
  1146. EQMP
  1147. {
  1148. .name = "query-fdsets",
  1149. .args_type = "",
  1150. .help = "Return information describing all fd sets",
  1151. .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
  1152. },
  1153. SQMP
  1154. query-fdsets
  1155. -------------
  1156. Return information describing all fd sets.
  1157. Arguments: None
  1158. Example:
  1159. -> { "execute": "query-fdsets" }
  1160. <- { "return": [
  1161. {
  1162. "fds": [
  1163. {
  1164. "fd": 30,
  1165. "opaque": "rdonly:/path/to/file"
  1166. },
  1167. {
  1168. "fd": 24,
  1169. "opaque": "rdwr:/path/to/file"
  1170. }
  1171. ],
  1172. "fdset-id": 1
  1173. },
  1174. {
  1175. "fds": [
  1176. {
  1177. "fd": 28
  1178. },
  1179. {
  1180. "fd": 29
  1181. }
  1182. ],
  1183. "fdset-id": 0
  1184. }
  1185. ]
  1186. }
  1187. Note: The list of fd sets is shared by all monitor connections.
  1188. EQMP
  1189. {
  1190. .name = "block_passwd",
  1191. .args_type = "device:s?,node-name:s?,password:s",
  1192. .mhandler.cmd_new = qmp_marshal_input_block_passwd,
  1193. },
  1194. SQMP
  1195. block_passwd
  1196. ------------
  1197. Set the password of encrypted block devices.
  1198. Arguments:
  1199. - "device": device name (json-string)
  1200. - "node-name": name in the block driver state graph (json-string)
  1201. - "password": password (json-string)
  1202. Example:
  1203. -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
  1204. "password": "12345" } }
  1205. <- { "return": {} }
  1206. EQMP
  1207. {
  1208. .name = "block_set_io_throttle",
  1209. .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?",
  1210. .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
  1211. },
  1212. SQMP
  1213. block_set_io_throttle
  1214. ------------
  1215. Change I/O throttle limits for a block drive.
  1216. Arguments:
  1217. - "device": device name (json-string)
  1218. - "bps": total throughput limit in bytes per second (json-int)
  1219. - "bps_rd": read throughput limit in bytes per second (json-int)
  1220. - "bps_wr": write throughput limit in bytes per second (json-int)
  1221. - "iops": total I/O operations per second (json-int)
  1222. - "iops_rd": read I/O operations per second (json-int)
  1223. - "iops_wr": write I/O operations per second (json-int)
  1224. - "bps_max": total max in bytes (json-int)
  1225. - "bps_rd_max": read max in bytes (json-int)
  1226. - "bps_wr_max": write max in bytes (json-int)
  1227. - "iops_max": total I/O operations max (json-int)
  1228. - "iops_rd_max": read I/O operations max (json-int)
  1229. - "iops_wr_max": write I/O operations max (json-int)
  1230. - "iops_size": I/O size in bytes when limiting (json-int)
  1231. Example:
  1232. -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
  1233. "bps": 1000000,
  1234. "bps_rd": 0,
  1235. "bps_wr": 0,
  1236. "iops": 0,
  1237. "iops_rd": 0,
  1238. "iops_wr": 0,
  1239. "bps_max": 8000000,
  1240. "bps_rd_max": 0,
  1241. "bps_wr_max": 0,
  1242. "iops_max": 0,
  1243. "iops_rd_max": 0,
  1244. "iops_wr_max": 0,
  1245. "iops_size": 0 } }
  1246. <- { "return": {} }
  1247. EQMP
  1248. {
  1249. .name = "set_password",
  1250. .args_type = "protocol:s,password:s,connected:s?",
  1251. .mhandler.cmd_new = qmp_marshal_input_set_password,
  1252. },
  1253. SQMP
  1254. set_password
  1255. ------------
  1256. Set the password for vnc/spice protocols.
  1257. Arguments:
  1258. - "protocol": protocol name (json-string)
  1259. - "password": password (json-string)
  1260. - "connected": [ keep | disconnect | fail ] (josn-string, optional)
  1261. Example:
  1262. -> { "execute": "set_password", "arguments": { "protocol": "vnc",
  1263. "password": "secret" } }
  1264. <- { "return": {} }
  1265. EQMP
  1266. {
  1267. .name = "expire_password",
  1268. .args_type = "protocol:s,time:s",
  1269. .mhandler.cmd_new = qmp_marshal_input_expire_password,
  1270. },
  1271. SQMP
  1272. expire_password
  1273. ---------------
  1274. Set the password expire time for vnc/spice protocols.
  1275. Arguments:
  1276. - "protocol": protocol name (json-string)
  1277. - "time": [ now | never | +secs | secs ] (json-string)
  1278. Example:
  1279. -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
  1280. "time": "+60" } }
  1281. <- { "return": {} }
  1282. EQMP
  1283. {
  1284. .name = "add_client",
  1285. .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
  1286. .mhandler.cmd_new = qmp_marshal_input_add_client,
  1287. },
  1288. SQMP
  1289. add_client
  1290. ----------
  1291. Add a graphics client
  1292. Arguments:
  1293. - "protocol": protocol name (json-string)
  1294. - "fdname": file descriptor name (json-string)
  1295. - "skipauth": whether to skip authentication (json-bool, optional)
  1296. - "tls": whether to perform TLS (json-bool, optional)
  1297. Example:
  1298. -> { "execute": "add_client", "arguments": { "protocol": "vnc",
  1299. "fdname": "myclient" } }
  1300. <- { "return": {} }
  1301. EQMP
  1302. {
  1303. .name = "qmp_capabilities",
  1304. .args_type = "",
  1305. .params = "",
  1306. .help = "enable QMP capabilities",
  1307. .user_print = monitor_user_noop,
  1308. .mhandler.cmd_new = do_qmp_capabilities,
  1309. },
  1310. SQMP
  1311. qmp_capabilities
  1312. ----------------
  1313. Enable QMP capabilities.
  1314. Arguments: None.
  1315. Example:
  1316. -> { "execute": "qmp_capabilities" }
  1317. <- { "return": {} }
  1318. Note: This command must be issued before issuing any other command.
  1319. EQMP
  1320. {
  1321. .name = "human-monitor-command",
  1322. .args_type = "command-line:s,cpu-index:i?",
  1323. .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
  1324. },
  1325. SQMP
  1326. human-monitor-command
  1327. ---------------------
  1328. Execute a Human Monitor command.
  1329. Arguments:
  1330. - command-line: the command name and its arguments, just like the
  1331. Human Monitor's shell (json-string)
  1332. - cpu-index: select the CPU number to be used by commands which access CPU
  1333. data, like 'info registers'. The Monitor selects CPU 0 if this
  1334. argument is not provided (json-int, optional)
  1335. Example:
  1336. -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
  1337. <- { "return": "kvm support: enabled\r\n" }
  1338. Notes:
  1339. (1) The Human Monitor is NOT an stable interface, this means that command
  1340. names, arguments and responses can change or be removed at ANY time.
  1341. Applications that rely on long term stability guarantees should NOT
  1342. use this command
  1343. (2) Limitations:
  1344. o This command is stateless, this means that commands that depend
  1345. on state information (such as getfd) might not work
  1346. o Commands that prompt the user for data (eg. 'cont' when the block
  1347. device is encrypted) don't currently work
  1348. 3. Query Commands
  1349. =================
  1350. HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
  1351. HXCOMM this! We will possibly move query commands definitions inside those
  1352. HXCOMM sections, just like regular commands.
  1353. EQMP
  1354. SQMP
  1355. query-version
  1356. -------------
  1357. Show QEMU version.
  1358. Return a json-object with the following information:
  1359. - "qemu": A json-object containing three integer values:
  1360. - "major": QEMU's major version (json-int)
  1361. - "minor": QEMU's minor version (json-int)
  1362. - "micro": QEMU's micro version (json-int)
  1363. - "package": package's version (json-string)
  1364. Example:
  1365. -> { "execute": "query-version" }
  1366. <- {
  1367. "return":{
  1368. "qemu":{
  1369. "major":0,
  1370. "minor":11,
  1371. "micro":5
  1372. },
  1373. "package":""
  1374. }
  1375. }
  1376. EQMP
  1377. {
  1378. .name = "query-version",
  1379. .args_type = "",
  1380. .mhandler.cmd_new = qmp_marshal_input_query_version,
  1381. },
  1382. SQMP
  1383. query-commands
  1384. --------------
  1385. List QMP available commands.
  1386. Each command is represented by a json-object, the returned value is a json-array
  1387. of all commands.
  1388. Each json-object contain:
  1389. - "name": command's name (json-string)
  1390. Example:
  1391. -> { "execute": "query-commands" }
  1392. <- {
  1393. "return":[
  1394. {
  1395. "name":"query-balloon"
  1396. },
  1397. {
  1398. "name":"system_powerdown"
  1399. }
  1400. ]
  1401. }
  1402. Note: This example has been shortened as the real response is too long.
  1403. EQMP
  1404. {
  1405. .name = "query-commands",
  1406. .args_type = "",
  1407. .mhandler.cmd_new = qmp_marshal_input_query_commands,
  1408. },
  1409. SQMP
  1410. query-events
  1411. --------------
  1412. List QMP available events.
  1413. Each event is represented by a json-object, the returned value is a json-array
  1414. of all events.
  1415. Each json-object contains:
  1416. - "name": event's name (json-string)
  1417. Example:
  1418. -> { "execute": "query-events" }
  1419. <- {
  1420. "return":[
  1421. {
  1422. "name":"SHUTDOWN"
  1423. },
  1424. {
  1425. "name":"RESET"
  1426. }
  1427. ]
  1428. }
  1429. Note: This example has been shortened as the real response is too long.
  1430. EQMP
  1431. {
  1432. .name = "query-events",
  1433. .args_type = "",
  1434. .mhandler.cmd_new = qmp_marshal_input_query_events,
  1435. },
  1436. SQMP
  1437. query-chardev
  1438. -------------
  1439. Each device is represented by a json-object. The returned value is a json-array
  1440. of all devices.
  1441. Each json-object contain the following:
  1442. - "label": device's label (json-string)
  1443. - "filename": device's file (json-string)
  1444. - "frontend-open": open/closed state of the frontend device attached to this
  1445. backend (json-bool)
  1446. Example:
  1447. -> { "execute": "query-chardev" }
  1448. <- {
  1449. "return": [
  1450. {
  1451. "label": "charchannel0",
  1452. "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
  1453. "frontend-open": false
  1454. },
  1455. {
  1456. "label": "charmonitor",
  1457. "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
  1458. "frontend-open": true
  1459. },
  1460. {
  1461. "label": "charserial0",
  1462. "filename": "pty:/dev/pts/2",
  1463. "frontend-open": true
  1464. }
  1465. ]
  1466. }
  1467. EQMP
  1468. {
  1469. .name = "query-chardev",
  1470. .args_type = "",
  1471. .mhandler.cmd_new = qmp_marshal_input_query_chardev,
  1472. },
  1473. SQMP
  1474. query-chardev-backends
  1475. -------------
  1476. List available character device backends.
  1477. Each backend is represented by a json-object, the returned value is a json-array
  1478. of all backends.
  1479. Each json-object contains:
  1480. - "name": backend name (json-string)
  1481. Example:
  1482. -> { "execute": "query-chardev-backends" }
  1483. <- {
  1484. "return":[
  1485. {
  1486. "name":"udp"
  1487. },
  1488. {
  1489. "name":"tcp"
  1490. },
  1491. {
  1492. "name":"unix"
  1493. },
  1494. {
  1495. "name":"spiceport"
  1496. }
  1497. ]
  1498. }
  1499. EQMP
  1500. {
  1501. .name = "query-chardev-backends",
  1502. .args_type = "",
  1503. .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
  1504. },
  1505. SQMP
  1506. query-block
  1507. -----------
  1508. Show the block devices.
  1509. Each block device information is stored in a json-object and the returned value
  1510. is a json-array of all devices.
  1511. Each json-object contain the following:
  1512. - "device": device name (json-string)
  1513. - "type": device type (json-string)
  1514. - deprecated, retained for backward compatibility
  1515. - Possible values: "unknown"
  1516. - "removable": true if the device is removable, false otherwise (json-bool)
  1517. - "locked": true if the device is locked, false otherwise (json-bool)
  1518. - "tray_open": only present if removable, true if the device has a tray,
  1519. and it is open (json-bool)
  1520. - "inserted": only present if the device is inserted, it is a json-object
  1521. containing the following:
  1522. - "file": device file name (json-string)
  1523. - "ro": true if read-only, false otherwise (json-bool)
  1524. - "drv": driver format name (json-string)
  1525. - Possible values: "blkdebug", "bochs", "cloop", "dmg",
  1526. "file", "file", "ftp", "ftps", "host_cdrom",
  1527. "host_device", "host_floppy", "http", "https",
  1528. "nbd", "parallels", "qcow", "qcow2", "raw",
  1529. "tftp", "vdi", "vmdk", "vpc", "vvfat"
  1530. - "backing_file": backing file name (json-string, optional)
  1531. - "backing_file_depth": number of files in the backing file chain (json-int)
  1532. - "encrypted": true if encrypted, false otherwise (json-bool)
  1533. - "bps": limit total bytes per second (json-int)
  1534. - "bps_rd": limit read bytes per second (json-int)
  1535. - "bps_wr": limit write bytes per second (json-int)
  1536. - "iops": limit total I/O operations per second (json-int)
  1537. - "iops_rd": limit read operations per second (json-int)
  1538. - "iops_wr": limit write operations per second (json-int)
  1539. - "bps_max": total max in bytes (json-int)
  1540. - "bps_rd_max": read max in bytes (json-int)
  1541. - "bps_wr_max": write max in bytes (json-int)
  1542. - "iops_max": total I/O operations max (json-int)
  1543. - "iops_rd_max": read I/O operations max (json-int)
  1544. - "iops_wr_max": write I/O operations max (json-int)
  1545. - "iops_size": I/O size when limiting by iops (json-int)
  1546. - "detect_zeroes": detect and optimize zero writing (json-string)
  1547. - Possible values: "off", "on", "unmap"
  1548. - "image": the detail of the image, it is a json-object containing
  1549. the following:
  1550. - "filename": image file name (json-string)
  1551. - "format": image format (json-string)
  1552. - "virtual-size": image capacity in bytes (json-int)
  1553. - "dirty-flag": true if image is not cleanly closed, not present
  1554. means clean (json-bool, optional)
  1555. - "actual-size": actual size on disk in bytes of the image, not
  1556. present when image does not support thin
  1557. provision (json-int, optional)
  1558. - "cluster-size": size of a cluster in bytes, not present if image
  1559. format does not support it (json-int, optional)
  1560. - "encrypted": true if the image is encrypted, not present means
  1561. false or the image format does not support
  1562. encryption (json-bool, optional)
  1563. - "backing_file": backing file name, not present means no backing
  1564. file is used or the image format does not
  1565. support backing file chain
  1566. (json-string, optional)
  1567. - "full-backing-filename": full path of the backing file, not
  1568. present if it equals backing_file or no
  1569. backing file is used
  1570. (json-string, optional)
  1571. - "backing-filename-format": the format of the backing file, not
  1572. present means unknown or no backing
  1573. file (json-string, optional)
  1574. - "snapshots": the internal snapshot info, it is an optional list
  1575. of json-object containing the following:
  1576. - "id": unique snapshot id (json-string)
  1577. - "name": snapshot name (json-string)
  1578. - "vm-state-size": size of the VM state in bytes (json-int)
  1579. - "date-sec": UTC date of the snapshot in seconds (json-int)
  1580. - "date-nsec": fractional part in nanoseconds to be used with
  1581. date-sec (json-int)
  1582. - "vm-clock-sec": VM clock relative to boot in seconds
  1583. (json-int)
  1584. - "vm-clock-nsec": fractional part in nanoseconds to be used
  1585. with vm-clock-sec (json-int)
  1586. - "backing-image": the detail of the backing image, it is an
  1587. optional json-object only present when a
  1588. backing image present for this image
  1589. - "io-status": I/O operation status, only present if the device supports it
  1590. and the VM is configured to stop on errors. It's always reset
  1591. to "ok" when the "cont" command is issued (json_string, optional)
  1592. - Possible values: "ok", "failed", "nospace"
  1593. Example:
  1594. -> { "execute": "query-block" }
  1595. <- {
  1596. "return":[
  1597. {
  1598. "io-status": "ok",
  1599. "device":"ide0-hd0",
  1600. "locked":false,
  1601. "removable":false,
  1602. "inserted":{
  1603. "ro":false,
  1604. "drv":"qcow2",
  1605. "encrypted":false,
  1606. "file":"disks/test.qcow2",
  1607. "backing_file_depth":1,
  1608. "bps":1000000,
  1609. "bps_rd":0,
  1610. "bps_wr":0,
  1611. "iops":1000000,
  1612. "iops_rd":0,
  1613. "iops_wr":0,
  1614. "bps_max": 8000000,
  1615. "bps_rd_max": 0,
  1616. "bps_wr_max": 0,
  1617. "iops_max": 0,
  1618. "iops_rd_max": 0,
  1619. "iops_wr_max": 0,
  1620. "iops_size": 0,
  1621. "detect_zeroes": "on",
  1622. "image":{
  1623. "filename":"disks/test.qcow2",
  1624. "format":"qcow2",
  1625. "virtual-size":2048000,
  1626. "backing_file":"base.qcow2",
  1627. "full-backing-filename":"disks/base.qcow2",
  1628. "backing-filename-format:"qcow2",
  1629. "snapshots":[
  1630. {
  1631. "id": "1",
  1632. "name": "snapshot1",
  1633. "vm-state-size": 0,
  1634. "date-sec": 10000200,
  1635. "date-nsec": 12,
  1636. "vm-clock-sec": 206,
  1637. "vm-clock-nsec": 30
  1638. }
  1639. ],
  1640. "backing-image":{
  1641. "filename":"disks/base.qcow2",
  1642. "format":"qcow2",
  1643. "virtual-size":2048000
  1644. }
  1645. }
  1646. },
  1647. "type":"unknown"
  1648. },
  1649. {
  1650. "io-status": "ok",
  1651. "device":"ide1-cd0",
  1652. "locked":false,
  1653. "removable":true,
  1654. "type":"unknown"
  1655. },
  1656. {
  1657. "device":"floppy0",
  1658. "locked":false,
  1659. "removable":true,
  1660. "type":"unknown"
  1661. },
  1662. {
  1663. "device":"sd0",
  1664. "locked":false,
  1665. "removable":true,
  1666. "type":"unknown"
  1667. }
  1668. ]
  1669. }
  1670. EQMP
  1671. {
  1672. .name = "query-block",
  1673. .args_type = "",
  1674. .mhandler.cmd_new = qmp_marshal_input_query_block,
  1675. },
  1676. SQMP
  1677. query-blockstats
  1678. ----------------
  1679. Show block device statistics.
  1680. Each device statistic information is stored in a json-object and the returned
  1681. value is a json-array of all devices.
  1682. Each json-object contain the following:
  1683. - "device": device name (json-string)
  1684. - "stats": A json-object with the statistics information, it contains:
  1685. - "rd_bytes": bytes read (json-int)
  1686. - "wr_bytes": bytes written (json-int)
  1687. - "rd_operations": read operations (json-int)
  1688. - "wr_operations": write operations (json-int)
  1689. - "flush_operations": cache flush operations (json-int)
  1690. - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
  1691. - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
  1692. - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
  1693. - "wr_highest_offset": Highest offset of a sector written since the
  1694. BlockDriverState has been opened (json-int)
  1695. - "parent": Contains recursively the statistics of the underlying
  1696. protocol (e.g. the host file for a qcow2 image). If there is
  1697. no underlying protocol, this field is omitted
  1698. (json-object, optional)
  1699. Example:
  1700. -> { "execute": "query-blockstats" }
  1701. <- {
  1702. "return":[
  1703. {
  1704. "device":"ide0-hd0",
  1705. "parent":{
  1706. "stats":{
  1707. "wr_highest_offset":3686448128,
  1708. "wr_bytes":9786368,
  1709. "wr_operations":751,
  1710. "rd_bytes":122567168,
  1711. "rd_operations":36772
  1712. "wr_total_times_ns":313253456
  1713. "rd_total_times_ns":3465673657
  1714. "flush_total_times_ns":49653
  1715. "flush_operations":61,
  1716. }
  1717. },
  1718. "stats":{
  1719. "wr_highest_offset":2821110784,
  1720. "wr_bytes":9786368,
  1721. "wr_operations":692,
  1722. "rd_bytes":122739200,
  1723. "rd_operations":36604
  1724. "flush_operations":51,
  1725. "wr_total_times_ns":313253456
  1726. "rd_total_times_ns":3465673657
  1727. "flush_total_times_ns":49653
  1728. }
  1729. },
  1730. {
  1731. "device":"ide1-cd0",
  1732. "stats":{
  1733. "wr_highest_offset":0,
  1734. "wr_bytes":0,
  1735. "wr_operations":0,
  1736. "rd_bytes":0,
  1737. "rd_operations":0
  1738. "flush_operations":0,
  1739. "wr_total_times_ns":0
  1740. "rd_total_times_ns":0
  1741. "flush_total_times_ns":0
  1742. }
  1743. },
  1744. {
  1745. "device":"floppy0",
  1746. "stats":{
  1747. "wr_highest_offset":0,
  1748. "wr_bytes":0,
  1749. "wr_operations":0,
  1750. "rd_bytes":0,
  1751. "rd_operations":0
  1752. "flush_operations":0,
  1753. "wr_total_times_ns":0
  1754. "rd_total_times_ns":0
  1755. "flush_total_times_ns":0
  1756. }
  1757. },
  1758. {
  1759. "device":"sd0",
  1760. "stats":{
  1761. "wr_highest_offset":0,
  1762. "wr_bytes":0,
  1763. "wr_operations":0,
  1764. "rd_bytes":0,
  1765. "rd_operations":0
  1766. "flush_operations":0,
  1767. "wr_total_times_ns":0
  1768. "rd_total_times_ns":0
  1769. "flush_total_times_ns":0
  1770. }
  1771. }
  1772. ]
  1773. }
  1774. EQMP
  1775. {
  1776. .name = "query-blockstats",
  1777. .args_type = "",
  1778. .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
  1779. },
  1780. SQMP
  1781. query-cpus
  1782. ----------
  1783. Show CPU information.
  1784. Return a json-array. Each CPU is represented by a json-object, which contains:
  1785. - "CPU": CPU index (json-int)
  1786. - "current": true if this is the current CPU, false otherwise (json-bool)
  1787. - "halted": true if the cpu is halted, false otherwise (json-bool)
  1788. - Current program counter. The key's name depends on the architecture:
  1789. "pc": i386/x86_64 (json-int)
  1790. "nip": PPC (json-int)
  1791. "pc" and "npc": sparc (json-int)
  1792. "PC": mips (json-int)
  1793. - "thread_id": ID of the underlying host thread (json-int)
  1794. Example:
  1795. -> { "execute": "query-cpus" }
  1796. <- {
  1797. "return":[
  1798. {
  1799. "CPU":0,
  1800. "current":true,
  1801. "halted":false,
  1802. "pc":3227107138
  1803. "thread_id":3134
  1804. },
  1805. {
  1806. "CPU":1,
  1807. "current":false,
  1808. "halted":true,
  1809. "pc":7108165
  1810. "thread_id":3135
  1811. }
  1812. ]
  1813. }
  1814. EQMP
  1815. {
  1816. .name = "query-cpus",
  1817. .args_type = "",
  1818. .mhandler.cmd_new = qmp_marshal_input_query_cpus,
  1819. },
  1820. SQMP
  1821. query-iothreads
  1822. ---------------
  1823. Returns a list of information about each iothread.
  1824. Note this list excludes the QEMU main loop thread, which is not declared
  1825. using the -object iothread command-line option. It is always the main thread
  1826. of the process.
  1827. Return a json-array. Each iothread is represented by a json-object, which contains:
  1828. - "id": name of iothread (json-str)
  1829. - "thread-id": ID of the underlying host thread (json-int)
  1830. Example:
  1831. -> { "execute": "query-iothreads" }
  1832. <- {
  1833. "return":[
  1834. {
  1835. "id":"iothread0",
  1836. "thread-id":3134
  1837. },
  1838. {
  1839. "id":"iothread1",
  1840. "thread-id":3135
  1841. }
  1842. ]
  1843. }
  1844. EQMP
  1845. {
  1846. .name = "query-iothreads",
  1847. .args_type = "",
  1848. .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
  1849. },
  1850. SQMP
  1851. query-pci
  1852. ---------
  1853. PCI buses and devices information.
  1854. The returned value is a json-array of all buses. Each bus is represented by
  1855. a json-object, which has a key with a json-array of all PCI devices attached
  1856. to it. Each device is represented by a json-object.
  1857. The bus json-object contains the following:
  1858. - "bus": bus number (json-int)
  1859. - "devices": a json-array of json-objects, each json-object represents a
  1860. PCI device
  1861. The PCI device json-object contains the following:
  1862. - "bus": identical to the parent's bus number (json-int)
  1863. - "slot": slot number (json-int)
  1864. - "function": function number (json-int)
  1865. - "class_info": a json-object containing:
  1866. - "desc": device class description (json-string, optional)
  1867. - "class": device class number (json-int)
  1868. - "id": a json-object containing:
  1869. - "device": device ID (json-int)
  1870. - "vendor": vendor ID (json-int)
  1871. - "irq": device's IRQ if assigned (json-int, optional)
  1872. - "qdev_id": qdev id string (json-string)
  1873. - "pci_bridge": It's a json-object, only present if this device is a
  1874. PCI bridge, contains:
  1875. - "bus": bus number (json-int)
  1876. - "secondary": secondary bus number (json-int)
  1877. - "subordinate": subordinate bus number (json-int)
  1878. - "io_range": I/O memory range information, a json-object with the
  1879. following members:
  1880. - "base": base address, in bytes (json-int)
  1881. - "limit": limit address, in bytes (json-int)
  1882. - "memory_range": memory range information, a json-object with the
  1883. following members:
  1884. - "base": base address, in bytes (json-int)
  1885. - "limit": limit address, in bytes (json-int)
  1886. - "prefetchable_range": Prefetchable memory range information, a
  1887. json-object with the following members:
  1888. - "base": base address, in bytes (json-int)
  1889. - "limit": limit address, in bytes (json-int)
  1890. - "devices": a json-array of PCI devices if there's any attached, each
  1891. each element is represented by a json-object, which contains
  1892. the same members of the 'PCI device json-object' described
  1893. above (optional)
  1894. - "regions": a json-array of json-objects, each json-object represents a
  1895. memory region of this device
  1896. The memory range json-object contains the following:
  1897. - "base": base memory address (json-int)
  1898. - "limit": limit value (json-int)
  1899. The region json-object can be an I/O region or a memory region, an I/O region
  1900. json-object contains the following:
  1901. - "type": "io" (json-string, fixed)
  1902. - "bar": BAR number (json-int)
  1903. - "address": memory address (json-int)
  1904. - "size": memory size (json-int)
  1905. A memory region json-object contains the following:
  1906. - "type": "memory" (json-string, fixed)
  1907. - "bar": BAR number (json-int)
  1908. - "address": memory address (json-int)
  1909. - "size": memory size (json-int)
  1910. - "mem_type_64": true or false (json-bool)
  1911. - "prefetch": true or false (json-bool)
  1912. Example:
  1913. -> { "execute": "query-pci" }
  1914. <- {
  1915. "return":[
  1916. {
  1917. "bus":0,
  1918. "devices":[
  1919. {
  1920. "bus":0,
  1921. "qdev_id":"",
  1922. "slot":0,
  1923. "class_info":{
  1924. "class":1536,
  1925. "desc":"Host bridge"
  1926. },
  1927. "id":{
  1928. "device":32902,
  1929. "vendor":4663
  1930. },
  1931. "function":0,
  1932. "regions":[
  1933. ]
  1934. },
  1935. {
  1936. "bus":0,
  1937. "qdev_id":"",
  1938. "slot":1,
  1939. "class_info":{
  1940. "class":1537,
  1941. "desc":"ISA bridge"
  1942. },
  1943. "id":{
  1944. "device":32902,
  1945. "vendor":28672
  1946. },
  1947. "function":0,
  1948. "regions":[
  1949. ]
  1950. },
  1951. {
  1952. "bus":0,
  1953. "qdev_id":"",
  1954. "slot":1,
  1955. "class_info":{
  1956. "class":257,
  1957. "desc":"IDE controller"
  1958. },
  1959. "id":{
  1960. "device":32902,
  1961. "vendor":28688
  1962. },
  1963. "function":1,
  1964. "regions":[
  1965. {
  1966. "bar":4,
  1967. "size":16,
  1968. "address":49152,
  1969. "type":"io"
  1970. }
  1971. ]
  1972. },
  1973. {
  1974. "bus":0,
  1975. "qdev_id":"",
  1976. "slot":2,
  1977. "class_info":{
  1978. "class":768,
  1979. "desc":"VGA controller"
  1980. },
  1981. "id":{
  1982. "device":4115,
  1983. "vendor":184
  1984. },
  1985. "function":0,
  1986. "regions":[
  1987. {
  1988. "prefetch":true,
  1989. "mem_type_64":false,
  1990. "bar":0,
  1991. "size":33554432,
  1992. "address":4026531840,
  1993. "type":"memory"
  1994. },
  1995. {
  1996. "prefetch":false,
  1997. "mem_type_64":false,
  1998. "bar":1,
  1999. "size":4096,
  2000. "address":4060086272,
  2001. "type":"memory"
  2002. },
  2003. {
  2004. "prefetch":false,
  2005. "mem_type_64":false,
  2006. "bar":6,
  2007. "size":65536,
  2008. "address":-1,
  2009. "type":"memory"
  2010. }
  2011. ]
  2012. },
  2013. {
  2014. "bus":0,
  2015. "qdev_id":"",
  2016. "irq":11,
  2017. "slot":4,
  2018. "class_info":{
  2019. "class":1280,
  2020. "desc":"RAM controller"
  2021. },
  2022. "id":{
  2023. "device":6900,
  2024. "vendor":4098
  2025. },
  2026. "function":0,
  2027. "regions":[
  2028. {
  2029. "bar":0,
  2030. "size":32,
  2031. "address":49280,
  2032. "type":"io"
  2033. }
  2034. ]
  2035. }
  2036. ]
  2037. }
  2038. ]
  2039. }
  2040. Note: This example has been shortened as the real response is too long.
  2041. EQMP
  2042. {
  2043. .name = "query-pci",
  2044. .args_type = "",
  2045. .mhandler.cmd_new = qmp_marshal_input_query_pci,
  2046. },
  2047. SQMP
  2048. query-kvm
  2049. ---------
  2050. Show KVM information.
  2051. Return a json-object with the following information:
  2052. - "enabled": true if KVM support is enabled, false otherwise (json-bool)
  2053. - "present": true if QEMU has KVM support, false otherwise (json-bool)
  2054. Example:
  2055. -> { "execute": "query-kvm" }
  2056. <- { "return": { "enabled": true, "present": true } }
  2057. EQMP
  2058. {
  2059. .name = "query-kvm",
  2060. .args_type = "",
  2061. .mhandler.cmd_new = qmp_marshal_input_query_kvm,
  2062. },
  2063. SQMP
  2064. query-status
  2065. ------------
  2066. Return a json-object with the following information:
  2067. - "running": true if the VM is running, or false if it is paused (json-bool)
  2068. - "singlestep": true if the VM is in single step mode,
  2069. false otherwise (json-bool)
  2070. - "status": one of the following values (json-string)
  2071. "debug" - QEMU is running on a debugger
  2072. "inmigrate" - guest is paused waiting for an incoming migration
  2073. "internal-error" - An internal error that prevents further guest
  2074. execution has occurred
  2075. "io-error" - the last IOP has failed and the device is configured
  2076. to pause on I/O errors
  2077. "paused" - guest has been paused via the 'stop' command
  2078. "postmigrate" - guest is paused following a successful 'migrate'
  2079. "prelaunch" - QEMU was started with -S and guest has not started
  2080. "finish-migrate" - guest is paused to finish the migration process
  2081. "restore-vm" - guest is paused to restore VM state
  2082. "running" - guest is actively running
  2083. "save-vm" - guest is paused to save the VM state
  2084. "shutdown" - guest is shut down (and -no-shutdown is in use)
  2085. "watchdog" - the watchdog action is configured to pause and
  2086. has been triggered
  2087. Example:
  2088. -> { "execute": "query-status" }
  2089. <- { "return": { "running": true, "singlestep": false, "status": "running" } }
  2090. EQMP
  2091. {
  2092. .name = "query-status",
  2093. .args_type = "",
  2094. .mhandler.cmd_new = qmp_marshal_input_query_status,
  2095. },
  2096. SQMP
  2097. query-mice
  2098. ----------
  2099. Show VM mice information.
  2100. Each mouse is represented by a json-object, the returned value is a json-array
  2101. of all mice.
  2102. The mouse json-object contains the following:
  2103. - "name": mouse's name (json-string)
  2104. - "index": mouse's index (json-int)
  2105. - "current": true if this mouse is receiving events, false otherwise (json-bool)
  2106. - "absolute": true if the mouse generates absolute input events (json-bool)
  2107. Example:
  2108. -> { "execute": "query-mice" }
  2109. <- {
  2110. "return":[
  2111. {
  2112. "name":"QEMU Microsoft Mouse",
  2113. "index":0,
  2114. "current":false,
  2115. "absolute":false
  2116. },
  2117. {
  2118. "name":"QEMU PS/2 Mouse",
  2119. "index":1,
  2120. "current":true,
  2121. "absolute":true
  2122. }
  2123. ]
  2124. }
  2125. EQMP
  2126. {
  2127. .name = "query-mice",
  2128. .args_type = "",
  2129. .mhandler.cmd_new = qmp_marshal_input_query_mice,
  2130. },
  2131. SQMP
  2132. query-vnc
  2133. ---------
  2134. Show VNC server information.
  2135. Return a json-object with server information. Connected clients are returned
  2136. as a json-array of json-objects.
  2137. The main json-object contains the following:
  2138. - "enabled": true or false (json-bool)
  2139. - "host": server's IP address (json-string)
  2140. - "family": address family (json-string)
  2141. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  2142. - "service": server's port number (json-string)
  2143. - "auth": authentication method (json-string)
  2144. - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
  2145. "tls", "ultra", "unknown", "vencrypt", "vencrypt",
  2146. "vencrypt+plain", "vencrypt+tls+none",
  2147. "vencrypt+tls+plain", "vencrypt+tls+sasl",
  2148. "vencrypt+tls+vnc", "vencrypt+x509+none",
  2149. "vencrypt+x509+plain", "vencrypt+x509+sasl",
  2150. "vencrypt+x509+vnc", "vnc"
  2151. - "clients": a json-array of all connected clients
  2152. Clients are described by a json-object, each one contain the following:
  2153. - "host": client's IP address (json-string)
  2154. - "family": address family (json-string)
  2155. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  2156. - "service": client's port number (json-string)
  2157. - "x509_dname": TLS dname (json-string, optional)
  2158. - "sasl_username": SASL username (json-string, optional)
  2159. Example:
  2160. -> { "execute": "query-vnc" }
  2161. <- {
  2162. "return":{
  2163. "enabled":true,
  2164. "host":"0.0.0.0",
  2165. "service":"50402",
  2166. "auth":"vnc",
  2167. "family":"ipv4",
  2168. "clients":[
  2169. {
  2170. "host":"127.0.0.1",
  2171. "service":"50401",
  2172. "family":"ipv4"
  2173. }
  2174. ]
  2175. }
  2176. }
  2177. EQMP
  2178. {
  2179. .name = "query-vnc",
  2180. .args_type = "",
  2181. .mhandler.cmd_new = qmp_marshal_input_query_vnc,
  2182. },
  2183. SQMP
  2184. query-spice
  2185. -----------
  2186. Show SPICE server information.
  2187. Return a json-object with server information. Connected clients are returned
  2188. as a json-array of json-objects.
  2189. The main json-object contains the following:
  2190. - "enabled": true or false (json-bool)
  2191. - "host": server's IP address (json-string)
  2192. - "port": server's port number (json-int, optional)
  2193. - "tls-port": server's port number (json-int, optional)
  2194. - "auth": authentication method (json-string)
  2195. - Possible values: "none", "spice"
  2196. - "channels": a json-array of all active channels clients
  2197. Channels are described by a json-object, each one contain the following:
  2198. - "host": client's IP address (json-string)
  2199. - "family": address family (json-string)
  2200. - Possible values: "ipv4", "ipv6", "unix", "unknown"
  2201. - "port": client's port number (json-string)
  2202. - "connection-id": spice connection id. All channels with the same id
  2203. belong to the same spice session (json-int)
  2204. - "channel-type": channel type. "1" is the main control channel, filter for
  2205. this one if you want track spice sessions only (json-int)
  2206. - "channel-id": channel id. Usually "0", might be different needed when
  2207. multiple channels of the same type exist, such as multiple
  2208. display channels in a multihead setup (json-int)
  2209. - "tls": whevener the channel is encrypted (json-bool)
  2210. Example:
  2211. -> { "execute": "query-spice" }
  2212. <- {
  2213. "return": {
  2214. "enabled": true,
  2215. "auth": "spice",
  2216. "port": 5920,
  2217. "tls-port": 5921,
  2218. "host": "0.0.0.0",
  2219. "channels": [
  2220. {
  2221. "port": "54924",
  2222. "family": "ipv4",
  2223. "channel-type": 1,
  2224. "connection-id": 1804289383,
  2225. "host": "127.0.0.1",
  2226. "channel-id": 0,
  2227. "tls": true
  2228. },
  2229. {
  2230. "port": "36710",
  2231. "family": "ipv4",
  2232. "channel-type": 4,
  2233. "connection-id": 1804289383,
  2234. "host": "127.0.0.1",
  2235. "channel-id": 0,
  2236. "tls": false
  2237. },
  2238. [ ... more channels follow ... ]
  2239. ]
  2240. }
  2241. }
  2242. EQMP
  2243. #if defined(CONFIG_SPICE)
  2244. {
  2245. .name = "query-spice",
  2246. .args_type = "",
  2247. .mhandler.cmd_new = qmp_marshal_input_query_spice,
  2248. },
  2249. #endif
  2250. SQMP
  2251. query-name
  2252. ----------
  2253. Show VM name.
  2254. Return a json-object with the following information:
  2255. - "name": VM's name (json-string, optional)
  2256. Example:
  2257. -> { "execute": "query-name" }
  2258. <- { "return": { "name": "qemu-name" } }
  2259. EQMP
  2260. {
  2261. .name = "query-name",
  2262. .args_type = "",
  2263. .mhandler.cmd_new = qmp_marshal_input_query_name,
  2264. },
  2265. SQMP
  2266. query-uuid
  2267. ----------
  2268. Show VM UUID.
  2269. Return a json-object with the following information:
  2270. - "UUID": Universally Unique Identifier (json-string)
  2271. Example:
  2272. -> { "execute": "query-uuid" }
  2273. <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
  2274. EQMP
  2275. {
  2276. .name = "query-uuid",
  2277. .args_type = "",
  2278. .mhandler.cmd_new = qmp_marshal_input_query_uuid,
  2279. },
  2280. SQMP
  2281. query-command-line-options
  2282. --------------------------
  2283. Show command line option schema.
  2284. Return a json-array of command line option schema for all options (or for
  2285. the given option), returning an error if the given option doesn't exist.
  2286. Each array entry contains the following:
  2287. - "option": option name (json-string)
  2288. - "parameters": a json-array describes all parameters of the option:
  2289. - "name": parameter name (json-string)
  2290. - "type": parameter type (one of 'string', 'boolean', 'number',
  2291. or 'size')
  2292. - "help": human readable description of the parameter
  2293. (json-string, optional)
  2294. - "default": default value string for the parameter
  2295. (json-string, optional)
  2296. Example:
  2297. -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
  2298. <- { "return": [
  2299. {
  2300. "parameters": [
  2301. {
  2302. "name": "romfile",
  2303. "type": "string"
  2304. },
  2305. {
  2306. "name": "bootindex",
  2307. "type": "number"
  2308. }
  2309. ],
  2310. "option": "option-rom"
  2311. }
  2312. ]
  2313. }
  2314. EQMP
  2315. {
  2316. .name = "query-command-line-options",
  2317. .args_type = "option:s?",
  2318. .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
  2319. },
  2320. SQMP
  2321. query-migrate
  2322. -------------
  2323. Migration status.
  2324. Return a json-object. If migration is active there will be another json-object
  2325. with RAM migration status and if block migration is active another one with
  2326. block migration status.
  2327. The main json-object contains the following:
  2328. - "status": migration status (json-string)
  2329. - Possible values: "setup", "active", "completed", "failed", "cancelled"
  2330. - "total-time": total amount of ms since migration started. If
  2331. migration has ended, it returns the total migration
  2332. time (json-int)
  2333. - "setup-time" amount of setup time in milliseconds _before_ the
  2334. iterations begin but _after_ the QMP command is issued.
  2335. This is designed to provide an accounting of any activities
  2336. (such as RDMA pinning) which may be expensive, but do not
  2337. actually occur during the iterative migration rounds
  2338. themselves. (json-int)
  2339. - "downtime": only present when migration has finished correctly
  2340. total amount in ms for downtime that happened (json-int)
  2341. - "expected-downtime": only present while migration is active
  2342. total amount in ms for downtime that was calculated on
  2343. the last bitmap round (json-int)
  2344. - "ram": only present if "status" is "active", it is a json-object with the
  2345. following RAM information:
  2346. - "transferred": amount transferred in bytes (json-int)
  2347. - "remaining": amount remaining to transfer in bytes (json-int)
  2348. - "total": total amount of memory in bytes (json-int)
  2349. - "duplicate": number of pages filled entirely with the same
  2350. byte (json-int)
  2351. These are sent over the wire much more efficiently.
  2352. - "skipped": number of skipped zero pages (json-int)
  2353. - "normal" : number of whole pages transferred. I.e. they
  2354. were not sent as duplicate or xbzrle pages (json-int)
  2355. - "normal-bytes" : number of bytes transferred in whole
  2356. pages. This is just normal pages times size of one page,
  2357. but this way upper levels don't need to care about page
  2358. size (json-int)
  2359. - "dirty-sync-count": times that dirty ram was synchronized (json-int)
  2360. - "disk": only present if "status" is "active" and it is a block migration,
  2361. it is a json-object with the following disk information:
  2362. - "transferred": amount transferred in bytes (json-int)
  2363. - "remaining": amount remaining to transfer in bytes json-int)
  2364. - "total": total disk size in bytes (json-int)
  2365. - "xbzrle-cache": only present if XBZRLE is active.
  2366. It is a json-object with the following XBZRLE information:
  2367. - "cache-size": XBZRLE cache size in bytes
  2368. - "bytes": number of bytes transferred for XBZRLE compressed pages
  2369. - "pages": number of XBZRLE compressed pages
  2370. - "cache-miss": number of XBRZRLE page cache misses
  2371. - "cache-miss-rate": rate of XBRZRLE page cache misses
  2372. - "overflow": number of times XBZRLE overflows. This means
  2373. that the XBZRLE encoding was bigger than just sent the
  2374. whole page, and then we sent the whole page instead (as as
  2375. normal page).
  2376. Examples:
  2377. 1. Before the first migration
  2378. -> { "execute": "query-migrate" }
  2379. <- { "return": {} }
  2380. 2. Migration is done and has succeeded
  2381. -> { "execute": "query-migrate" }
  2382. <- { "return": {
  2383. "status": "completed",
  2384. "ram":{
  2385. "transferred":123,
  2386. "remaining":123,
  2387. "total":246,
  2388. "total-time":12345,
  2389. "setup-time":12345,
  2390. "downtime":12345,
  2391. "duplicate":123,
  2392. "normal":123,
  2393. "normal-bytes":123456,
  2394. "dirty-sync-count":15
  2395. }
  2396. }
  2397. }
  2398. 3. Migration is done and has failed
  2399. -> { "execute": "query-migrate" }
  2400. <- { "return": { "status": "failed" } }
  2401. 4. Migration is being performed and is not a block migration:
  2402. -> { "execute": "query-migrate" }
  2403. <- {
  2404. "return":{
  2405. "status":"active",
  2406. "ram":{
  2407. "transferred":123,
  2408. "remaining":123,
  2409. "total":246,
  2410. "total-time":12345,
  2411. "setup-time":12345,
  2412. "expected-downtime":12345,
  2413. "duplicate":123,
  2414. "normal":123,
  2415. "normal-bytes":123456,
  2416. "dirty-sync-count":15
  2417. }
  2418. }
  2419. }
  2420. 5. Migration is being performed and is a block migration:
  2421. -> { "execute": "query-migrate" }
  2422. <- {
  2423. "return":{
  2424. "status":"active",
  2425. "ram":{
  2426. "total":1057024,
  2427. "remaining":1053304,
  2428. "transferred":3720,
  2429. "total-time":12345,
  2430. "setup-time":12345,
  2431. "expected-downtime":12345,
  2432. "duplicate":123,
  2433. "normal":123,
  2434. "normal-bytes":123456,
  2435. "dirty-sync-count":15
  2436. },
  2437. "disk":{
  2438. "total":20971520,
  2439. "remaining":20880384,
  2440. "transferred":91136
  2441. }
  2442. }
  2443. }
  2444. 6. Migration is being performed and XBZRLE is active:
  2445. -> { "execute": "query-migrate" }
  2446. <- {
  2447. "return":{
  2448. "status":"active",
  2449. "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
  2450. "ram":{
  2451. "total":1057024,
  2452. "remaining":1053304,
  2453. "transferred":3720,
  2454. "total-time":12345,
  2455. "setup-time":12345,
  2456. "expected-downtime":12345,
  2457. "duplicate":10,
  2458. "normal":3333,
  2459. "normal-bytes":3412992,
  2460. "dirty-sync-count":15
  2461. },
  2462. "xbzrle-cache":{
  2463. "cache-size":67108864,
  2464. "bytes":20971520,
  2465. "pages":2444343,
  2466. "cache-miss":2244,
  2467. "cache-miss-rate":0.123,
  2468. "overflow":34434
  2469. }
  2470. }
  2471. }
  2472. EQMP
  2473. {
  2474. .name = "query-migrate",
  2475. .args_type = "",
  2476. .mhandler.cmd_new = qmp_marshal_input_query_migrate,
  2477. },
  2478. SQMP
  2479. migrate-set-capabilities
  2480. ------------------------
  2481. Enable/Disable migration capabilities
  2482. - "xbzrle": XBZRLE support
  2483. Arguments:
  2484. Example:
  2485. -> { "execute": "migrate-set-capabilities" , "arguments":
  2486. { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
  2487. EQMP
  2488. {
  2489. .name = "migrate-set-capabilities",
  2490. .args_type = "capabilities:O",
  2491. .params = "capability:s,state:b",
  2492. .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
  2493. },
  2494. SQMP
  2495. query-migrate-capabilities
  2496. --------------------------
  2497. Query current migration capabilities
  2498. - "capabilities": migration capabilities state
  2499. - "xbzrle" : XBZRLE state (json-bool)
  2500. Arguments:
  2501. Example:
  2502. -> { "execute": "query-migrate-capabilities" }
  2503. <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
  2504. EQMP
  2505. {
  2506. .name = "query-migrate-capabilities",
  2507. .args_type = "",
  2508. .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
  2509. },
  2510. SQMP
  2511. query-balloon
  2512. -------------
  2513. Show balloon information.
  2514. Make an asynchronous request for balloon info. When the request completes a
  2515. json-object will be returned containing the following data:
  2516. - "actual": current balloon value in bytes (json-int)
  2517. Example:
  2518. -> { "execute": "query-balloon" }
  2519. <- {
  2520. "return":{
  2521. "actual":1073741824,
  2522. }
  2523. }
  2524. EQMP
  2525. {
  2526. .name = "query-balloon",
  2527. .args_type = "",
  2528. .mhandler.cmd_new = qmp_marshal_input_query_balloon,
  2529. },
  2530. {
  2531. .name = "query-block-jobs",
  2532. .args_type = "",
  2533. .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
  2534. },
  2535. {
  2536. .name = "qom-list",
  2537. .args_type = "path:s",
  2538. .mhandler.cmd_new = qmp_marshal_input_qom_list,
  2539. },
  2540. {
  2541. .name = "qom-set",
  2542. .args_type = "path:s,property:s,value:q",
  2543. .mhandler.cmd_new = qmp_qom_set,
  2544. },
  2545. {
  2546. .name = "qom-get",
  2547. .args_type = "path:s,property:s",
  2548. .mhandler.cmd_new = qmp_qom_get,
  2549. },
  2550. {
  2551. .name = "nbd-server-start",
  2552. .args_type = "addr:q",
  2553. .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
  2554. },
  2555. {
  2556. .name = "nbd-server-add",
  2557. .args_type = "device:B,writable:b?",
  2558. .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
  2559. },
  2560. {
  2561. .name = "nbd-server-stop",
  2562. .args_type = "",
  2563. .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
  2564. },
  2565. {
  2566. .name = "change-vnc-password",
  2567. .args_type = "password:s",
  2568. .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
  2569. },
  2570. {
  2571. .name = "qom-list-types",
  2572. .args_type = "implements:s?,abstract:b?",
  2573. .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
  2574. },
  2575. {
  2576. .name = "device-list-properties",
  2577. .args_type = "typename:s",
  2578. .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
  2579. },
  2580. {
  2581. .name = "query-machines",
  2582. .args_type = "",
  2583. .mhandler.cmd_new = qmp_marshal_input_query_machines,
  2584. },
  2585. {
  2586. .name = "query-cpu-definitions",
  2587. .args_type = "",
  2588. .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
  2589. },
  2590. {
  2591. .name = "query-target",
  2592. .args_type = "",
  2593. .mhandler.cmd_new = qmp_marshal_input_query_target,
  2594. },
  2595. {
  2596. .name = "query-tpm",
  2597. .args_type = "",
  2598. .mhandler.cmd_new = qmp_marshal_input_query_tpm,
  2599. },
  2600. SQMP
  2601. query-tpm
  2602. ---------
  2603. Return information about the TPM device.
  2604. Arguments: None
  2605. Example:
  2606. -> { "execute": "query-tpm" }
  2607. <- { "return":
  2608. [
  2609. { "model": "tpm-tis",
  2610. "options":
  2611. { "type": "passthrough",
  2612. "data":
  2613. { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
  2614. "path": "/dev/tpm0"
  2615. }
  2616. },
  2617. "id": "tpm0"
  2618. }
  2619. ]
  2620. }
  2621. EQMP
  2622. {
  2623. .name = "query-tpm-models",
  2624. .args_type = "",
  2625. .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
  2626. },
  2627. SQMP
  2628. query-tpm-models
  2629. ----------------
  2630. Return a list of supported TPM models.
  2631. Arguments: None
  2632. Example:
  2633. -> { "execute": "query-tpm-models" }
  2634. <- { "return": [ "tpm-tis" ] }
  2635. EQMP
  2636. {
  2637. .name = "query-tpm-types",
  2638. .args_type = "",
  2639. .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
  2640. },
  2641. SQMP
  2642. query-tpm-types
  2643. ---------------
  2644. Return a list of supported TPM types.
  2645. Arguments: None
  2646. Example:
  2647. -> { "execute": "query-tpm-types" }
  2648. <- { "return": [ "passthrough" ] }
  2649. EQMP
  2650. {
  2651. .name = "chardev-add",
  2652. .args_type = "id:s,backend:q",
  2653. .mhandler.cmd_new = qmp_marshal_input_chardev_add,
  2654. },
  2655. SQMP
  2656. chardev-add
  2657. ----------------
  2658. Add a chardev.
  2659. Arguments:
  2660. - "id": the chardev's ID, must be unique (json-string)
  2661. - "backend": chardev backend type + parameters
  2662. Examples:
  2663. -> { "execute" : "chardev-add",
  2664. "arguments" : { "id" : "foo",
  2665. "backend" : { "type" : "null", "data" : {} } } }
  2666. <- { "return": {} }
  2667. -> { "execute" : "chardev-add",
  2668. "arguments" : { "id" : "bar",
  2669. "backend" : { "type" : "file",
  2670. "data" : { "out" : "/tmp/bar.log" } } } }
  2671. <- { "return": {} }
  2672. -> { "execute" : "chardev-add",
  2673. "arguments" : { "id" : "baz",
  2674. "backend" : { "type" : "pty", "data" : {} } } }
  2675. <- { "return": { "pty" : "/dev/pty/42" } }
  2676. EQMP
  2677. {
  2678. .name = "chardev-remove",
  2679. .args_type = "id:s",
  2680. .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
  2681. },
  2682. SQMP
  2683. chardev-remove
  2684. --------------
  2685. Remove a chardev.
  2686. Arguments:
  2687. - "id": the chardev's ID, must exist and not be in use (json-string)
  2688. Example:
  2689. -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
  2690. <- { "return": {} }
  2691. EQMP
  2692. {
  2693. .name = "query-rx-filter",
  2694. .args_type = "name:s?",
  2695. .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
  2696. },
  2697. SQMP
  2698. query-rx-filter
  2699. ---------------
  2700. Show rx-filter information.
  2701. Returns a json-array of rx-filter information for all NICs (or for the
  2702. given NIC), returning an error if the given NIC doesn't exist, or
  2703. given NIC doesn't support rx-filter querying, or given net client
  2704. isn't a NIC.
  2705. The query will clear the event notification flag of each NIC, then qemu
  2706. will start to emit event to QMP monitor.
  2707. Each array entry contains the following:
  2708. - "name": net client name (json-string)
  2709. - "promiscuous": promiscuous mode is enabled (json-bool)
  2710. - "multicast": multicast receive state (one of 'normal', 'none', 'all')
  2711. - "unicast": unicast receive state (one of 'normal', 'none', 'all')
  2712. - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
  2713. - "broadcast-allowed": allow to receive broadcast (json-bool)
  2714. - "multicast-overflow": multicast table is overflowed (json-bool)
  2715. - "unicast-overflow": unicast table is overflowed (json-bool)
  2716. - "main-mac": main macaddr string (json-string)
  2717. - "vlan-table": a json-array of active vlan id
  2718. - "unicast-table": a json-array of unicast macaddr string
  2719. - "multicast-table": a json-array of multicast macaddr string
  2720. Example:
  2721. -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
  2722. <- { "return": [
  2723. {
  2724. "promiscuous": true,
  2725. "name": "vnet0",
  2726. "main-mac": "52:54:00:12:34:56",
  2727. "unicast": "normal",
  2728. "vlan": "normal",
  2729. "vlan-table": [
  2730. 4,
  2731. 0
  2732. ],
  2733. "unicast-table": [
  2734. ],
  2735. "multicast": "normal",
  2736. "multicast-overflow": false,
  2737. "unicast-overflow": false,
  2738. "multicast-table": [
  2739. "01:00:5e:00:00:01",
  2740. "33:33:00:00:00:01",
  2741. "33:33:ff:12:34:56"
  2742. ],
  2743. "broadcast-allowed": false
  2744. }
  2745. ]
  2746. }
  2747. EQMP
  2748. {
  2749. .name = "blockdev-add",
  2750. .args_type = "options:q",
  2751. .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
  2752. },
  2753. SQMP
  2754. blockdev-add
  2755. ------------
  2756. Add a block device.
  2757. Arguments:
  2758. - "options": block driver options
  2759. Example (1):
  2760. -> { "execute": "blockdev-add",
  2761. "arguments": { "options" : { "driver": "qcow2",
  2762. "file": { "driver": "file",
  2763. "filename": "test.qcow2" } } } }
  2764. <- { "return": {} }
  2765. Example (2):
  2766. -> { "execute": "blockdev-add",
  2767. "arguments": {
  2768. "options": {
  2769. "driver": "qcow2",
  2770. "id": "my_disk",
  2771. "discard": "unmap",
  2772. "cache": {
  2773. "direct": true,
  2774. "writeback": true
  2775. },
  2776. "file": {
  2777. "driver": "file",
  2778. "filename": "/tmp/test.qcow2"
  2779. },
  2780. "backing": {
  2781. "driver": "raw",
  2782. "file": {
  2783. "driver": "file",
  2784. "filename": "/dev/fdset/4"
  2785. }
  2786. }
  2787. }
  2788. }
  2789. }
  2790. <- { "return": {} }
  2791. EQMP
  2792. {
  2793. .name = "query-named-block-nodes",
  2794. .args_type = "",
  2795. .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
  2796. },
  2797. SQMP
  2798. @query-named-block-nodes
  2799. ------------------------
  2800. Return a list of BlockDeviceInfo for all the named block driver nodes
  2801. Example:
  2802. -> { "execute": "query-named-block-nodes" }
  2803. <- { "return": [ { "ro":false,
  2804. "drv":"qcow2",
  2805. "encrypted":false,
  2806. "file":"disks/test.qcow2",
  2807. "node-name": "my-node",
  2808. "backing_file_depth":1,
  2809. "bps":1000000,
  2810. "bps_rd":0,
  2811. "bps_wr":0,
  2812. "iops":1000000,
  2813. "iops_rd":0,
  2814. "iops_wr":0,
  2815. "bps_max": 8000000,
  2816. "bps_rd_max": 0,
  2817. "bps_wr_max": 0,
  2818. "iops_max": 0,
  2819. "iops_rd_max": 0,
  2820. "iops_wr_max": 0,
  2821. "iops_size": 0,
  2822. "image":{
  2823. "filename":"disks/test.qcow2",
  2824. "format":"qcow2",
  2825. "virtual-size":2048000,
  2826. "backing_file":"base.qcow2",
  2827. "full-backing-filename":"disks/base.qcow2",
  2828. "backing-filename-format:"qcow2",
  2829. "snapshots":[
  2830. {
  2831. "id": "1",
  2832. "name": "snapshot1",
  2833. "vm-state-size": 0,
  2834. "date-sec": 10000200,
  2835. "date-nsec": 12,
  2836. "vm-clock-sec": 206,
  2837. "vm-clock-nsec": 30
  2838. }
  2839. ],
  2840. "backing-image":{
  2841. "filename":"disks/base.qcow2",
  2842. "format":"qcow2",
  2843. "virtual-size":2048000
  2844. }
  2845. } } ] }
  2846. EQMP
  2847. {
  2848. .name = "query-memdev",
  2849. .args_type = "",
  2850. .mhandler.cmd_new = qmp_marshal_input_query_memdev,
  2851. },
  2852. SQMP
  2853. query-memdev
  2854. ------------
  2855. Show memory devices information.
  2856. Example (1):
  2857. -> { "execute": "query-memdev" }
  2858. <- { "return": [
  2859. {
  2860. "size": 536870912,
  2861. "merge": false,
  2862. "dump": true,
  2863. "prealloc": false,
  2864. "host-nodes": [0, 1],
  2865. "policy": "bind"
  2866. },
  2867. {
  2868. "size": 536870912,
  2869. "merge": false,
  2870. "dump": true,
  2871. "prealloc": true,
  2872. "host-nodes": [2, 3],
  2873. "policy": "preferred"
  2874. }
  2875. ]
  2876. }
  2877. EQMP
  2878. {
  2879. .name = "query-memory-devices",
  2880. .args_type = "",
  2881. .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
  2882. },
  2883. SQMP
  2884. @query-memory-devices
  2885. --------------------
  2886. Return a list of memory devices.
  2887. Example:
  2888. -> { "execute": "query-memory-devices" }
  2889. <- { "return": [ { "data":
  2890. { "addr": 5368709120,
  2891. "hotpluggable": true,
  2892. "hotplugged": true,
  2893. "id": "d1",
  2894. "memdev": "/objects/memX",
  2895. "node": 0,
  2896. "size": 1073741824,
  2897. "slot": 0},
  2898. "type": "dimm"
  2899. } ] }
  2900. EQMP
  2901. {
  2902. .name = "query-acpi-ospm-status",
  2903. .args_type = "",
  2904. .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
  2905. },
  2906. SQMP
  2907. @query-acpi-ospm-status
  2908. --------------------
  2909. Return list of ACPIOSTInfo for devices that support status reporting
  2910. via ACPI _OST method.
  2911. Example:
  2912. -> { "execute": "query-acpi-ospm-status" }
  2913. <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
  2914. { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
  2915. { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
  2916. { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
  2917. ]}
  2918. EQMP
  2919. #if defined TARGET_I386
  2920. {
  2921. .name = "rtc-reset-reinjection",
  2922. .args_type = "",
  2923. .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
  2924. },
  2925. #endif
  2926. SQMP
  2927. rtc-reset-reinjection
  2928. ---------------------
  2929. Reset the RTC interrupt reinjection backlog.
  2930. Arguments: None.
  2931. Example:
  2932. -> { "execute": "rtc-reset-reinjection" }
  2933. <- { "return": {} }
  2934. EQMP
  2935. {
  2936. .name = "trace-event-get-state",
  2937. .args_type = "name:s",
  2938. .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
  2939. },
  2940. SQMP
  2941. trace-event-get-state
  2942. ---------------------
  2943. Query the state of events.
  2944. Example:
  2945. -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
  2946. <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
  2947. EQMP
  2948. {
  2949. .name = "trace-event-set-state",
  2950. .args_type = "name:s,enable:b,ignore-unavailable:b?",
  2951. .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
  2952. },
  2953. SQMP
  2954. trace-event-set-state
  2955. ---------------------
  2956. Set the state of events.
  2957. Example:
  2958. -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
  2959. <- { "return": {} }
  2960. EQMP
  2961. {
  2962. .name = "x-input-send-event",
  2963. .args_type = "console:i?,events:q",
  2964. .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
  2965. },
  2966. SQMP
  2967. @x-input-send-event
  2968. -----------------
  2969. Send input event to guest.
  2970. Arguments:
  2971. - "console": console index. (json-int, optional)
  2972. - "events": list of input events.
  2973. The consoles are visible in the qom tree, under
  2974. /backend/console[$index]. They have a device link and head property, so
  2975. it is possible to map which console belongs to which device and display.
  2976. Note: this command is experimental, and not a stable API.
  2977. Example (1):
  2978. Press left mouse button.
  2979. -> { "execute": "x-input-send-event",
  2980. "arguments": { "console": 0,
  2981. "events": [ { "type": "btn",
  2982. "data" : { "down": true, "button": "Left" } } } }
  2983. <- { "return": {} }
  2984. -> { "execute": "x-input-send-event",
  2985. "arguments": { "console": 0,
  2986. "events": [ { "type": "btn",
  2987. "data" : { "down": false, "button": "Left" } } } }
  2988. <- { "return": {} }
  2989. Example (2):
  2990. Press ctrl-alt-del.
  2991. -> { "execute": "x-input-send-event",
  2992. "arguments": { "console": 0, "events": [
  2993. { "type": "key", "data" : { "down": true,
  2994. "key": {"type": "qcode", "data": "ctrl" } } },
  2995. { "type": "key", "data" : { "down": true,
  2996. "key": {"type": "qcode", "data": "alt" } } },
  2997. { "type": "key", "data" : { "down": true,
  2998. "key": {"type": "qcode", "data": "delete" } } } ] } }
  2999. <- { "return": {} }
  3000. Example (3):
  3001. Move mouse pointer to absolute coordinates (20000, 400).
  3002. -> { "execute": "x-input-send-event" ,
  3003. "arguments": { "console": 0, "events": [
  3004. { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
  3005. { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
  3006. <- { "return": {} }
  3007. EQMP