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 # This command is multiple commands multiplexed together.
246 # @device: This is normally the name of a block device but it may also be 'vnc'.
247 # when it's 'vnc', then sub command depends on @target
249 # @target: If @device is a block device, then this is the new filename.
250 # If @device is 'vnc', then if the value 'password' selects the vnc
251 # change password command. Otherwise, this specifies a new server URI
252 # address to listen to for VNC connections.
254 # @arg: If @device is a block device, then this is an optional format to open
256 # If @device is 'vnc' and @target is 'password', this is the new VNC
257 # password to set. See change-vnc-password for additional notes.
260 # @deprecated: This command is deprecated. For changing block
261 # devices, use 'blockdev-change-medium' instead; for changing VNC
262 # parameters, use 'change-vnc-password' instead.
264 # Returns: - Nothing on success.
265 # - If @device is not a valid block device, DeviceNotFound
271 # 1. Change a removable medium
273 # -> { "execute": "change",
274 # "arguments": { "device": "ide1-cd0",
275 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
276 # <- { "return": {} }
278 # 2. Change VNC password
280 # -> { "execute": "change",
281 # "arguments": { "device": "vnc", "target": "password",
282 # "arg": "foobar1" } }
283 # <- { "return": {} }
286 { 'command': 'change',
287 'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
288 'features': [ 'deprecated' ] }
293 # Receive a file descriptor via SCM rights and assign it a name
295 # @fdname: file descriptor name
297 # Returns: Nothing on success
301 # Notes: If @fdname already exists, the file descriptor assigned to
302 # it will be closed and replaced by the received file
305 # The 'closefd' command can be used to explicitly close the
306 # file descriptor when it is no longer needed.
310 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
311 # <- { "return": {} }
314 { 'command': 'getfd', 'data': {'fdname': 'str'} }
319 # Close a file descriptor previously passed via SCM rights
321 # @fdname: file descriptor name
323 # Returns: Nothing on success
329 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
330 # <- { "return": {} }
333 { 'command': 'closefd', 'data': {'fdname': 'str'} }
338 # Information about a file descriptor that was added to an fd set.
340 # @fdset-id: The ID of the fd set that @fd was added to.
342 # @fd: The file descriptor that was received via SCM rights and
343 # added to the fd set.
347 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
352 # Add a file descriptor, that was passed via SCM rights, to an fd set.
354 # @fdset-id: The ID of the fd set to add the file descriptor to.
356 # @opaque: A free-form string that can be used to describe the fd.
358 # Returns: - @AddfdInfo on success
359 # - If file descriptor was not received, FdNotSupplied
360 # - If @fdset-id is a negative value, InvalidParameterValue
362 # Notes: The list of fd sets is shared by all monitor connections.
364 # If @fdset-id is not specified, a new fd set will be created.
370 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
371 # <- { "return": { "fdset-id": 1, "fd": 3 } }
374 { 'command': 'add-fd',
375 'data': { '*fdset-id': 'int',
377 'returns': 'AddfdInfo' }
382 # Remove a file descriptor from an fd set.
384 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
386 # @fd: The file descriptor that is to be removed.
388 # Returns: - Nothing on success
389 # - If @fdset-id or @fd is not found, FdNotFound
393 # Notes: The list of fd sets is shared by all monitor connections.
395 # If @fd is not specified, all file descriptors in @fdset-id
400 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
401 # <- { "return": {} }
404 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
409 # Information about a file descriptor that belongs to an fd set.
411 # @fd: The file descriptor value.
413 # @opaque: A free-form string that can be used to describe the fd.
417 { 'struct': 'FdsetFdInfo',
418 'data': {'fd': 'int', '*opaque': 'str'} }
423 # Information about an fd set.
425 # @fdset-id: The ID of the fd set.
427 # @fds: A list of file descriptors that belong to this fd set.
431 { 'struct': 'FdsetInfo',
432 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
437 # Return information describing all fd sets.
439 # Returns: A list of @FdsetInfo
443 # Note: The list of fd sets is shared by all monitor connections.
447 # -> { "execute": "query-fdsets" }
453 # "opaque": "rdonly:/path/to/file"
457 # "opaque": "rdwr:/path/to/file"
477 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
480 # @CommandLineParameterType:
482 # Possible types for an option parameter.
484 # @string: accepts a character string
486 # @boolean: accepts "on" or "off"
488 # @number: accepts a number
490 # @size: accepts a number followed by an optional suffix (K)ilo,
491 # (M)ega, (G)iga, (T)era
495 { 'enum': 'CommandLineParameterType',
496 'data': ['string', 'boolean', 'number', 'size'] }
499 # @CommandLineParameterInfo:
501 # Details about a single parameter of a command line option.
503 # @name: parameter name
505 # @type: parameter @CommandLineParameterType
507 # @help: human readable text string, not suitable for parsing.
509 # @default: default value string (since 2.1)
513 { 'struct': 'CommandLineParameterInfo',
514 'data': { 'name': 'str',
515 'type': 'CommandLineParameterType',
517 '*default': 'str' } }
520 # @CommandLineOptionInfo:
522 # Details about a command line option, including its list of parameter details
524 # @option: option name
526 # @parameters: an array of @CommandLineParameterInfo
530 { 'struct': 'CommandLineOptionInfo',
531 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
534 # @query-command-line-options:
536 # Query command line option schema.
538 # @option: option name
540 # Returns: list of @CommandLineOptionInfo for all options (or for the given
541 # @option). Returns an error if the given @option doesn't exist.
547 # -> { "execute": "query-command-line-options",
548 # "arguments": { "option": "option-rom" } }
557 # "name": "bootindex",
561 # "option": "option-rom"
567 {'command': 'query-command-line-options',
568 'data': { '*option': 'str' },
569 'returns': ['CommandLineOptionInfo'],
570 'allow-preconfig': true }