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 support for KVM acceleration
76 # @enabled: true if KVM acceleration is active
78 # @present: true if KVM acceleration is built into this executable
82 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
87 # Returns information about KVM acceleration
95 # -> { "execute": "query-kvm" }
96 # <- { "return": { "enabled": true, "present": true } }
99 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
104 # Information about an iothread
106 # @id: the identifier of the iothread
108 # @thread-id: ID of the underlying host thread
110 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
113 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
114 # configured (since 2.9)
116 # @poll-shrink: how many ns will be removed from polling time, 0 means that
117 # it's not configured (since 2.9)
121 { 'struct': 'IOThreadInfo',
122 'data': {'id': 'str',
124 'poll-max-ns': 'int',
126 'poll-shrink': 'int' } }
131 # Returns a list of information about each iothread.
133 # Note: this list excludes the QEMU main loop thread, which is not declared
134 # using the -object iothread command-line option. It is always the main thread
137 # Returns: a list of @IOThreadInfo for each iothread
143 # -> { "execute": "query-iothreads" }
157 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
158 'allow-preconfig': true }
163 # Stop all guest VCPU execution.
167 # Notes: This function will succeed even if the guest is already in the stopped
168 # state. In "inmigrate" state, it will ensure that the guest
169 # remains paused once migration finishes, as if the -S option was
170 # passed on the command line.
174 # -> { "execute": "stop" }
175 # <- { "return": {} }
178 { 'command': 'stop' }
183 # Performs a hard reset of a guest.
189 # -> { "execute": "system_reset" }
190 # <- { "return": {} }
193 { 'command': 'system_reset' }
198 # Requests that a guest perform a powerdown operation.
202 # Notes: A guest may or may not respond to this command. This command
203 # returning does not indicate that a guest has accepted the request or
204 # that it has shut down. Many guests will respond to this command by
205 # prompting the user in some way.
208 # -> { "execute": "system_powerdown" }
209 # <- { "return": {} }
212 { 'command': 'system_powerdown' }
217 # Save a portion of guest memory to a file.
219 # @val: the virtual address of the guest to start from
221 # @size: the size of memory region to save
223 # @filename: the file to save the memory to as binary data
225 # @cpu-index: the index of the virtual CPU to use for translating the
226 # virtual address (defaults to CPU 0)
228 # Returns: Nothing on success
232 # Notes: Errors were not reliably returned until 1.1
236 # -> { "execute": "memsave",
237 # "arguments": { "val": 10,
239 # "filename": "/tmp/virtual-mem-dump" } }
240 # <- { "return": {} }
243 { 'command': 'memsave',
244 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
249 # Save a portion of guest physical memory to a file.
251 # @val: the physical address of the guest to start from
253 # @size: the size of memory region to save
255 # @filename: the file to save the memory to as binary data
257 # Returns: Nothing on success
261 # Notes: Errors were not reliably returned until 1.1
265 # -> { "execute": "pmemsave",
266 # "arguments": { "val": 10,
268 # "filename": "/tmp/physical-mem-dump" } }
269 # <- { "return": {} }
272 { 'command': 'pmemsave',
273 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
278 # Resume guest VCPU execution.
282 # Returns: If successful, nothing
284 # Notes: This command will succeed if the guest is currently running. It
285 # will also succeed if the guest is in the "inmigrate" state; in
286 # this case, the effect of the command is to make sure the guest
287 # starts once migration finishes, removing the effect of the -S
288 # command line option if it was passed.
292 # -> { "execute": "cont" }
293 # <- { "return": {} }
296 { 'command': 'cont' }
301 # Exit from "preconfig" state
303 # This command makes QEMU exit the preconfig state and proceed with
304 # VM initialization using configuration data provided on the command line
305 # and via the QMP monitor during the preconfig state. The command is only
306 # available during the preconfig state (i.e. when the --preconfig command
307 # line option was in use).
315 # -> { "execute": "x-exit-preconfig" }
316 # <- { "return": {} }
319 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
324 # Wake up guest from suspend. If the guest has wake-up from suspend
325 # support enabled (wakeup-suspend-support flag from
326 # query-current-machine), wake-up guest from suspend if the guest is
327 # in SUSPENDED state. Return an error otherwise.
333 # Note: prior to 4.0, this command does nothing in case the guest
338 # -> { "execute": "system_wakeup" }
339 # <- { "return": {} }
342 { 'command': 'system_wakeup' }
347 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
348 # The command fails when the guest doesn't support injecting.
350 # Returns: If successful, nothing
354 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
358 # -> { "execute": "inject-nmi" }
359 # <- { "return": {} }
362 { 'command': 'inject-nmi' }
365 # @human-monitor-command:
367 # Execute a command on the human monitor and return the output.
369 # @command-line: the command to execute in the human monitor
371 # @cpu-index: The CPU to use for commands that require an implicit CPU
374 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
375 # monitor-owned nodes if they have no parents.
376 # This allows the use of 'savevm' with
377 # -blockdev. (since 4.2)
379 # Returns: the output of the command as a string
383 # Notes: This command only exists as a stop-gap. Its use is highly
384 # discouraged. The semantics of this command are not
385 # guaranteed: this means that command names, arguments and
386 # responses can change or be removed at ANY time. Applications
387 # that rely on long term stability guarantees should NOT
392 # * This command is stateless, this means that commands that depend
393 # on state information (such as getfd) might not work
395 # * Commands that prompt the user for data don't currently work
399 # -> { "execute": "human-monitor-command",
400 # "arguments": { "command-line": "info kvm" } }
401 # <- { "return": "kvm support: enabled\r\n" }
404 { 'command': 'human-monitor-command',
405 'data': {'command-line': 'str', '*cpu-index': 'int'},
407 'features': [ 'savevm-monitor-nodes' ] }
412 # This command is multiple commands multiplexed together.
414 # @device: This is normally the name of a block device but it may also be 'vnc'.
415 # when it's 'vnc', then sub command depends on @target
417 # @target: If @device is a block device, then this is the new filename.
418 # If @device is 'vnc', then if the value 'password' selects the vnc
419 # change password command. Otherwise, this specifies a new server URI
420 # address to listen to for VNC connections.
422 # @arg: If @device is a block device, then this is an optional format to open
424 # If @device is 'vnc' and @target is 'password', this is the new VNC
425 # password to set. See change-vnc-password for additional notes.
428 # @deprecated: This command is deprecated. For changing block
429 # devices, use 'blockdev-change-medium' instead; for changing VNC
430 # parameters, use 'change-vnc-password' instead.
432 # Returns: - Nothing on success.
433 # - If @device is not a valid block device, DeviceNotFound
439 # 1. Change a removable medium
441 # -> { "execute": "change",
442 # "arguments": { "device": "ide1-cd0",
443 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
444 # <- { "return": {} }
446 # 2. Change VNC password
448 # -> { "execute": "change",
449 # "arguments": { "device": "vnc", "target": "password",
450 # "arg": "foobar1" } }
451 # <- { "return": {} }
454 { 'command': 'change',
455 'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
456 'features': [ 'deprecated' ] }
459 # @xen-set-global-dirty-log:
461 # Enable or disable the global dirty log mode.
463 # @enable: true to enable, false to disable.
471 # -> { "execute": "xen-set-global-dirty-log",
472 # "arguments": { "enable": true } }
473 # <- { "return": {} }
476 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
481 # Receive a file descriptor via SCM rights and assign it a name
483 # @fdname: file descriptor name
485 # Returns: Nothing on success
489 # Notes: If @fdname already exists, the file descriptor assigned to
490 # it will be closed and replaced by the received file
493 # The 'closefd' command can be used to explicitly close the
494 # file descriptor when it is no longer needed.
498 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
499 # <- { "return": {} }
502 { 'command': 'getfd', 'data': {'fdname': 'str'} }
507 # Close a file descriptor previously passed via SCM rights
509 # @fdname: file descriptor name
511 # Returns: Nothing on success
517 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
518 # <- { "return": {} }
521 { 'command': 'closefd', 'data': {'fdname': 'str'} }
526 # Information about a file descriptor that was added to an fd set.
528 # @fdset-id: The ID of the fd set that @fd was added to.
530 # @fd: The file descriptor that was received via SCM rights and
531 # added to the fd set.
535 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
540 # Add a file descriptor, that was passed via SCM rights, to an fd set.
542 # @fdset-id: The ID of the fd set to add the file descriptor to.
544 # @opaque: A free-form string that can be used to describe the fd.
546 # Returns: - @AddfdInfo on success
547 # - If file descriptor was not received, FdNotSupplied
548 # - If @fdset-id is a negative value, InvalidParameterValue
550 # Notes: The list of fd sets is shared by all monitor connections.
552 # If @fdset-id is not specified, a new fd set will be created.
558 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
559 # <- { "return": { "fdset-id": 1, "fd": 3 } }
562 { 'command': 'add-fd',
563 'data': { '*fdset-id': 'int',
565 'returns': 'AddfdInfo' }
570 # Remove a file descriptor from an fd set.
572 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
574 # @fd: The file descriptor that is to be removed.
576 # Returns: - Nothing on success
577 # - If @fdset-id or @fd is not found, FdNotFound
581 # Notes: The list of fd sets is shared by all monitor connections.
583 # If @fd is not specified, all file descriptors in @fdset-id
588 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
589 # <- { "return": {} }
592 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
597 # Information about a file descriptor that belongs to an fd set.
599 # @fd: The file descriptor value.
601 # @opaque: A free-form string that can be used to describe the fd.
605 { 'struct': 'FdsetFdInfo',
606 'data': {'fd': 'int', '*opaque': 'str'} }
611 # Information about an fd set.
613 # @fdset-id: The ID of the fd set.
615 # @fds: A list of file descriptors that belong to this fd set.
619 { 'struct': 'FdsetInfo',
620 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
625 # Return information describing all fd sets.
627 # Returns: A list of @FdsetInfo
631 # Note: The list of fd sets is shared by all monitor connections.
635 # -> { "execute": "query-fdsets" }
641 # "opaque": "rdonly:/path/to/file"
645 # "opaque": "rdwr:/path/to/file"
665 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
668 # @CommandLineParameterType:
670 # Possible types for an option parameter.
672 # @string: accepts a character string
674 # @boolean: accepts "on" or "off"
676 # @number: accepts a number
678 # @size: accepts a number followed by an optional suffix (K)ilo,
679 # (M)ega, (G)iga, (T)era
683 { 'enum': 'CommandLineParameterType',
684 'data': ['string', 'boolean', 'number', 'size'] }
687 # @CommandLineParameterInfo:
689 # Details about a single parameter of a command line option.
691 # @name: parameter name
693 # @type: parameter @CommandLineParameterType
695 # @help: human readable text string, not suitable for parsing.
697 # @default: default value string (since 2.1)
701 { 'struct': 'CommandLineParameterInfo',
702 'data': { 'name': 'str',
703 'type': 'CommandLineParameterType',
705 '*default': 'str' } }
708 # @CommandLineOptionInfo:
710 # Details about a command line option, including its list of parameter details
712 # @option: option name
714 # @parameters: an array of @CommandLineParameterInfo
718 { 'struct': 'CommandLineOptionInfo',
719 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
722 # @query-command-line-options:
724 # Query command line option schema.
726 # @option: option name
728 # Returns: list of @CommandLineOptionInfo for all options (or for the given
729 # @option). Returns an error if the given @option doesn't exist.
735 # -> { "execute": "query-command-line-options",
736 # "arguments": { "option": "option-rom" } }
745 # "name": "bootindex",
749 # "option": "option-rom"
755 {'command': 'query-command-line-options',
756 'data': { '*option': 'str' },
757 'returns': ['CommandLineOptionInfo'],
758 'allow-preconfig': true }
763 # Mode of the replay subsystem.
765 # @none: normal execution mode. Replay or record are not enabled.
767 # @record: record mode. All non-deterministic data is written into the
770 # @play: replay mode. Non-deterministic data required for system execution
771 # is read from the log.
775 { 'enum': 'ReplayMode',
776 'data': [ 'none', 'record', 'play' ] }
779 # @xen-load-devices-state:
781 # Load the state of all devices from file. The RAM and the block devices
782 # of the VM are not loaded by this command.
784 # @filename: the file to load the state of the devices from as binary
785 # data. See xen-save-devices-state.txt for a description of the binary
792 # -> { "execute": "xen-load-devices-state",
793 # "arguments": { "filename": "/tmp/resume" } }
794 # <- { "return": {} }
797 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }