9 { 'include': 'common.json' }
14 # Allow client connections for VNC, Spice and socket based
15 # character devices to be passed in to QEMU via SCM_RIGHTS.
17 # @protocol: protocol name. Valid names are "vnc", "spice" or the
18 # name of a character device (eg. from -chardev id=XXXX)
20 # @fdname: file descriptor name previously passed via 'getfd' command
22 # @skipauth: whether to skip authentication. Only applies
23 # to "vnc" and "spice" protocols
25 # @tls: whether to perform TLS. Only applies to the "spice"
28 # Returns: nothing on success.
34 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
35 # "fdname": "myclient" } }
39 { 'command': 'add_client',
40 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
46 # Guest name information.
48 # @name: The name of the guest
52 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
57 # Return the name information of a guest.
59 # Returns: @NameInfo of the guest
65 # -> { "execute": "query-name" }
66 # <- { "return": { "name": "qemu-name" } }
69 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
74 # Information about an iothread
76 # @id: the identifier of the iothread
78 # @thread-id: ID of the underlying host thread
80 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
83 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
84 # configured (since 2.9)
86 # @poll-shrink: how many ns will be removed from polling time, 0 means that
87 # it's not configured (since 2.9)
91 { 'struct': 'IOThreadInfo',
96 'poll-shrink': 'int' } }
101 # Returns a list of information about each iothread.
103 # Note: this list excludes the QEMU main loop thread, which is not declared
104 # using the -object iothread command-line option. It is always the main thread
107 # Returns: a list of @IOThreadInfo for each iothread
113 # -> { "execute": "query-iothreads" }
127 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
128 'allow-preconfig': true }
133 # Stop all guest VCPU execution.
137 # Notes: This function will succeed even if the guest is already in the stopped
138 # state. In "inmigrate" state, it will ensure that the guest
139 # remains paused once migration finishes, as if the -S option was
140 # passed on the command line.
144 # -> { "execute": "stop" }
145 # <- { "return": {} }
148 { 'command': 'stop' }
153 # Resume guest VCPU execution.
157 # Returns: If successful, nothing
159 # Notes: This command will succeed if the guest is currently running. It
160 # will also succeed if the guest is in the "inmigrate" state; in
161 # this case, the effect of the command is to make sure the guest
162 # starts once migration finishes, removing the effect of the -S
163 # command line option if it was passed.
167 # -> { "execute": "cont" }
168 # <- { "return": {} }
171 { 'command': 'cont' }
176 # Exit from "preconfig" state
178 # This command makes QEMU exit the preconfig state and proceed with
179 # VM initialization using configuration data provided on the command line
180 # and via the QMP monitor during the preconfig state. The command is only
181 # available during the preconfig state (i.e. when the --preconfig command
182 # line option was in use).
190 # -> { "execute": "x-exit-preconfig" }
191 # <- { "return": {} }
194 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
197 # @human-monitor-command:
199 # Execute a command on the human monitor and return the output.
201 # @command-line: the command to execute in the human monitor
203 # @cpu-index: The CPU to use for commands that require an implicit CPU
206 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
207 # monitor-owned nodes if they have no parents.
208 # This allows the use of 'savevm' with
209 # -blockdev. (since 4.2)
211 # Returns: the output of the command as a string
215 # Notes: This command only exists as a stop-gap. Its use is highly
216 # discouraged. The semantics of this command are not
217 # guaranteed: this means that command names, arguments and
218 # responses can change or be removed at ANY time. Applications
219 # that rely on long term stability guarantees should NOT
224 # * This command is stateless, this means that commands that depend
225 # on state information (such as getfd) might not work
227 # * Commands that prompt the user for data don't currently work
231 # -> { "execute": "human-monitor-command",
232 # "arguments": { "command-line": "info kvm" } }
233 # <- { "return": "kvm support: enabled\r\n" }
236 { 'command': 'human-monitor-command',
237 'data': {'command-line': 'str', '*cpu-index': 'int'},
239 'features': [ 'savevm-monitor-nodes' ] }
244 # Receive a file descriptor via SCM rights and assign it a name
246 # @fdname: file descriptor name
248 # Returns: Nothing on success
252 # Notes: If @fdname already exists, the file descriptor assigned to
253 # it will be closed and replaced by the received file
256 # The 'closefd' command can be used to explicitly close the
257 # file descriptor when it is no longer needed.
261 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
262 # <- { "return": {} }
265 { 'command': 'getfd', 'data': {'fdname': 'str'} }
270 # Close a file descriptor previously passed via SCM rights
272 # @fdname: file descriptor name
274 # Returns: Nothing on success
280 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
281 # <- { "return": {} }
284 { 'command': 'closefd', 'data': {'fdname': 'str'} }
289 # Information about a file descriptor that was added to an fd set.
291 # @fdset-id: The ID of the fd set that @fd was added to.
293 # @fd: The file descriptor that was received via SCM rights and
294 # added to the fd set.
298 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
303 # Add a file descriptor, that was passed via SCM rights, to an fd set.
305 # @fdset-id: The ID of the fd set to add the file descriptor to.
307 # @opaque: A free-form string that can be used to describe the fd.
309 # Returns: - @AddfdInfo on success
310 # - If file descriptor was not received, FdNotSupplied
311 # - If @fdset-id is a negative value, InvalidParameterValue
313 # Notes: The list of fd sets is shared by all monitor connections.
315 # If @fdset-id is not specified, a new fd set will be created.
321 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
322 # <- { "return": { "fdset-id": 1, "fd": 3 } }
325 { 'command': 'add-fd',
326 'data': { '*fdset-id': 'int',
328 'returns': 'AddfdInfo' }
333 # Remove a file descriptor from an fd set.
335 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
337 # @fd: The file descriptor that is to be removed.
339 # Returns: - Nothing on success
340 # - If @fdset-id or @fd is not found, FdNotFound
344 # Notes: The list of fd sets is shared by all monitor connections.
346 # If @fd is not specified, all file descriptors in @fdset-id
351 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
352 # <- { "return": {} }
355 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
360 # Information about a file descriptor that belongs to an fd set.
362 # @fd: The file descriptor value.
364 # @opaque: A free-form string that can be used to describe the fd.
368 { 'struct': 'FdsetFdInfo',
369 'data': {'fd': 'int', '*opaque': 'str'} }
374 # Information about an fd set.
376 # @fdset-id: The ID of the fd set.
378 # @fds: A list of file descriptors that belong to this fd set.
382 { 'struct': 'FdsetInfo',
383 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
388 # Return information describing all fd sets.
390 # Returns: A list of @FdsetInfo
394 # Note: The list of fd sets is shared by all monitor connections.
398 # -> { "execute": "query-fdsets" }
404 # "opaque": "rdonly:/path/to/file"
408 # "opaque": "rdwr:/path/to/file"
428 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
431 # @CommandLineParameterType:
433 # Possible types for an option parameter.
435 # @string: accepts a character string
437 # @boolean: accepts "on" or "off"
439 # @number: accepts a number
441 # @size: accepts a number followed by an optional suffix (K)ilo,
442 # (M)ega, (G)iga, (T)era
446 { 'enum': 'CommandLineParameterType',
447 'data': ['string', 'boolean', 'number', 'size'] }
450 # @CommandLineParameterInfo:
452 # Details about a single parameter of a command line option.
454 # @name: parameter name
456 # @type: parameter @CommandLineParameterType
458 # @help: human readable text string, not suitable for parsing.
460 # @default: default value string (since 2.1)
464 { 'struct': 'CommandLineParameterInfo',
465 'data': { 'name': 'str',
466 'type': 'CommandLineParameterType',
468 '*default': 'str' } }
471 # @CommandLineOptionInfo:
473 # Details about a command line option, including its list of parameter details
475 # @option: option name
477 # @parameters: an array of @CommandLineParameterInfo
481 { 'struct': 'CommandLineOptionInfo',
482 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
485 # @query-command-line-options:
487 # Query command line option schema.
489 # @option: option name
491 # Returns: list of @CommandLineOptionInfo for all options (or for the given
492 # @option). Returns an error if the given @option doesn't exist.
498 # -> { "execute": "query-command-line-options",
499 # "arguments": { "option": "option-rom" } }
508 # "name": "bootindex",
512 # "option": "option-rom"
518 {'command': 'query-command-line-options',
519 'data': { '*option': 'str' },
520 'returns': ['CommandLineOptionInfo'],
521 'allow-preconfig': true }