qapi-schema.json 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971
  1. # *-*- Mode: Python -*-*
  2. # vim: filetype=python
  3. ##
  4. # This manual describes the commands supported by the QEMU Guest
  5. # Agent Protocol.
  6. #
  7. # For locating a particular item, please see the `qapi-qga-index`.
  8. #
  9. # The following notation is used in examples:
  10. #
  11. # .. qmp-example::
  12. #
  13. # -> ... text sent by client (commands) ...
  14. # <- ... text sent by server (command responses and events) ...
  15. #
  16. # Example text is formatted for readability. However, in real
  17. # protocol usage, its commonly emitted as a single line.
  18. #
  19. # Please refer to the
  20. # :doc:`QEMU Machine Protocol Specification </interop/qmp-spec>`
  21. # for the general format of commands, responses, and events.
  22. ##
  23. { 'pragma': { 'doc-required': true } }
  24. # Lists with items allowed to permit QAPI rule violations; think twice
  25. # before you add to them!
  26. { 'pragma': {
  27. # Types whose member names may use '_'
  28. 'member-name-exceptions': [
  29. 'GuestAgentInfo'
  30. ],
  31. # Commands allowed to return a non-dictionary:
  32. 'command-returns-exceptions': [
  33. 'guest-file-open',
  34. 'guest-fsfreeze-freeze',
  35. 'guest-fsfreeze-freeze-list',
  36. 'guest-fsfreeze-status',
  37. 'guest-fsfreeze-thaw',
  38. 'guest-get-time',
  39. 'guest-set-vcpus',
  40. 'guest-sync',
  41. 'guest-sync-delimited' ],
  42. # Types and commands with undocumented members:
  43. 'documentation-exceptions': [
  44. 'GuestNVMeSmart' ] } }
  45. ##
  46. # @guest-sync-delimited:
  47. #
  48. # Echo back a unique integer value, and prepend to response a leading
  49. # sentinel byte (0xFF) the client can check scan for.
  50. #
  51. # This is used by clients talking to the guest agent over the wire to
  52. # ensure the stream is in sync and doesn't contain stale data from
  53. # previous client. It must be issued upon initial connection, and
  54. # after any client-side timeouts (including timeouts on receiving a
  55. # response to this command).
  56. #
  57. # After issuing this request, all guest agent responses should be
  58. # ignored until the response containing the unique integer value the
  59. # client passed in is returned. Receival of the 0xFF sentinel byte
  60. # must be handled as an indication that the client's
  61. # lexer/tokenizer/parser state should be flushed/reset in preparation
  62. # for reliably receiving the subsequent response. As an optimization,
  63. # clients may opt to ignore all data until a sentinel value is
  64. # receiving to avoid unnecessary processing of stale data.
  65. #
  66. # Similarly, clients should also precede this *request* with a 0xFF
  67. # byte to make sure the guest agent flushes any partially read JSON
  68. # data from a previous client connection.
  69. #
  70. # @id: randomly generated 64-bit integer
  71. #
  72. # Returns: The unique integer id passed in by the client
  73. #
  74. # Since: 1.1
  75. ##
  76. { 'command': 'guest-sync-delimited',
  77. 'data': { 'id': 'int' },
  78. 'returns': 'int' }
  79. ##
  80. # @guest-sync:
  81. #
  82. # Echo back a unique integer value
  83. #
  84. # This is used by clients talking to the guest agent over the wire to
  85. # ensure the stream is in sync and doesn't contain stale data from
  86. # previous client. All guest agent responses should be ignored until
  87. # the provided unique integer value is returned, and it is up to the
  88. # client to handle stale whole or partially-delivered JSON text in
  89. # such a way that this response can be obtained.
  90. #
  91. # In cases where a partial stale response was previously received by
  92. # the client, this cannot always be done reliably. One particular
  93. # scenario being if qemu-ga responses are fed character-by-character
  94. # into a JSON parser. In these situations, using guest-sync-delimited
  95. # may be optimal.
  96. #
  97. # For clients that fetch responses line by line and convert them to
  98. # JSON objects, guest-sync should be sufficient, but note that in
  99. # cases where the channel is dirty some attempts at parsing the
  100. # response may result in a parser error.
  101. #
  102. # Such clients should also precede this command with a 0xFF byte to
  103. # make sure the guest agent flushes any partially read JSON data from
  104. # a previous session.
  105. #
  106. # @id: randomly generated 64-bit integer
  107. #
  108. # Returns: The unique integer id passed in by the client
  109. #
  110. # Since: 0.15.0
  111. ##
  112. { 'command': 'guest-sync',
  113. 'data': { 'id': 'int' },
  114. 'returns': 'int' }
  115. ##
  116. # @guest-ping:
  117. #
  118. # Ping the guest agent, a non-error return implies success
  119. #
  120. # Since: 0.15.0
  121. ##
  122. { 'command': 'guest-ping' }
  123. ##
  124. # @guest-get-time:
  125. #
  126. # Get the information about guest's System Time relative to the Epoch
  127. # of 1970-01-01 in UTC.
  128. #
  129. # Returns: Time in nanoseconds.
  130. #
  131. # Since: 1.5
  132. ##
  133. { 'command': 'guest-get-time',
  134. 'returns': 'int' }
  135. ##
  136. # @guest-set-time:
  137. #
  138. # Set guest time.
  139. #
  140. # When a guest is paused or migrated to a file then loaded from that
  141. # file, the guest OS has no idea that there was a big gap in the time.
  142. # Depending on how long the gap was, NTP might not be able to
  143. # resynchronize the guest.
  144. #
  145. # This command tries to set guest's System Time to the given value,
  146. # then sets the Hardware Clock (RTC) to the current System Time. This
  147. # will make it easier for a guest to resynchronize without waiting for
  148. # NTP. If no @time is specified, then the time to set is read from
  149. # RTC. However, this may not be supported on all platforms (i.e.
  150. # Windows). If that's the case users are advised to always pass a
  151. # value.
  152. #
  153. # @time: time of nanoseconds, relative to the Epoch of 1970-01-01 in
  154. # UTC.
  155. #
  156. # Since: 1.5
  157. ##
  158. { 'command': 'guest-set-time',
  159. 'data': { '*time': 'int' } }
  160. ##
  161. # @GuestAgentCommandInfo:
  162. #
  163. # Information about guest agent commands.
  164. #
  165. # @name: name of the command
  166. #
  167. # @enabled: whether command is currently enabled by guest admin
  168. #
  169. # @success-response: whether command returns a response on success
  170. # (since 1.7)
  171. #
  172. # Since: 1.1.0
  173. ##
  174. { 'struct': 'GuestAgentCommandInfo',
  175. 'data': { 'name': 'str', 'enabled': 'bool', 'success-response': 'bool' } }
  176. ##
  177. # @GuestAgentInfo:
  178. #
  179. # Information about guest agent.
  180. #
  181. # @version: guest agent version
  182. #
  183. # @supported_commands: Information about guest agent commands
  184. #
  185. # Since: 0.15.0
  186. ##
  187. { 'struct': 'GuestAgentInfo',
  188. 'data': { 'version': 'str',
  189. 'supported_commands': ['GuestAgentCommandInfo'] } }
  190. ##
  191. # @guest-info:
  192. #
  193. # Get some information about the guest agent.
  194. #
  195. # Returns: @GuestAgentInfo
  196. #
  197. # Since: 0.15.0
  198. ##
  199. { 'command': 'guest-info',
  200. 'returns': 'GuestAgentInfo' }
  201. ##
  202. # @guest-shutdown:
  203. #
  204. # Initiate guest-activated shutdown. Note: this is an asynchronous
  205. # shutdown request, with no guarantee of successful shutdown.
  206. #
  207. # @mode: "halt", "powerdown" (default), or "reboot"
  208. #
  209. # This command does NOT return a response on success. Success
  210. # condition is indicated by the VM exiting with a zero exit status or,
  211. # when running with --no-shutdown, by issuing the query-status QMP
  212. # command to confirm the VM status is "shutdown".
  213. #
  214. # Since: 0.15.0
  215. ##
  216. { 'command': 'guest-shutdown', 'data': { '*mode': 'str' },
  217. 'success-response': false }
  218. ##
  219. # @guest-file-open:
  220. #
  221. # Open a file in the guest and retrieve a file handle for it
  222. #
  223. # @path: Full path to the file in the guest to open.
  224. #
  225. # @mode: open mode, as per fopen(), "r" is the default.
  226. #
  227. # Returns: Guest file handle
  228. #
  229. # Since: 0.15.0
  230. ##
  231. { 'command': 'guest-file-open',
  232. 'data': { 'path': 'str', '*mode': 'str' },
  233. 'returns': 'int' }
  234. ##
  235. # @guest-file-close:
  236. #
  237. # Close an open file in the guest
  238. #
  239. # @handle: filehandle returned by guest-file-open
  240. #
  241. # Since: 0.15.0
  242. ##
  243. { 'command': 'guest-file-close',
  244. 'data': { 'handle': 'int' } }
  245. ##
  246. # @GuestFileRead:
  247. #
  248. # Result of guest agent file-read operation
  249. #
  250. # @count: number of bytes read (note: count is *before*
  251. # base64-encoding is applied)
  252. #
  253. # @buf-b64: base64-encoded bytes read
  254. #
  255. # @eof: whether EOF was encountered during read operation.
  256. #
  257. # Since: 0.15.0
  258. ##
  259. { 'struct': 'GuestFileRead',
  260. 'data': { 'count': 'int', 'buf-b64': 'str', 'eof': 'bool' } }
  261. ##
  262. # @guest-file-read:
  263. #
  264. # Read from an open file in the guest. Data will be base64-encoded.
  265. # As this command is just for limited, ad-hoc debugging, such as log
  266. # file access, the number of bytes to read is limited to 48 MB.
  267. #
  268. # @handle: filehandle returned by guest-file-open
  269. #
  270. # @count: maximum number of bytes to read (default is 4KB, maximum is
  271. # 48MB)
  272. #
  273. # Returns: @GuestFileRead
  274. #
  275. # Since: 0.15.0
  276. ##
  277. { 'command': 'guest-file-read',
  278. 'data': { 'handle': 'int', '*count': 'int' },
  279. 'returns': 'GuestFileRead' }
  280. ##
  281. # @GuestFileWrite:
  282. #
  283. # Result of guest agent file-write operation
  284. #
  285. # @count: number of bytes written (note: count is actual bytes
  286. # written, after base64-decoding of provided buffer)
  287. #
  288. # @eof: whether EOF was encountered during write operation.
  289. #
  290. # Since: 0.15.0
  291. ##
  292. { 'struct': 'GuestFileWrite',
  293. 'data': { 'count': 'int', 'eof': 'bool' } }
  294. ##
  295. # @guest-file-write:
  296. #
  297. # Write to an open file in the guest.
  298. #
  299. # @handle: filehandle returned by guest-file-open
  300. #
  301. # @buf-b64: base64-encoded string representing data to be written
  302. #
  303. # @count: bytes to write (actual bytes, after base64-decode), default
  304. # is all content in buf-b64 buffer after base64 decoding
  305. #
  306. # Returns: @GuestFileWrite
  307. #
  308. # Since: 0.15.0
  309. ##
  310. { 'command': 'guest-file-write',
  311. 'data': { 'handle': 'int', 'buf-b64': 'str', '*count': 'int' },
  312. 'returns': 'GuestFileWrite' }
  313. ##
  314. # @GuestFileSeek:
  315. #
  316. # Result of guest agent file-seek operation
  317. #
  318. # @position: current file position
  319. #
  320. # @eof: whether EOF was encountered during file seek
  321. #
  322. # Since: 0.15.0
  323. ##
  324. { 'struct': 'GuestFileSeek',
  325. 'data': { 'position': 'int', 'eof': 'bool' } }
  326. ##
  327. # @QGASeek:
  328. #
  329. # Symbolic names for use in @guest-file-seek
  330. #
  331. # @set: Set to the specified offset (same effect as 'whence':0)
  332. #
  333. # @cur: Add offset to the current location (same effect as 'whence':1)
  334. #
  335. # @end: Add offset to the end of the file (same effect as 'whence':2)
  336. #
  337. # Since: 2.6
  338. ##
  339. { 'enum': 'QGASeek', 'data': [ 'set', 'cur', 'end' ] }
  340. ##
  341. # @GuestFileWhence:
  342. #
  343. # Controls the meaning of offset to @guest-file-seek.
  344. #
  345. # @value: Integral value (0 for set, 1 for cur, 2 for end), available
  346. # for historical reasons, and might differ from the host's or
  347. # guest's SEEK_* values (since: 0.15)
  348. #
  349. # @name: Symbolic name, and preferred interface
  350. #
  351. # Since: 2.6
  352. ##
  353. { 'alternate': 'GuestFileWhence',
  354. 'data': { 'value': 'int', 'name': 'QGASeek' } }
  355. ##
  356. # @guest-file-seek:
  357. #
  358. # Seek to a position in the file, as with fseek(), and return the
  359. # current file position afterward. Also encapsulates ftell()'s
  360. # functionality, with offset=0 and whence=1.
  361. #
  362. # @handle: filehandle returned by guest-file-open
  363. #
  364. # @offset: bytes to skip over in the file stream
  365. #
  366. # @whence: Symbolic or numeric code for interpreting offset
  367. #
  368. # Returns: @GuestFileSeek
  369. #
  370. # Since: 0.15.0
  371. ##
  372. { 'command': 'guest-file-seek',
  373. 'data': { 'handle': 'int', 'offset': 'int',
  374. 'whence': 'GuestFileWhence' },
  375. 'returns': 'GuestFileSeek' }
  376. ##
  377. # @guest-file-flush:
  378. #
  379. # Write file changes buffered in userspace to disk/kernel buffers
  380. #
  381. # @handle: filehandle returned by guest-file-open
  382. #
  383. # Since: 0.15.0
  384. ##
  385. { 'command': 'guest-file-flush',
  386. 'data': { 'handle': 'int' } }
  387. ##
  388. # @GuestFsfreezeStatus:
  389. #
  390. # An enumeration of filesystem freeze states
  391. #
  392. # @thawed: filesystems thawed/unfrozen
  393. #
  394. # @frozen: all non-network guest filesystems frozen
  395. #
  396. # Since: 0.15.0
  397. ##
  398. { 'enum': 'GuestFsfreezeStatus',
  399. 'data': [ 'thawed', 'frozen' ],
  400. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSFREEZE'] } }
  401. ##
  402. # @guest-fsfreeze-status:
  403. #
  404. # Get guest fsfreeze state.
  405. #
  406. # Returns: GuestFsfreezeStatus ("thawed", "frozen", etc., as defined
  407. # below)
  408. #
  409. # .. note:: This may fail to properly report the current state as a
  410. # result of some other guest processes having issued an fs
  411. # freeze/thaw.
  412. #
  413. # Since: 0.15.0
  414. ##
  415. { 'command': 'guest-fsfreeze-status',
  416. 'returns': 'GuestFsfreezeStatus',
  417. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSFREEZE'] } }
  418. ##
  419. # @guest-fsfreeze-freeze:
  420. #
  421. # Sync and freeze all freezable, local guest filesystems. If this
  422. # command succeeded, you may call @guest-fsfreeze-thaw later to
  423. # unfreeze.
  424. #
  425. # On error, all filesystems will be thawed. If no filesystems are
  426. # frozen as a result of this call, then @guest-fsfreeze-status will
  427. # remain "thawed" and calling @guest-fsfreeze-thaw is not necessary.
  428. #
  429. # Returns: Number of file systems currently frozen.
  430. #
  431. # .. note:: On Windows, the command is implemented with the help of a
  432. # Volume Shadow-copy Service DLL helper. The frozen state is limited
  433. # for up to 10 seconds by VSS.
  434. #
  435. # Since: 0.15.0
  436. ##
  437. { 'command': 'guest-fsfreeze-freeze',
  438. 'returns': 'int',
  439. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSFREEZE'] } }
  440. ##
  441. # @guest-fsfreeze-freeze-list:
  442. #
  443. # Sync and freeze specified guest filesystems. See also
  444. # @guest-fsfreeze-freeze.
  445. #
  446. # On error, all filesystems will be thawed.
  447. #
  448. # @mountpoints: an array of mountpoints of filesystems to be frozen.
  449. # If omitted, every mounted filesystem is frozen. Invalid mount
  450. # points are ignored.
  451. #
  452. # Returns: Number of file systems currently frozen.
  453. #
  454. # Since: 2.2
  455. ##
  456. { 'command': 'guest-fsfreeze-freeze-list',
  457. 'data': { '*mountpoints': ['str'] },
  458. 'returns': 'int',
  459. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSFREEZE'] } }
  460. ##
  461. # @guest-fsfreeze-thaw:
  462. #
  463. # Unfreeze all frozen guest filesystems
  464. #
  465. # Returns: Number of file systems thawed by this call
  466. #
  467. # .. note:: If the return value does not match the previous call to
  468. # guest-fsfreeze-freeze, this likely means some freezable filesystems
  469. # were unfrozen before this call, and that the filesystem state may
  470. # have changed before issuing this command.
  471. #
  472. # Since: 0.15.0
  473. ##
  474. { 'command': 'guest-fsfreeze-thaw',
  475. 'returns': 'int',
  476. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSFREEZE'] } }
  477. ##
  478. # @GuestFilesystemTrimResult:
  479. #
  480. # @path: path that was trimmed
  481. #
  482. # @error: an error message when trim failed
  483. #
  484. # @trimmed: bytes trimmed for this path
  485. #
  486. # @minimum: reported effective minimum for this path
  487. #
  488. # Since: 2.4
  489. ##
  490. { 'struct': 'GuestFilesystemTrimResult',
  491. 'data': {'path': 'str',
  492. '*trimmed': 'int', '*minimum': 'int', '*error': 'str'},
  493. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSTRIM'] } }
  494. ##
  495. # @GuestFilesystemTrimResponse:
  496. #
  497. # @paths: list of @GuestFilesystemTrimResult per path that was trimmed
  498. #
  499. # Since: 2.4
  500. ##
  501. { 'struct': 'GuestFilesystemTrimResponse',
  502. 'data': {'paths': ['GuestFilesystemTrimResult']},
  503. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSTRIM'] } }
  504. ##
  505. # @guest-fstrim:
  506. #
  507. # Discard (or "trim") blocks which are not in use by the filesystem.
  508. #
  509. # @minimum: Minimum contiguous free range to discard, in bytes. Free
  510. # ranges smaller than this may be ignored (this is a hint and the
  511. # guest may not respect it). By increasing this value, the fstrim
  512. # operation will complete more quickly for filesystems with badly
  513. # fragmented free space, although not all blocks will be
  514. # discarded. The default value is zero, meaning "discard every
  515. # free block".
  516. #
  517. # Returns: A @GuestFilesystemTrimResponse which contains the status of
  518. # all trimmed paths. (since 2.4)
  519. #
  520. # Since: 1.2
  521. ##
  522. { 'command': 'guest-fstrim',
  523. 'data': { '*minimum': 'int' },
  524. 'returns': 'GuestFilesystemTrimResponse',
  525. 'if': { 'any': ['CONFIG_WIN32', 'CONFIG_FSTRIM'] } }
  526. ##
  527. # @guest-suspend-disk:
  528. #
  529. # Suspend guest to disk.
  530. #
  531. # This command attempts to suspend the guest using three strategies,
  532. # in this order:
  533. #
  534. # - systemd hibernate
  535. # - pm-utils (via pm-hibernate)
  536. # - manual write into sysfs
  537. #
  538. # This command does NOT return a response on success. There is a high
  539. # chance the command succeeded if the VM exits with a zero exit status
  540. # or, when running with --no-shutdown, by issuing the query-status QMP
  541. # command to to confirm the VM status is "shutdown". However, the VM
  542. # could also exit (or set its status to "shutdown") due to other
  543. # reasons.
  544. #
  545. # Errors:
  546. # - If suspend to disk is not supported, Unsupported
  547. #
  548. # .. note:: It's strongly recommended to issue the guest-sync command
  549. # before sending commands when the guest resumes.
  550. #
  551. # Since: 1.1
  552. ##
  553. { 'command': 'guest-suspend-disk', 'success-response': false,
  554. 'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] } }
  555. ##
  556. # @guest-suspend-ram:
  557. #
  558. # Suspend guest to ram.
  559. #
  560. # This command attempts to suspend the guest using three strategies,
  561. # in this order:
  562. #
  563. # - systemd hibernate
  564. # - pm-utils (via pm-hibernate)
  565. # - manual write into sysfs
  566. #
  567. # IMPORTANT: guest-suspend-ram requires working wakeup support in
  568. # QEMU. You should check QMP command query-current-machine returns
  569. # wakeup-suspend-support: true before issuing this command. Failure
  570. # in doing so can result in a suspended guest that QEMU will not be
  571. # able to awaken, forcing the user to power cycle the guest to bring
  572. # it back.
  573. #
  574. # This command does NOT return a response on success. There are two
  575. # options to check for success:
  576. #
  577. # 1. Wait for the SUSPEND QMP event from QEMU
  578. # 2. Issue the query-status QMP command to confirm the VM status is
  579. # "suspended"
  580. #
  581. # Errors:
  582. # - If suspend to ram is not supported, Unsupported
  583. #
  584. # .. note:: It's strongly recommended to issue the guest-sync command
  585. # before sending commands when the guest resumes.
  586. #
  587. # Since: 1.1
  588. ##
  589. { 'command': 'guest-suspend-ram', 'success-response': false,
  590. 'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] } }
  591. ##
  592. # @guest-suspend-hybrid:
  593. #
  594. # Save guest state to disk and suspend to ram.
  595. #
  596. # This command attempts to suspend the guest by executing, in this
  597. # order:
  598. #
  599. # - systemd hybrid-sleep
  600. # - pm-utils (via pm-suspend-hybrid)
  601. #
  602. # IMPORTANT: guest-suspend-hybrid requires working wakeup support in
  603. # QEMU. You should check QMP command query-current-machine returns
  604. # wakeup-suspend-support: true before issuing this command. Failure
  605. # in doing so can result in a suspended guest that QEMU will not be
  606. # able to awaken, forcing the user to power cycle the guest to bring
  607. # it back.
  608. #
  609. # This command does NOT return a response on success. There are two
  610. # options to check for success:
  611. #
  612. # 1. Wait for the SUSPEND QMP event from QEMU
  613. # 2. Issue the query-status QMP command to confirm the VM status is
  614. # "suspended"
  615. #
  616. # Errors:
  617. # - If hybrid suspend is not supported, Unsupported
  618. #
  619. # .. note:: It's strongly recommended to issue the guest-sync command
  620. # before sending commands when the guest resumes.
  621. #
  622. # Since: 1.1
  623. ##
  624. { 'command': 'guest-suspend-hybrid', 'success-response': false,
  625. 'if': 'CONFIG_LINUX' }
  626. ##
  627. # @GuestIpAddressType:
  628. #
  629. # An enumeration of supported IP address types
  630. #
  631. # @ipv4: IP version 4
  632. #
  633. # @ipv6: IP version 6
  634. #
  635. # Since: 1.1
  636. ##
  637. { 'enum': 'GuestIpAddressType',
  638. 'data': [ 'ipv4', 'ipv6' ],
  639. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_GETIFADDRS'] } }
  640. ##
  641. # @GuestIpAddress:
  642. #
  643. # @ip-address: IP address
  644. #
  645. # @ip-address-type: Type of @ip-address (e.g. ipv4, ipv6)
  646. #
  647. # @prefix: Network prefix length of @ip-address
  648. #
  649. # Since: 1.1
  650. ##
  651. { 'struct': 'GuestIpAddress',
  652. 'data': {'ip-address': 'str',
  653. 'ip-address-type': 'GuestIpAddressType',
  654. 'prefix': 'int'},
  655. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_GETIFADDRS'] } }
  656. ##
  657. # @GuestNetworkInterfaceStat:
  658. #
  659. # @rx-bytes: total bytes received
  660. #
  661. # @rx-packets: total packets received
  662. #
  663. # @rx-errs: bad packets received
  664. #
  665. # @rx-dropped: receiver dropped packets
  666. #
  667. # @tx-bytes: total bytes transmitted
  668. #
  669. # @tx-packets: total packets transmitted
  670. #
  671. # @tx-errs: packet transmit problems
  672. #
  673. # @tx-dropped: dropped packets transmitted
  674. #
  675. # Since: 2.11
  676. ##
  677. { 'struct': 'GuestNetworkInterfaceStat',
  678. 'data': {'rx-bytes': 'uint64',
  679. 'rx-packets': 'uint64',
  680. 'rx-errs': 'uint64',
  681. 'rx-dropped': 'uint64',
  682. 'tx-bytes': 'uint64',
  683. 'tx-packets': 'uint64',
  684. 'tx-errs': 'uint64',
  685. 'tx-dropped': 'uint64'
  686. },
  687. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_GETIFADDRS'] } }
  688. ##
  689. # @GuestNetworkInterface:
  690. #
  691. # @name: The name of interface for which info are being delivered
  692. #
  693. # @hardware-address: Hardware address of @name
  694. #
  695. # @ip-addresses: List of addresses assigned to @name
  696. #
  697. # @statistics: various statistic counters related to @name (since
  698. # 2.11)
  699. #
  700. # Since: 1.1
  701. ##
  702. { 'struct': 'GuestNetworkInterface',
  703. 'data': {'name': 'str',
  704. '*hardware-address': 'str',
  705. '*ip-addresses': ['GuestIpAddress'],
  706. '*statistics': 'GuestNetworkInterfaceStat' },
  707. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_GETIFADDRS'] } }
  708. ##
  709. # @guest-network-get-interfaces:
  710. #
  711. # Get list of guest IP addresses, MAC addresses and netmasks.
  712. #
  713. # Returns: List of GuestNetworkInterface
  714. #
  715. # Since: 1.1
  716. ##
  717. { 'command': 'guest-network-get-interfaces',
  718. 'returns': ['GuestNetworkInterface'],
  719. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_GETIFADDRS'] } }
  720. ##
  721. # @GuestLogicalProcessor:
  722. #
  723. # @logical-id: Arbitrary guest-specific unique identifier of the VCPU.
  724. #
  725. # @online: Whether the VCPU is enabled.
  726. #
  727. # @can-offline: Whether offlining the VCPU is possible. This member
  728. # is always filled in by the guest agent when the structure is
  729. # returned, and always ignored on input (hence it can be omitted
  730. # then).
  731. #
  732. # Since: 1.5
  733. ##
  734. { 'struct': 'GuestLogicalProcessor',
  735. 'data': {'logical-id': 'int',
  736. 'online': 'bool',
  737. '*can-offline': 'bool'},
  738. 'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] } }
  739. ##
  740. # @guest-get-vcpus:
  741. #
  742. # Retrieve the list of the guest's logical processors.
  743. #
  744. # This is a read-only operation.
  745. #
  746. # Returns: The list of all VCPUs the guest knows about. Each VCPU is
  747. # put on the list exactly once, but their order is unspecified.
  748. #
  749. # Since: 1.5
  750. ##
  751. { 'command': 'guest-get-vcpus',
  752. 'returns': ['GuestLogicalProcessor'],
  753. 'if': { 'any': ['CONFIG_LINUX', 'CONFIG_WIN32'] } }
  754. ##
  755. # @guest-set-vcpus:
  756. #
  757. # Attempt to reconfigure (currently: enable/disable) logical
  758. # processors inside the guest.
  759. #
  760. # @vcpus: The logical processors to be reconfigured. This list is
  761. # processed node by node in order. In each node @logical-id is
  762. # used to look up the guest VCPU, for which @online specifies the
  763. # requested state. The set of distinct @logical-id's is only
  764. # required to be a subset of the guest-supported identifiers.
  765. # There's no restriction on list length or on repeating the same
  766. # @logical-id (with possibly different @online field). Preferably
  767. # the input list should describe a modified subset of
  768. # @guest-get-vcpus' return value.
  769. #
  770. # Returns: The length of the initial sublist that has been
  771. # successfully processed. The guest agent maximizes this value.
  772. # Possible cases:
  773. #
  774. # - 0:
  775. # if the @vcpus list was empty on input. Guest state has not
  776. # been changed. Otherwise,
  777. # - < length(@vcpus):
  778. # more than zero initial nodes have been processed, but not the
  779. # entire @vcpus list. Guest state has changed accordingly. To
  780. # retrieve the error (assuming it persists), repeat the call
  781. # with the successfully processed initial sublist removed.
  782. # Otherwise,
  783. # - length(@vcpus):
  784. # call successful.
  785. #
  786. # Errors:
  787. # - If the reconfiguration of the first node in @vcpus failed.
  788. # Guest state has not been changed.
  789. #
  790. # Since: 1.5
  791. ##
  792. { 'command': 'guest-set-vcpus',
  793. 'data': {'vcpus': ['GuestLogicalProcessor'] },
  794. 'returns': 'int',
  795. 'if': 'CONFIG_LINUX' }
  796. ##
  797. # @GuestDiskBusType:
  798. #
  799. # An enumeration of bus type of disks
  800. #
  801. # @ide: IDE disks
  802. #
  803. # @fdc: floppy disks
  804. #
  805. # @scsi: SCSI disks
  806. #
  807. # @virtio: virtio disks
  808. #
  809. # @xen: Xen disks
  810. #
  811. # @usb: USB disks
  812. #
  813. # @uml: UML disks
  814. #
  815. # @sata: SATA disks
  816. #
  817. # @sd: SD cards
  818. #
  819. # @unknown: Unknown bus type
  820. #
  821. # @ieee1394: Win IEEE 1394 bus type
  822. #
  823. # @ssa: Win SSA bus type
  824. #
  825. # @fibre: Win fiber channel bus type
  826. #
  827. # @raid: Win RAID bus type
  828. #
  829. # @iscsi: Win iScsi bus type
  830. #
  831. # @sas: Win serial-attaches SCSI bus type
  832. #
  833. # @mmc: Win multimedia card (MMC) bus type
  834. #
  835. # @virtual: Win virtual bus type
  836. #
  837. # @file-backed-virtual: Win file-backed bus type
  838. #
  839. # @nvme: NVMe disks (since 7.1)
  840. #
  841. # Since: 2.2; 'Unknown' and all entries below since 2.4
  842. ##
  843. { 'enum': 'GuestDiskBusType',
  844. 'data': [ 'ide', 'fdc', 'scsi', 'virtio', 'xen', 'usb', 'uml', 'sata',
  845. 'sd', 'unknown', 'ieee1394', 'ssa', 'fibre', 'raid', 'iscsi',
  846. 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ],
  847. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  848. ##
  849. # @GuestPCIAddress:
  850. #
  851. # @domain: domain id
  852. #
  853. # @bus: bus id
  854. #
  855. # @slot: slot id
  856. #
  857. # @function: function id
  858. #
  859. # Since: 2.2
  860. ##
  861. { 'struct': 'GuestPCIAddress',
  862. 'data': {'domain': 'int', 'bus': 'int',
  863. 'slot': 'int', 'function': 'int'},
  864. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  865. ##
  866. # @GuestCCWAddress:
  867. #
  868. # @cssid: channel subsystem image id
  869. #
  870. # @ssid: subchannel set id
  871. #
  872. # @subchno: subchannel number
  873. #
  874. # @devno: device number
  875. #
  876. # Since: 6.0
  877. ##
  878. { 'struct': 'GuestCCWAddress',
  879. 'data': {'cssid': 'int',
  880. 'ssid': 'int',
  881. 'subchno': 'int',
  882. 'devno': 'int'},
  883. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  884. ##
  885. # @GuestDiskAddress:
  886. #
  887. # @pci-controller: controller's PCI address (fields are set to -1 if
  888. # invalid)
  889. #
  890. # @bus-type: bus type
  891. #
  892. # @bus: bus id
  893. #
  894. # @target: target id
  895. #
  896. # @unit: unit id
  897. #
  898. # @serial: serial number (since: 3.1)
  899. #
  900. # @dev: device node (POSIX) or device UNC (Windows) (since: 3.1)
  901. #
  902. # @ccw-address: CCW address on s390x (since: 6.0)
  903. #
  904. # Since: 2.2
  905. ##
  906. { 'struct': 'GuestDiskAddress',
  907. 'data': {'pci-controller': 'GuestPCIAddress',
  908. 'bus-type': 'GuestDiskBusType',
  909. 'bus': 'int', 'target': 'int', 'unit': 'int',
  910. '*serial': 'str', '*dev': 'str',
  911. '*ccw-address': 'GuestCCWAddress'},
  912. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  913. ##
  914. # @GuestNVMeSmart:
  915. #
  916. # NVMe smart information, based on NVMe specification, section
  917. # <SMART / Health Information (Log Identifier 02h)>
  918. #
  919. # TODO: document members briefly
  920. #
  921. # Since: 7.1
  922. ##
  923. { 'struct': 'GuestNVMeSmart',
  924. 'data': {'critical-warning': 'int',
  925. 'temperature': 'int',
  926. 'available-spare': 'int',
  927. 'available-spare-threshold': 'int',
  928. 'percentage-used': 'int',
  929. 'data-units-read-lo': 'uint64',
  930. 'data-units-read-hi': 'uint64',
  931. 'data-units-written-lo': 'uint64',
  932. 'data-units-written-hi': 'uint64',
  933. 'host-read-commands-lo': 'uint64',
  934. 'host-read-commands-hi': 'uint64',
  935. 'host-write-commands-lo': 'uint64',
  936. 'host-write-commands-hi': 'uint64',
  937. 'controller-busy-time-lo': 'uint64',
  938. 'controller-busy-time-hi': 'uint64',
  939. 'power-cycles-lo': 'uint64',
  940. 'power-cycles-hi': 'uint64',
  941. 'power-on-hours-lo': 'uint64',
  942. 'power-on-hours-hi': 'uint64',
  943. 'unsafe-shutdowns-lo': 'uint64',
  944. 'unsafe-shutdowns-hi': 'uint64',
  945. 'media-errors-lo': 'uint64',
  946. 'media-errors-hi': 'uint64',
  947. 'number-of-error-log-entries-lo': 'uint64',
  948. 'number-of-error-log-entries-hi': 'uint64' },
  949. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
  950. ##
  951. # @GuestDiskSmart:
  952. #
  953. # Disk type related smart information.
  954. #
  955. # @type: disk bus type
  956. #
  957. # Since: 7.1
  958. ##
  959. { 'union': 'GuestDiskSmart',
  960. 'base': { 'type': 'GuestDiskBusType' },
  961. 'discriminator': 'type',
  962. 'data': { 'nvme': 'GuestNVMeSmart' },
  963. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
  964. ##
  965. # @GuestDiskInfo:
  966. #
  967. # @name: device node (Linux) or device UNC (Windows)
  968. #
  969. # @partition: whether this is a partition or disk
  970. #
  971. # @dependencies: list of device dependencies; e.g. for LVs of the LVM
  972. # this will hold the list of PVs, for LUKS encrypted volume this
  973. # will contain the disk where the volume is placed. (Linux)
  974. #
  975. # @address: disk address information (only for non-virtual devices)
  976. #
  977. # @alias: optional alias assigned to the disk, on Linux this is a name
  978. # assigned by device mapper
  979. #
  980. # @smart: disk smart information (Since 7.1)
  981. #
  982. # Since: 5.2
  983. ##
  984. { 'struct': 'GuestDiskInfo',
  985. 'data': {'name': 'str', 'partition': 'bool', '*dependencies': ['str'],
  986. '*address': 'GuestDiskAddress', '*alias': 'str',
  987. '*smart': 'GuestDiskSmart'},
  988. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
  989. ##
  990. # @guest-get-disks:
  991. #
  992. # Returns: The list of disks in the guest. For Windows these are only
  993. # the physical disks. On Linux these are all root block devices
  994. # of non-zero size including e.g. removable devices, loop devices,
  995. # NBD, etc.
  996. #
  997. # Since: 5.2
  998. ##
  999. { 'command': 'guest-get-disks',
  1000. 'returns': ['GuestDiskInfo'],
  1001. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
  1002. ##
  1003. # @GuestFilesystemInfo:
  1004. #
  1005. # @name: disk name
  1006. #
  1007. # @mountpoint: mount point path
  1008. #
  1009. # @type: file system type string
  1010. #
  1011. # @used-bytes: file system used bytes (since 3.0)
  1012. #
  1013. # @total-bytes: filesystem capacity in bytes for unprivileged users (since 3.0)
  1014. #
  1015. # @total-bytes-privileged: filesystem capacity in bytes for privileged users
  1016. # (since 9.1)
  1017. #
  1018. # @disk: an array of disk hardware information that the volume lies
  1019. # on, which may be empty if the disk type is not supported
  1020. #
  1021. # Since: 2.2
  1022. ##
  1023. { 'struct': 'GuestFilesystemInfo',
  1024. 'data': {'name': 'str', 'mountpoint': 'str', 'type': 'str',
  1025. '*used-bytes': 'uint64', '*total-bytes': 'uint64',
  1026. '*total-bytes-privileged': 'uint64', 'disk': ['GuestDiskAddress']},
  1027. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  1028. ##
  1029. # @guest-get-fsinfo:
  1030. #
  1031. # Returns: The list of filesystems information mounted in the guest.
  1032. # The returned mountpoints may be specified to
  1033. # @guest-fsfreeze-freeze-list. Network filesystems (such as CIFS
  1034. # and NFS) are not listed.
  1035. #
  1036. # Since: 2.2
  1037. ##
  1038. { 'command': 'guest-get-fsinfo',
  1039. 'returns': ['GuestFilesystemInfo'],
  1040. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } }
  1041. ##
  1042. # @guest-set-user-password:
  1043. #
  1044. # @username: the user account whose password to change
  1045. #
  1046. # @password: the new password entry string, base64 encoded
  1047. #
  1048. # @crypted: true if password is already crypt()d, false if raw
  1049. #
  1050. # If the @crypted flag is true, it is the caller's responsibility to
  1051. # ensure the correct crypt() encryption scheme is used. This command
  1052. # does not attempt to interpret or report on the encryption scheme.
  1053. # Refer to the documentation of the guest operating system in question
  1054. # to determine what is supported.
  1055. #
  1056. # Not all guest operating systems will support use of the @crypted
  1057. # flag, as they may require the clear-text password
  1058. #
  1059. # The @password parameter must always be base64 encoded before
  1060. # transmission, even if already crypt()d, to ensure it is 8-bit safe
  1061. # when passed as JSON.
  1062. #
  1063. # Since: 2.3
  1064. ##
  1065. { 'command': 'guest-set-user-password',
  1066. 'data': { 'username': 'str', 'password': 'str', 'crypted': 'bool' },
  1067. 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX', 'CONFIG_FREEBSD'] } }
  1068. ##
  1069. # @GuestMemoryBlock:
  1070. #
  1071. # @phys-index: Arbitrary guest-specific unique identifier of the
  1072. # MEMORY BLOCK.
  1073. #
  1074. # @online: Whether the MEMORY BLOCK is enabled in guest.
  1075. #
  1076. # @can-offline: Whether offlining the MEMORY BLOCK is possible. This
  1077. # member is always filled in by the guest agent when the structure
  1078. # is returned, and always ignored on input (hence it can be
  1079. # omitted then).
  1080. #
  1081. # Since: 2.3
  1082. ##
  1083. { 'struct': 'GuestMemoryBlock',
  1084. 'data': {'phys-index': 'uint64',
  1085. 'online': 'bool',
  1086. '*can-offline': 'bool'},
  1087. 'if': 'CONFIG_LINUX' }
  1088. ##
  1089. # @guest-get-memory-blocks:
  1090. #
  1091. # Retrieve the list of the guest's memory blocks.
  1092. #
  1093. # This is a read-only operation.
  1094. #
  1095. # Returns: The list of all memory blocks the guest knows about. Each
  1096. # memory block is put on the list exactly once, but their order is
  1097. # unspecified.
  1098. #
  1099. # Since: 2.3
  1100. ##
  1101. { 'command': 'guest-get-memory-blocks',
  1102. 'returns': ['GuestMemoryBlock'],
  1103. 'if': 'CONFIG_LINUX' }
  1104. ##
  1105. # @GuestMemoryBlockResponseType:
  1106. #
  1107. # An enumeration of memory block operation result.
  1108. #
  1109. # @success: the operation of online/offline memory block is
  1110. # successful.
  1111. #
  1112. # @not-found: can't find the corresponding memoryXXX directory in
  1113. # sysfs.
  1114. #
  1115. # @operation-not-supported: for some old kernels, it does not support
  1116. # online or offline memory block.
  1117. #
  1118. # @operation-failed: the operation of online/offline memory block
  1119. # fails, because of some errors happen.
  1120. #
  1121. # Since: 2.3
  1122. ##
  1123. { 'enum': 'GuestMemoryBlockResponseType',
  1124. 'data': ['success', 'not-found', 'operation-not-supported',
  1125. 'operation-failed'],
  1126. 'if': 'CONFIG_LINUX' }
  1127. ##
  1128. # @GuestMemoryBlockResponse:
  1129. #
  1130. # @phys-index: same with the 'phys-index' member of @GuestMemoryBlock.
  1131. #
  1132. # @response: the result of memory block operation.
  1133. #
  1134. # @error-code: the error number. When memory block operation fails,
  1135. # we assign the value of 'errno' to this member, it indicates what
  1136. # goes wrong. When the operation succeeds, it will be omitted.
  1137. #
  1138. # Since: 2.3
  1139. ##
  1140. { 'struct': 'GuestMemoryBlockResponse',
  1141. 'data': { 'phys-index': 'uint64',
  1142. 'response': 'GuestMemoryBlockResponseType',
  1143. '*error-code': 'int' },
  1144. 'if': 'CONFIG_LINUX'}
  1145. ##
  1146. # @guest-set-memory-blocks:
  1147. #
  1148. # Attempt to reconfigure (currently: enable/disable) state of memory
  1149. # blocks inside the guest.
  1150. #
  1151. # @mem-blks: The memory blocks to be reconfigured. This list is
  1152. # processed node by node in order. In each node @phys-index is
  1153. # used to look up the guest MEMORY BLOCK, for which @online
  1154. # specifies the requested state. The set of distinct
  1155. # @phys-index's is only required to be a subset of the
  1156. # guest-supported identifiers. There's no restriction on list
  1157. # length or on repeating the same @phys-index (with possibly
  1158. # different @online field). Preferably the input list should
  1159. # describe a modified subset of @guest-get-memory-blocks' return
  1160. # value.
  1161. #
  1162. # Returns: The operation results, it is a list of
  1163. # @GuestMemoryBlockResponse, which is corresponding to the input
  1164. # list.
  1165. #
  1166. # Note: it will return an empty list if the @mem-blks list was
  1167. # empty on input, or there is an error, and in this case, guest
  1168. # state will not be changed.
  1169. #
  1170. # Since: 2.3
  1171. ##
  1172. { 'command': 'guest-set-memory-blocks',
  1173. 'data': {'mem-blks': ['GuestMemoryBlock'] },
  1174. 'returns': ['GuestMemoryBlockResponse'],
  1175. 'if': 'CONFIG_LINUX' }
  1176. ##
  1177. # @GuestMemoryBlockInfo:
  1178. #
  1179. # @size: the size (in bytes) of the guest memory blocks, which are the
  1180. # minimal units of memory block online/offline operations (also
  1181. # called Logical Memory Hotplug).
  1182. #
  1183. # Since: 2.3
  1184. ##
  1185. { 'struct': 'GuestMemoryBlockInfo',
  1186. 'data': {'size': 'uint64'},
  1187. 'if': 'CONFIG_LINUX' }
  1188. ##
  1189. # @guest-get-memory-block-info:
  1190. #
  1191. # Get information relating to guest memory blocks.
  1192. #
  1193. # Returns: @GuestMemoryBlockInfo
  1194. #
  1195. # Since: 2.3
  1196. ##
  1197. { 'command': 'guest-get-memory-block-info',
  1198. 'returns': 'GuestMemoryBlockInfo',
  1199. 'if': 'CONFIG_LINUX' }
  1200. ##
  1201. # @GuestExecStatus:
  1202. #
  1203. # @exited: true if process has already terminated.
  1204. #
  1205. # @exitcode: process exit code if it was normally terminated.
  1206. #
  1207. # @signal: signal number (linux) or unhandled exception code (windows)
  1208. # if the process was abnormally terminated.
  1209. #
  1210. # @out-data: base64-encoded stdout of the process. This field will
  1211. # only be populated after the process exits.
  1212. #
  1213. # @err-data: base64-encoded stderr of the process. Note: @out-data
  1214. # and @err-data are present only if 'capture-output' was specified
  1215. # for 'guest-exec'. This field will only be populated after the
  1216. # process exits.
  1217. #
  1218. # @out-truncated: true if stdout was not fully captured due to size
  1219. # limitation.
  1220. #
  1221. # @err-truncated: true if stderr was not fully captured due to size
  1222. # limitation.
  1223. #
  1224. # Since: 2.5
  1225. ##
  1226. { 'struct': 'GuestExecStatus',
  1227. 'data': { 'exited': 'bool', '*exitcode': 'int', '*signal': 'int',
  1228. '*out-data': 'str', '*err-data': 'str',
  1229. '*out-truncated': 'bool', '*err-truncated': 'bool' }}
  1230. ##
  1231. # @guest-exec-status:
  1232. #
  1233. # Check status of process associated with PID retrieved via
  1234. # guest-exec. Reap the process and associated metadata if it has
  1235. # exited.
  1236. #
  1237. # @pid: pid returned from guest-exec
  1238. #
  1239. # Returns: GuestExecStatus
  1240. #
  1241. # Since: 2.5
  1242. ##
  1243. { 'command': 'guest-exec-status',
  1244. 'data': { 'pid': 'int' },
  1245. 'returns': 'GuestExecStatus' }
  1246. ##
  1247. # @GuestExec:
  1248. #
  1249. # @pid: pid of child process in guest OS
  1250. #
  1251. # Since: 2.5
  1252. ##
  1253. { 'struct': 'GuestExec',
  1254. 'data': { 'pid': 'int'} }
  1255. ##
  1256. # @GuestExecCaptureOutputMode:
  1257. #
  1258. # An enumeration of guest-exec capture modes.
  1259. #
  1260. # @none: do not capture any output
  1261. #
  1262. # @stdout: only capture stdout
  1263. #
  1264. # @stderr: only capture stderr
  1265. #
  1266. # @separated: capture both stdout and stderr, but separated into
  1267. # GuestExecStatus out-data and err-data, respectively
  1268. #
  1269. # @merged: capture both stdout and stderr, but merge together into
  1270. # out-data. Not effective on windows guests.
  1271. #
  1272. # Since: 8.0
  1273. ##
  1274. { 'enum': 'GuestExecCaptureOutputMode',
  1275. 'data': [ 'none', 'stdout', 'stderr', 'separated',
  1276. { 'name': 'merged', 'if': { 'not': 'CONFIG_WIN32' } } ] }
  1277. ##
  1278. # @GuestExecCaptureOutput:
  1279. #
  1280. # Controls what guest-exec output gets captures.
  1281. #
  1282. # @flag: captures both stdout and stderr if true. Equivalent to
  1283. # GuestExecCaptureOutputMode::all. (since 2.5)
  1284. #
  1285. # @mode: capture mode; preferred interface
  1286. #
  1287. # Since: 8.0
  1288. ##
  1289. { 'alternate': 'GuestExecCaptureOutput',
  1290. 'data': { 'flag': 'bool',
  1291. 'mode': 'GuestExecCaptureOutputMode'} }
  1292. ##
  1293. # @guest-exec:
  1294. #
  1295. # Execute a command in the guest
  1296. #
  1297. # @path: path or executable name to execute
  1298. #
  1299. # @arg: argument list to pass to executable
  1300. #
  1301. # @env: environment variables to pass to executable
  1302. #
  1303. # @input-data: data to be passed to process stdin (base64 encoded)
  1304. #
  1305. # @capture-output: bool flag to enable capture of stdout/stderr of
  1306. # running process. Defaults to false.
  1307. #
  1308. # Returns: PID
  1309. #
  1310. # Since: 2.5
  1311. ##
  1312. { 'command': 'guest-exec',
  1313. 'data': { 'path': 'str', '*arg': ['str'], '*env': ['str'],
  1314. '*input-data': 'str', '*capture-output': 'GuestExecCaptureOutput' },
  1315. 'returns': 'GuestExec' }
  1316. ##
  1317. # @GuestHostName:
  1318. #
  1319. # @host-name: Fully qualified domain name of the guest OS
  1320. #
  1321. # Since: 2.10
  1322. ##
  1323. { 'struct': 'GuestHostName',
  1324. 'data': { 'host-name': 'str' } }
  1325. ##
  1326. # @guest-get-host-name:
  1327. #
  1328. # Return a name for the machine.
  1329. #
  1330. # The returned name is not necessarily a fully-qualified domain name,
  1331. # or even present in DNS or some other name service at all. It need
  1332. # not even be unique on your local network or site, but usually it is.
  1333. #
  1334. # Returns: the host name of the machine
  1335. #
  1336. # Since: 2.10
  1337. ##
  1338. { 'command': 'guest-get-host-name',
  1339. 'returns': 'GuestHostName' }
  1340. ##
  1341. # @GuestUser:
  1342. #
  1343. # @user: Username
  1344. #
  1345. # @domain: Logon domain (windows only)
  1346. #
  1347. # @login-time: Time of login of this user on the computer. If
  1348. # multiple instances of the user are logged in, the earliest login
  1349. # time is reported. The value is in fractional seconds since
  1350. # epoch time.
  1351. #
  1352. # Since: 2.10
  1353. ##
  1354. { 'struct': 'GuestUser',
  1355. 'data': { 'user': 'str', 'login-time': 'number', '*domain': 'str' },
  1356. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_UTMPX' ] } }
  1357. ##
  1358. # @guest-get-users:
  1359. #
  1360. # Retrieves a list of currently active users on the VM.
  1361. #
  1362. # Returns: A unique list of users.
  1363. #
  1364. # Since: 2.10
  1365. ##
  1366. { 'command': 'guest-get-users',
  1367. 'returns': ['GuestUser'],
  1368. 'if': { 'any': ['CONFIG_WIN32', 'HAVE_UTMPX' ] } }
  1369. ##
  1370. # @GuestTimezone:
  1371. #
  1372. # @zone: Timezone name. These values may differ depending on guest/OS
  1373. # and should only be used for informational purposes.
  1374. #
  1375. # @offset: Offset to UTC in seconds, negative numbers for time zones
  1376. # west of GMT, positive numbers for east
  1377. #
  1378. # Since: 2.10
  1379. ##
  1380. { 'struct': 'GuestTimezone',
  1381. 'data': { '*zone': 'str', 'offset': 'int' } }
  1382. ##
  1383. # @guest-get-timezone:
  1384. #
  1385. # Retrieves the timezone information from the guest.
  1386. #
  1387. # Returns: A GuestTimezone dictionary.
  1388. #
  1389. # Since: 2.10
  1390. ##
  1391. { 'command': 'guest-get-timezone',
  1392. 'returns': 'GuestTimezone' }
  1393. ##
  1394. # @GuestOSInfo:
  1395. #
  1396. # @kernel-release:
  1397. # * POSIX: release field returned by uname(2)
  1398. # * Windows: build number of the OS
  1399. #
  1400. # @kernel-version:
  1401. # * POSIX: version field returned by uname(2)
  1402. # * Windows: version number of the OS
  1403. #
  1404. # @machine:
  1405. # * POSIX: machine field returned by uname(2)
  1406. # * Windows: one of x86, x86_64, arm, ia64
  1407. #
  1408. # @id:
  1409. # * POSIX: as defined by os-release(5)
  1410. # * Windows: contains string "mswindows"
  1411. #
  1412. # @name:
  1413. # * POSIX: as defined by os-release(5)
  1414. # * Windows: contains string "Microsoft Windows"
  1415. #
  1416. # @pretty-name:
  1417. # * POSIX: as defined by os-release(5)
  1418. # * Windows: product name, e.g. "Microsoft Windows 10 Enterprise"
  1419. #
  1420. # @version:
  1421. # * POSIX: as defined by os-release(5)
  1422. # * Windows: long version string, e.g. "Microsoft Windows Server
  1423. # 2008"
  1424. #
  1425. # @version-id:
  1426. # * POSIX: as defined by os-release(5)
  1427. # * Windows: short version identifier, e.g. "7" or "20012r2"
  1428. #
  1429. # @variant:
  1430. # * POSIX: as defined by os-release(5)
  1431. # * Windows: contains string "server" or "client"
  1432. #
  1433. # @variant-id:
  1434. # * POSIX: as defined by os-release(5)
  1435. # * Windows: contains string "server" or "client"
  1436. #
  1437. # .. note:: On POSIX systems the fields @id, @name, @pretty-name,
  1438. # @version, @version-id, @variant and @variant-id follow the
  1439. # definition specified in os-release(5). Refer to the manual page for
  1440. # exact description of the fields. Their values are taken from the
  1441. # os-release file. If the file is not present in the system, or the
  1442. # values are not present in the file, the fields are not included.
  1443. #
  1444. # On Windows the values are filled from information gathered from
  1445. # the system.
  1446. #
  1447. # Since: 2.10
  1448. ##
  1449. { 'struct': 'GuestOSInfo',
  1450. 'data': {
  1451. '*kernel-release': 'str', '*kernel-version': 'str',
  1452. '*machine': 'str', '*id': 'str', '*name': 'str',
  1453. '*pretty-name': 'str', '*version': 'str', '*version-id': 'str',
  1454. '*variant': 'str', '*variant-id': 'str' } }
  1455. ##
  1456. # @guest-get-osinfo:
  1457. #
  1458. # Retrieve guest operating system information
  1459. #
  1460. # Returns: @GuestOSInfo
  1461. #
  1462. # Since: 2.10
  1463. ##
  1464. { 'command': 'guest-get-osinfo',
  1465. 'returns': 'GuestOSInfo' }
  1466. ##
  1467. # @GuestDeviceType:
  1468. #
  1469. # @pci: PCI device
  1470. ##
  1471. { 'enum': 'GuestDeviceType',
  1472. 'data': [ 'pci' ],
  1473. 'if': 'CONFIG_WIN32' }
  1474. ##
  1475. # @GuestDeviceIdPCI:
  1476. #
  1477. # @vendor-id: vendor ID
  1478. #
  1479. # @device-id: device ID
  1480. #
  1481. # Since: 5.2
  1482. ##
  1483. { 'struct': 'GuestDeviceIdPCI',
  1484. 'data': { 'vendor-id': 'uint16', 'device-id': 'uint16' },
  1485. 'if': 'CONFIG_WIN32' }
  1486. ##
  1487. # @GuestDeviceId:
  1488. #
  1489. # Id of the device
  1490. #
  1491. # @type: device type
  1492. #
  1493. # Since: 5.2
  1494. ##
  1495. { 'union': 'GuestDeviceId',
  1496. 'base': { 'type': 'GuestDeviceType' },
  1497. 'discriminator': 'type',
  1498. 'data': { 'pci': 'GuestDeviceIdPCI' },
  1499. 'if': 'CONFIG_WIN32' }
  1500. ##
  1501. # @GuestDeviceInfo:
  1502. #
  1503. # @driver-name: name of the associated driver
  1504. #
  1505. # @driver-date: driver release date, in nanoseconds since the epoch
  1506. #
  1507. # @driver-version: driver version
  1508. #
  1509. # @id: device ID
  1510. #
  1511. # Since: 5.2
  1512. ##
  1513. { 'struct': 'GuestDeviceInfo',
  1514. 'data': {
  1515. 'driver-name': 'str',
  1516. '*driver-date': 'int',
  1517. '*driver-version': 'str',
  1518. '*id': 'GuestDeviceId'
  1519. },
  1520. 'if': 'CONFIG_WIN32' }
  1521. ##
  1522. # @guest-get-devices:
  1523. #
  1524. # Retrieve information about device drivers in Windows guest
  1525. #
  1526. # Returns: @GuestDeviceInfo
  1527. #
  1528. # Since: 5.2
  1529. ##
  1530. { 'command': 'guest-get-devices',
  1531. 'returns': ['GuestDeviceInfo'],
  1532. 'if': 'CONFIG_WIN32' }
  1533. ##
  1534. # @GuestAuthorizedKeys:
  1535. #
  1536. # @keys: public keys (in OpenSSH/sshd(8) authorized_keys format)
  1537. #
  1538. # Since: 5.2
  1539. ##
  1540. { 'struct': 'GuestAuthorizedKeys',
  1541. 'data': {
  1542. 'keys': ['str']
  1543. }
  1544. }
  1545. ##
  1546. # @guest-ssh-get-authorized-keys:
  1547. #
  1548. # Return the public keys from user .ssh/authorized_keys on Unix
  1549. # systems (not implemented for other systems).
  1550. #
  1551. # @username: the user account to add the authorized keys
  1552. #
  1553. # Returns: @GuestAuthorizedKeys
  1554. #
  1555. # Since: 5.2
  1556. ##
  1557. { 'command': 'guest-ssh-get-authorized-keys',
  1558. 'data': { 'username': 'str' },
  1559. 'returns': 'GuestAuthorizedKeys'
  1560. }
  1561. ##
  1562. # @guest-ssh-add-authorized-keys:
  1563. #
  1564. # Append public keys to user .ssh/authorized_keys on Unix systems (not
  1565. # implemented for other systems).
  1566. #
  1567. # @username: the user account to add the authorized keys
  1568. #
  1569. # @keys: the public keys to add (in OpenSSH/sshd(8) authorized_keys
  1570. # format)
  1571. #
  1572. # @reset: ignore the existing content, set it with the given keys only
  1573. #
  1574. # Since: 5.2
  1575. ##
  1576. { 'command': 'guest-ssh-add-authorized-keys',
  1577. 'data': { 'username': 'str', 'keys': ['str'], '*reset': 'bool' }
  1578. }
  1579. ##
  1580. # @guest-ssh-remove-authorized-keys:
  1581. #
  1582. # Remove public keys from the user .ssh/authorized_keys on Unix
  1583. # systems (not implemented for other systems). It's not an error if
  1584. # the key is already missing.
  1585. #
  1586. # @username: the user account to remove the authorized keys
  1587. #
  1588. # @keys: the public keys to remove (in OpenSSH/sshd(8) authorized_keys
  1589. # format)
  1590. #
  1591. # Since: 5.2
  1592. ##
  1593. { 'command': 'guest-ssh-remove-authorized-keys',
  1594. 'data': { 'username': 'str', 'keys': ['str'] }
  1595. }
  1596. ##
  1597. # @GuestDiskStats:
  1598. #
  1599. # @read-sectors: sectors read
  1600. #
  1601. # @read-ios: reads completed successfully
  1602. #
  1603. # @read-merges: read requests merged
  1604. #
  1605. # @write-sectors: sectors written
  1606. #
  1607. # @write-ios: writes completed
  1608. #
  1609. # @write-merges: write requests merged
  1610. #
  1611. # @discard-sectors: sectors discarded
  1612. #
  1613. # @discard-ios: discards completed successfully
  1614. #
  1615. # @discard-merges: discard requests merged
  1616. #
  1617. # @flush-ios: flush requests completed successfully
  1618. #
  1619. # @read-ticks: time spent reading(ms)
  1620. #
  1621. # @write-ticks: time spent writing(ms)
  1622. #
  1623. # @discard-ticks: time spent discarding(ms)
  1624. #
  1625. # @flush-ticks: time spent flushing(ms)
  1626. #
  1627. # @ios-pgr: number of I/Os currently in flight
  1628. #
  1629. # @total-ticks: time spent doing I/Os (ms)
  1630. #
  1631. # @weight-ticks: weighted time spent doing I/Os since the last update
  1632. # of this field(ms)
  1633. #
  1634. # Since: 7.1
  1635. ##
  1636. { 'struct': 'GuestDiskStats',
  1637. 'data': {'*read-sectors': 'uint64',
  1638. '*read-ios': 'uint64',
  1639. '*read-merges': 'uint64',
  1640. '*write-sectors': 'uint64',
  1641. '*write-ios': 'uint64',
  1642. '*write-merges': 'uint64',
  1643. '*discard-sectors': 'uint64',
  1644. '*discard-ios': 'uint64',
  1645. '*discard-merges': 'uint64',
  1646. '*flush-ios': 'uint64',
  1647. '*read-ticks': 'uint64',
  1648. '*write-ticks': 'uint64',
  1649. '*discard-ticks': 'uint64',
  1650. '*flush-ticks': 'uint64',
  1651. '*ios-pgr': 'uint64',
  1652. '*total-ticks': 'uint64',
  1653. '*weight-ticks': 'uint64'
  1654. },
  1655. 'if': 'CONFIG_LINUX' }
  1656. ##
  1657. # @GuestDiskStatsInfo:
  1658. #
  1659. # @name: disk name
  1660. #
  1661. # @major: major device number of disk
  1662. #
  1663. # @minor: minor device number of disk
  1664. #
  1665. # @stats: I/O statistics
  1666. ##
  1667. { 'struct': 'GuestDiskStatsInfo',
  1668. 'data': {'name': 'str',
  1669. 'major': 'uint64',
  1670. 'minor': 'uint64',
  1671. 'stats': 'GuestDiskStats' },
  1672. 'if': 'CONFIG_LINUX' }
  1673. ##
  1674. # @guest-get-diskstats:
  1675. #
  1676. # Retrieve information about disk stats.
  1677. #
  1678. # Returns: List of disk stats of guest.
  1679. #
  1680. # Since: 7.1
  1681. ##
  1682. { 'command': 'guest-get-diskstats',
  1683. 'returns': ['GuestDiskStatsInfo'],
  1684. 'if': 'CONFIG_LINUX'
  1685. }
  1686. ##
  1687. # @GuestCpuStatsType:
  1688. #
  1689. # Guest operating systems supporting CPU statistics
  1690. #
  1691. # @linux: Linux
  1692. #
  1693. # Since: 7.1
  1694. ##
  1695. { 'enum': 'GuestCpuStatsType',
  1696. 'data': [ 'linux' ],
  1697. 'if': 'CONFIG_LINUX' }
  1698. ##
  1699. # @GuestLinuxCpuStats:
  1700. #
  1701. # CPU statistics of Linux
  1702. #
  1703. # @cpu: CPU index in guest OS
  1704. #
  1705. # @user: Time spent in user mode
  1706. #
  1707. # @nice: Time spent in user mode with low priority (nice)
  1708. #
  1709. # @system: Time spent in system mode
  1710. #
  1711. # @idle: Time spent in the idle task
  1712. #
  1713. # @iowait: Time waiting for I/O to complete (since Linux 2.5.41)
  1714. #
  1715. # @irq: Time servicing interrupts (since Linux 2.6.0-test4)
  1716. #
  1717. # @softirq: Time servicing softirqs (since Linux 2.6.0-test4)
  1718. #
  1719. # @steal: Stolen time by host (since Linux 2.6.11)
  1720. #
  1721. # @guest: ime spent running a virtual CPU for guest operating systems
  1722. # under the control of the Linux kernel (since Linux 2.6.24)
  1723. #
  1724. # @guestnice: Time spent running a niced guest (since Linux 2.6.33)
  1725. #
  1726. # Since: 7.1
  1727. ##
  1728. { 'struct': 'GuestLinuxCpuStats',
  1729. 'data': {'cpu': 'int',
  1730. 'user': 'uint64',
  1731. 'nice': 'uint64',
  1732. 'system': 'uint64',
  1733. 'idle': 'uint64',
  1734. '*iowait': 'uint64',
  1735. '*irq': 'uint64',
  1736. '*softirq': 'uint64',
  1737. '*steal': 'uint64',
  1738. '*guest': 'uint64',
  1739. '*guestnice': 'uint64'
  1740. },
  1741. 'if': 'CONFIG_LINUX' }
  1742. ##
  1743. # @GuestCpuStats:
  1744. #
  1745. # Get statistics of each CPU in millisecond.
  1746. #
  1747. # @type: guest operating system
  1748. #
  1749. # Since: 7.1
  1750. ##
  1751. { 'union': 'GuestCpuStats',
  1752. 'base': { 'type': 'GuestCpuStatsType' },
  1753. 'discriminator': 'type',
  1754. 'data': { 'linux': 'GuestLinuxCpuStats' },
  1755. 'if': 'CONFIG_LINUX' }
  1756. ##
  1757. # @guest-get-cpustats:
  1758. #
  1759. # Retrieve information about CPU stats.
  1760. #
  1761. # Returns: List of CPU stats of guest.
  1762. #
  1763. # Since: 7.1
  1764. ##
  1765. { 'command': 'guest-get-cpustats',
  1766. 'returns': ['GuestCpuStats'],
  1767. 'if': 'CONFIG_LINUX'
  1768. }
  1769. ##
  1770. # @GuestLoadAverage:
  1771. #
  1772. # Statistics about process load information
  1773. #
  1774. # @load1m: 1-minute load avage
  1775. #
  1776. # @load5m: 5-minute load avage
  1777. #
  1778. # @load15m: 15-minute load avage
  1779. #
  1780. # Since: 10.0
  1781. ##
  1782. { 'struct': 'GuestLoadAverage',
  1783. 'data': {
  1784. 'load1m': 'number',
  1785. 'load5m': 'number',
  1786. 'load15m': 'number'
  1787. },
  1788. 'if': 'CONFIG_GETLOADAVG'
  1789. }
  1790. ##
  1791. # @guest-get-load:
  1792. #
  1793. # Retrieve CPU process load information
  1794. #
  1795. # Returns: load information
  1796. #
  1797. # Since: 10.0
  1798. ##
  1799. { 'command': 'guest-get-load',
  1800. 'returns': 'GuestLoadAverage',
  1801. 'if': 'CONFIG_GETLOADAVG'
  1802. }
  1803. ##
  1804. # @GuestNetworkRoute:
  1805. #
  1806. # Route information, currently, only linux supported.
  1807. #
  1808. # @iface: The destination network or host's egress network interface in the routing table
  1809. #
  1810. # @destination: The IP address of the target network or host, The final destination of the packet
  1811. #
  1812. # @metric: Route metric
  1813. #
  1814. # @gateway: The IP address of the next hop router
  1815. #
  1816. # @mask: Subnet Mask (IPv4 only)
  1817. #
  1818. # @irtt: Initial round-trip delay (not for windows, IPv4 only)
  1819. #
  1820. # @flags: Route flags (not for windows)
  1821. #
  1822. # @refcnt: The route's reference count (not for windows)
  1823. #
  1824. # @use: Route usage count (not for windows)
  1825. #
  1826. # @window: TCP window size, used for flow control (not for windows, IPv4 only)
  1827. #
  1828. # @mtu: Data link layer maximum packet size (not for windows)
  1829. #
  1830. # @desprefixlen: Destination prefix length (for IPv6)
  1831. #
  1832. # @source: Source IP address (for IPv6)
  1833. #
  1834. # @srcprefixlen: Source prefix length (for IPv6)
  1835. #
  1836. # @nexthop: Next hop IP address (for IPv6)
  1837. #
  1838. # @version: IP version (4 or 6)
  1839. #
  1840. # Since: 9.1
  1841. ##
  1842. { 'struct': 'GuestNetworkRoute',
  1843. 'data': {'iface': 'str',
  1844. 'destination': 'str',
  1845. 'metric': 'int',
  1846. '*gateway': 'str',
  1847. '*mask': 'str',
  1848. '*irtt': 'int',
  1849. '*flags': 'uint64',
  1850. '*refcnt': 'int',
  1851. '*use': 'int',
  1852. '*window': 'int',
  1853. '*mtu': 'int',
  1854. '*desprefixlen': 'str',
  1855. '*source': 'str',
  1856. '*srcprefixlen': 'str',
  1857. '*nexthop': 'str',
  1858. 'version': 'int'
  1859. },
  1860. 'if': 'CONFIG_LINUX' }
  1861. ##
  1862. # @guest-network-get-route:
  1863. #
  1864. # Retrieve information about route of network.
  1865. # Returns: List of route info of guest.
  1866. #
  1867. # Since: 9.1
  1868. ##
  1869. { 'command': 'guest-network-get-route',
  1870. 'returns': ['GuestNetworkRoute'],
  1871. 'if': 'CONFIG_LINUX'
  1872. }