8 # Guest name information.
10 # @name: #optional The name of the guest
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
19 # Return the name information of a guest.
21 # Returns: @NameInfo of the guest
25 { 'command': 'query-name', 'returns': 'NameInfo' }
30 # A description of QEMU's version.
32 # @qemu.major: The major version of QEMU
34 # @qemu.minor: The minor version of QEMU
36 # @qemu.micro: The micro version of QEMU. By current convention, a micro
37 # version of 50 signifies a development branch. A micro version
38 # greater than or equal to 90 signifies a release candidate for
39 # the next minor version. A micro version of less than 50
40 # signifies a stable release.
42 # @package: QEMU will always set this field to an empty string. Downstream
43 # versions of QEMU should set this to a non-empty string. The
44 # exact format depends on the downstream however it highly
45 # recommended that a unique name is used.
49 { 'type': 'VersionInfo',
50 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
56 # Returns the current version of QEMU.
58 # Returns: A @VersionInfo object describing the current version of QEMU.
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
67 # Information about support for KVM acceleration
69 # @enabled: true if KVM acceleration is active
71 # @present: true if KVM acceleration is built into this executable
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
80 # Returns information about KVM acceleration
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
91 # An enumation of VM run states.
93 # @debug: QEMU is running on a debugger
95 # @inmigrate: guest is paused waiting for an incoming migration
97 # @internal-error: An internal error that prevents further guest execution
100 # @io-error: the last IOP has failed and the device is configured to pause
103 # @paused: guest has been paused via the 'stop' command
105 # @postmigrate: guest is paused following a successful 'migrate'
107 # @prelaunch: QEMU was started with -S and guest has not started
109 # @finish-migrate: guest is paused to finish the migration process
111 # @restore-vm: guest is paused to restore VM state
113 # @running: guest is actively running
115 # @save-vm: guest is paused to save the VM state
117 # @shutdown: guest is shut down (and -no-shutdown is in use)
119 # @watchdog: the watchdog action is configured to pause and has been triggered
121 { 'enum': 'RunState',
122 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
123 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
124 'running', 'save-vm', 'shutdown', 'watchdog' ] }
129 # Information about VCPU run state
131 # @running: true if all VCPUs are runnable, false if not runnable
133 # @singlestep: true if VCPUs are in single-step mode
135 # @status: the virtual machine @RunState
139 # Notes: @singlestep is enabled through the GDB stub
141 { 'type': 'StatusInfo',
142 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
147 # Query the run status of all VCPUs
149 # Returns: @StatusInfo reflecting all VCPUs
153 { 'command': 'query-status', 'returns': 'StatusInfo' }
158 # Guest UUID information.
160 # @UUID: the UUID of the guest
164 # Notes: If no UUID was specified for the guest, a null UUID is returned.
166 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
171 # Query the guest UUID information.
173 # Returns: The @UuidInfo for the guest
177 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
182 # Information about a character device.
184 # @label: the label of the character device
186 # @filename: the filename of the character device
188 # Notes: @filename is encoded using the QEMU command line character device
189 # encoding. See the QEMU man page for details.
193 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
198 # Returns information about current character devices.
200 # Returns: a list of @ChardevInfo
204 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
209 # Information about a QMP command
211 # @name: The command name
215 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
220 # Return a list of supported QMP commands by this server
222 # Returns: A list of @CommandInfo for all supported commands
226 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
231 # Detailed migration status.
233 # @transferred: amount of bytes already transferred to the target VM
235 # @remaining: amount of bytes remaining to be transferred to the target VM
237 # @total: total amount of bytes involved in the migration process
241 { 'type': 'MigrationStats',
242 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
247 # Information about current migration process.
249 # @status: #optional string describing the current migration status.
250 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
251 # 'cancelled'. If this field is not returned, no migration process
254 # @ram: #optional @MigrationStats containing detailed migration status,
255 # only returned if status is 'active'
257 # @disk: #optional @MigrationStats containing detailed disk migration
258 # status, only returned if status is 'active' and it is a block
263 { 'type': 'MigrationInfo',
264 'data': {'*status': 'str', '*ram': 'MigrationStats',
265 '*disk': 'MigrationStats'} }
270 # Returns information about current migration process.
272 # Returns: @MigrationInfo
276 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
281 # Information about a mouse device.
283 # @name: the name of the mouse device
285 # @index: the index of the mouse device
287 # @current: true if this device is currently receiving mouse events
289 # @absolute: true if this device supports absolute coordinates as input
293 { 'type': 'MouseInfo',
294 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
295 'absolute': 'bool'} }
300 # Returns information about each active mouse device
302 # Returns: a list of @MouseInfo for each device
306 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
311 # Information about a virtual CPU
313 # @CPU: the index of the virtual CPU
315 # @current: this only exists for backwards compatible and should be ignored
317 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
318 # to a processor specific low power mode.
320 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
322 # If the target is Sparc, this is the PC component of the
323 # instruction pointer.
325 # @nip: #optional If the target is PPC, the instruction pointer
327 # @npc: #optional If the target is Sparc, the NPC component of the instruction
330 # @PC: #optional If the target is MIPS, the instruction pointer
332 # @thread_id: ID of the underlying host thread
336 # Notes: @halted is a transient state that changes frequently. By the time the
337 # data is sent to the client, the guest may no longer be halted.
340 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
341 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
346 # Returns a list of information about each virtual CPU.
348 # Returns: a list of @CpuInfo for each virtual CPU
352 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
357 # Information about the backing device for a block device.
359 # @file: the filename of the backing device
361 # @ro: true if the backing device was open read-only
363 # @drv: the name of the block format used to open the backing device. As of
364 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
365 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
366 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
367 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
369 # @backing_file: #optional the name of the backing file (for copy-on-write)
371 # @encrypted: true if the backing device is encrypted
373 # @bps: total throughput limit in bytes per second is specified
375 # @bps_rd: read throughput limit in bytes per second is specified
377 # @bps_wr: write throughput limit in bytes per second is specified
379 # @iops: total I/O operations per second is specified
381 # @iops_rd: read I/O operations per second is specified
383 # @iops_wr: write I/O operations per second is specified
387 # Notes: This interface is only found in @BlockInfo.
389 { 'type': 'BlockDeviceInfo',
390 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
391 '*backing_file': 'str', 'encrypted': 'bool',
392 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
393 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
396 # @BlockDeviceIoStatus:
398 # An enumeration of block device I/O status.
400 # @ok: The last I/O operation has succeeded
402 # @failed: The last I/O operation has failed
404 # @nospace: The last I/O operation has failed due to a no-space condition
408 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
413 # Block device information. This structure describes a virtual device and
414 # the backing device associated with it.
416 # @device: The device name associated with the virtual device.
418 # @type: This field is returned only for compatibility reasons, it should
419 # not be used (always returns 'unknown')
421 # @removable: True if the device supports removable media.
423 # @locked: True if the guest has locked this device from having its media
426 # @tray_open: #optional True if the device has a tray and it is open
427 # (only present if removable is true)
429 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
430 # supports it and the VM is configured to stop on errors
432 # @inserted: #optional @BlockDeviceInfo describing the device if media is
437 { 'type': 'BlockInfo',
438 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
439 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
440 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
445 # Get a list of BlockInfo for all virtual block devices.
447 # Returns: a list of @BlockInfo describing each virtual block device
451 { 'command': 'query-block', 'returns': ['BlockInfo'] }
456 # Statistics of a virtual block device or a block backing device.
458 # @rd_bytes: The number of bytes read by the device.
460 # @wr_bytes: The number of bytes written by the device.
462 # @rd_operations: The number of read operations performed by the device.
464 # @wr_operations: The number of write operations performed by the device.
466 # @flush_operations: The number of cache flush operations performed by the
467 # device (since 0.15.0)
469 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
472 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
474 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
476 # @wr_highest_offset: The offset after the greatest byte written to the
477 # device. The intended use of this information is for
478 # growable sparse files (like qcow2) that are used on top
479 # of a physical device.
483 { 'type': 'BlockDeviceStats',
484 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
485 'wr_operations': 'int', 'flush_operations': 'int',
486 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
487 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
492 # Statistics of a virtual block device or a block backing device.
494 # @device: #optional If the stats are for a virtual block device, the name
495 # corresponding to the virtual block device.
497 # @stats: A @BlockDeviceStats for the device.
499 # @parent: #optional This may point to the backing block device if this is a
500 # a virtual block device. If it's a backing block, this will point
501 # to the backing file is one is present.
505 { 'type': 'BlockStats',
506 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
507 '*parent': 'BlockStats'} }
512 # Query the @BlockStats for all virtual block devices.
514 # Returns: A list of @BlockStats for each virtual block devices.
518 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
523 # Information about a connected VNC client.
525 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
528 # @family: 'ipv6' if the client is connected via IPv6 and TCP
529 # 'ipv4' if the client is connected via IPv4 and TCP
530 # 'unix' if the client is connected via a unix domain socket
531 # 'unknown' otherwise
533 # @service: The service name of the client's port. This may depends on the
534 # host system's service database so symbolic names should not be
537 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
538 # Name of the client.
540 # @sasl_username: #optional If SASL authentication is in use, the SASL username
541 # used for authentication.
545 { 'type': 'VncClientInfo',
546 'data': {'host': 'str', 'family': 'str', 'service': 'str',
547 '*x509_dname': 'str', '*sasl_username': 'str'} }
552 # Information about the VNC session.
554 # @enabled: true if the VNC server is enabled, false otherwise
556 # @host: #optional The hostname the VNC server is bound to. This depends on
557 # the name resolution on the host and may be an IP address.
559 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
560 # 'ipv4' if the host is listening for IPv4 connections
561 # 'unix' if the host is listening on a unix domain socket
562 # 'unknown' otherwise
564 # @service: #optional The service name of the server's port. This may depends
565 # on the host system's service database so symbolic names should not
568 # @auth: #optional the current authentication type used by the server
569 # 'none' if no authentication is being used
570 # 'vnc' if VNC authentication is being used
571 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
572 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
573 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
574 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
575 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
576 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
577 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
578 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
579 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
581 # @clients: a list of @VncClientInfo of all currently connected clients
586 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
587 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
592 # Returns information about the current VNC server
595 # If VNC support is not compiled in, FeatureDisabled
599 { 'command': 'query-vnc', 'returns': 'VncInfo' }
604 # Information about a SPICE client channel.
606 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
609 # @family: 'ipv6' if the client is connected via IPv6 and TCP
610 # 'ipv4' if the client is connected via IPv4 and TCP
611 # 'unix' if the client is connected via a unix domain socket
612 # 'unknown' otherwise
614 # @port: The client's port number.
616 # @connection-id: SPICE connection id number. All channels with the same id
617 # belong to the same SPICE session.
619 # @connection-type: SPICE channel type number. "1" is the main control channel,
620 # filter for this one if you want track spice sessions only
622 # @channel-id: SPICE channel ID number. Usually "0", might be different needed
623 # when multiple channels of the same type exist, such as multiple
624 # display channels in a multihead setup
626 # @tls: true if the channel is encrypted, false otherwise.
630 { 'type': 'SpiceChannel',
631 'data': {'host': 'str', 'family': 'str', 'port': 'str',
632 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
638 # Information about the SPICE session.
640 # @enabled: true if the SPICE server is enabled, false otherwise
642 # @host: #optional The hostname the SPICE server is bound to. This depends on
643 # the name resolution on the host and may be an IP address.
645 # @port: #optional The SPICE server's port number.
647 # @compiled-version: #optional SPICE server version.
649 # @tls-port: #optional The SPICE server's TLS port number.
651 # @auth: #optional the current authentication type used by the server
652 # 'none' if no authentication is being used
653 # 'spice' (TODO: describe)
655 # @channels: a list of @SpiceChannel for each active spice channel
659 { 'type': 'SpiceInfo',
660 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
661 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
662 '*channels': ['SpiceChannel']} }
667 # Returns information about the current SPICE server
669 # Returns: @SpiceInfo
673 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
678 # Information about the guest balloon device.
680 # @actual: the number of bytes the balloon currently contains
682 # @mem_swapped_in: #optional number of pages swapped in within the guest
684 # @mem_swapped_out: #optional number of pages swapped out within the guest
686 # @major_page_faults: #optional number of major page faults within the guest
688 # @minor_page_faults: #optional number of minor page faults within the guest
690 # @free_mem: #optional amount of memory (in bytes) free in the guest
692 # @total_mem: #optional amount of memory (in bytes) visible to the guest
696 # Notes: all current versions of QEMU do not fill out optional information in
699 { 'type': 'BalloonInfo',
700 'data': {'actual': 'int', '*mem_swapped_in': 'int',
701 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
702 '*minor_page_faults': 'int', '*free_mem': 'int',
703 '*total_mem': 'int'} }
708 # Return information about the balloon device.
710 # Returns: @BalloonInfo on success
711 # If the balloon driver is enabled but not functional because the KVM
712 # kernel module cannot support it, KvmMissingCap
713 # If no balloon device is present, DeviceNotActive
717 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
722 # A PCI device memory region
724 # @base: the starting address (guest physical)
726 # @limit: the ending address (guest physical)
730 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
735 # Information about a PCI device I/O region.
737 # @bar: the index of the Base Address Register for this region
739 # @type: 'io' if the region is a PIO region
740 # 'memory' if the region is a MMIO region
742 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
744 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
748 { 'type': 'PciMemoryRegion',
749 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
750 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
755 # Information about a PCI Bridge device
757 # @bus.number: primary bus interface number. This should be the number of the
758 # bus the device resides on.
760 # @bus.secondary: secondary bus interface number. This is the number of the
761 # main bus for the bridge
763 # @bus.subordinate: This is the highest number bus that resides below the
766 # @bus.io_range: The PIO range for all devices on this bridge
768 # @bus.memory_range: The MMIO range for all devices on this bridge
770 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
773 # @devices: a list of @PciDeviceInfo for each device on this bridge
777 { 'type': 'PciBridgeInfo',
778 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
779 'io_range': 'PciMemoryRange',
780 'memory_range': 'PciMemoryRange',
781 'prefetchable_range': 'PciMemoryRange' },
782 '*devices': ['PciDeviceInfo']} }
787 # Information about a PCI device
789 # @bus: the bus number of the device
791 # @slot: the slot the device is located in
793 # @function: the function of the slot used by the device
795 # @class_info.desc: #optional a string description of the device's class
797 # @class_info.class: the class code of the device
799 # @id.device: the PCI device id
801 # @id.vendor: the PCI vendor id
803 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
805 # @qdev_id: the device name of the PCI device
807 # @pci_bridge: if the device is a PCI bridge, the bridge information
809 # @regions: a list of the PCI I/O regions associated with the device
811 # Notes: the contents of @class_info.desc are not stable and should only be
812 # treated as informational.
816 { 'type': 'PciDeviceInfo',
817 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
818 'class_info': {'*desc': 'str', 'class': 'int'},
819 'id': {'device': 'int', 'vendor': 'int'},
820 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
821 'regions': ['PciMemoryRegion']} }
826 # Information about a PCI bus
828 # @bus: the bus index
830 # @devices: a list of devices on this bus
834 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
839 # Return information about the PCI bus topology of the guest.
841 # Returns: a list of @PciInfo for each PCI bus
845 { 'command': 'query-pci', 'returns': ['PciInfo'] }
850 # This command will cause the QEMU process to exit gracefully. While every
851 # attempt is made to send the QMP response before terminating, this is not
852 # guaranteed. When using this interface, a premature EOF would not be
857 { 'command': 'quit' }
862 # Stop all guest VCPU execution.
866 # Notes: This function will succeed even if the guest is already in the stopped
869 { 'command': 'stop' }
874 # Performs a hard reset of a guest.
878 { 'command': 'system_reset' }
883 # Requests that a guest perform a powerdown operation.
887 # Notes: A guest may or may not respond to this command. This command
888 # returning does not indicate that a guest has accepted the request or
889 # that it has shut down. Many guests will respond to this command by
890 # prompting the user in some way.
892 { 'command': 'system_powerdown' }
897 # This command is a nop that is only provided for the purposes of compatibility.
901 # Notes: Do not use this command.
903 { 'command': 'cpu', 'data': {'index': 'int'} }
908 # Save a portion of guest memory to a file.
910 # @val: the virtual address of the guest to start from
912 # @size: the size of memory region to save
914 # @filename: the file to save the memory to as binary data
916 # @cpu-index: #optional the index of the virtual CPU to use for translating the
917 # virtual address (defaults to CPU 0)
919 # Returns: Nothing on success
920 # If @cpu is not a valid VCPU, InvalidParameterValue
921 # If @filename cannot be opened, OpenFileFailed
922 # If an I/O error occurs while writing the file, IOError
926 # Notes: Errors were not reliably returned until 1.1
928 { 'command': 'memsave',
929 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
934 # Save a portion of guest physical memory to a file.
936 # @val: the physical address of the guest to start from
938 # @size: the size of memory region to save
940 # @filename: the file to save the memory to as binary data
942 # Returns: Nothing on success
943 # If @filename cannot be opened, OpenFileFailed
944 # If an I/O error occurs while writing the file, IOError
948 # Notes: Errors were not reliably returned until 1.1
950 { 'command': 'pmemsave',
951 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
956 # Resume guest VCPU execution.
960 # Returns: If successful, nothing
961 # If the QEMU is waiting for an incoming migration, MigrationExpected
962 # If QEMU was started with an encrypted block device and a key has
963 # not yet been set, DeviceEncrypted.
965 # Notes: This command will succeed if the guest is currently running.
967 { 'command': 'cont' }
972 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
974 # Returns: If successful, nothing
975 # If the Virtual Machine doesn't support NMI injection, Unsupported
979 # Notes: Only x86 Virtual Machines support this command.
981 { 'command': 'inject-nmi' }
986 # Sets the link status of a virtual network adapter.
988 # @name: the device name of the virtual network adapter
990 # @up: true to set the link status to be up
992 # Returns: Nothing on success
993 # If @name is not a valid network device, DeviceNotFound
997 # Notes: Not all network adapters support setting link status. This command
998 # will succeed even if the network adapter does not support link status
1001 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1006 # This command sets the password of a block device that has not been open
1007 # with a password and requires one.
1009 # The two cases where this can happen are a block device is created through
1010 # QEMU's initial command line or a block device is changed through the legacy
1011 # @change interface.
1013 # In the event that the block device is created through the initial command
1014 # line, the VM will start in the stopped state regardless of whether '-S' is
1015 # used. The intention is for a management tool to query the block devices to
1016 # determine which ones are encrypted, set the passwords with this command, and
1017 # then start the guest with the @cont command.
1019 # @device: the name of the device to set the password on
1021 # @password: the password to use for the device
1023 # Returns: nothing on success
1024 # If @device is not a valid block device, DeviceNotFound
1025 # If @device is not encrypted, DeviceNotEncrypted
1026 # If @password is not valid for this device, InvalidPassword
1028 # Notes: Not all block formats support encryption and some that do are not
1029 # able to validate that a password is correct. Disk corruption may
1030 # occur if an invalid password is specified.
1034 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1039 # Request the balloon driver to change its balloon size.
1041 # @value: the target size of the balloon in bytes
1043 # Returns: Nothing on success
1044 # If the balloon driver is enabled but not functional because the KVM
1045 # kernel module cannot support it, KvmMissingCap
1046 # If no balloon device is present, DeviceNotActive
1048 # Notes: This command just issues a request to the guest. When it returns,
1049 # the balloon size may not have changed. A guest can change the balloon
1050 # size independent of this command.
1054 { 'command': 'balloon', 'data': {'value': 'int'} }
1059 # Resize a block image while a guest is running.
1061 # @device: the name of the device to get the image resized
1063 # @size: new image size in bytes
1065 # Returns: nothing on success
1066 # If @device is not a valid block device, DeviceNotFound
1068 # Notes: This command returns UndefinedError in a number of error conditions.
1072 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1075 # @blockdev-snapshot-sync
1077 # Generates a synchronous snapshot of a block device.
1079 # @device: the name of the device to generate the snapshot from.
1081 # @snapshot-file: the target of the new image. If the file exists, or if it
1082 # is a device, the snapshot will be created in the existing
1083 # file/device. If does not exist, a new file will be created.
1085 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1087 # Returns: nothing on success
1088 # If @device is not a valid block device, DeviceNotFound
1089 # If @snapshot-file can't be opened, OpenFileFailed
1090 # If @format is invalid, InvalidBlockFormat
1092 # Notes: One of the last steps taken by this command is to close the current
1093 # image being used by @device and open the @snapshot-file one. If that
1094 # fails, the command will try to reopen the original image file. If
1095 # that also fails OpenFileFailed will be returned and the guest may get
1096 # unexpected errors.
1100 { 'command': 'blockdev-snapshot-sync',
1101 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str' } }
1104 # @human-monitor-command:
1106 # Execute a command on the human monitor and return the output.
1108 # @command-line: the command to execute in the human monitor
1110 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1112 # Returns: the output of the command as a string
1116 # Notes: This command only exists as a stop-gap. It's use is highly
1117 # discouraged. The semantics of this command are not guaranteed.
1119 # Known limitations:
1121 # o This command is stateless, this means that commands that depend
1122 # on state information (such as getfd) might not work
1124 # o Commands that prompt the user for data (eg. 'cont' when the block
1125 # device is encrypted) don't currently work
1127 { 'command': 'human-monitor-command',
1128 'data': {'command-line': 'str', '*cpu-index': 'int'},
1134 # Cancel the current executing migration process.
1136 # Returns: nothing on success
1138 # Notes: This command succeeds even if there is no migration process running.
1142 { 'command': 'migrate_cancel' }
1145 # @migrate_set_downtime
1147 # Set maximum tolerated downtime for migration.
1149 # @value: maximum downtime in seconds
1151 # Returns: nothing on success
1155 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1158 # @migrate_set_speed
1160 # Set maximum speed for migration.
1162 # @value: maximum speed in bytes.
1164 # Returns: nothing on success
1166 # Notes: A value lesser than zero will be automatically round up to zero.
1170 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1173 # @DevicePropertyInfo:
1175 # @name: the name of the property
1177 # @type: the type of the property. This will typically come in one of four
1180 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1181 # These types are mapped to the appropriate JSON type.
1183 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1184 # legacy qdev typename. These types are always treated as strings.
1186 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1187 # device type name. Child properties create the composition tree.
1189 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1190 # device type name. Link properties form the device model graph.
1194 # Notes: This type is experimental. Its syntax may change in future releases.
1196 { 'type': 'DevicePropertyInfo',
1197 'data': { 'name': 'str', 'type': 'str' } }
1202 # This command will list any properties of a device given a path in the device
1205 # @path: the path within the device model. See @qom-get for a description of
1208 # Returns: a list of @DevicePropertyInfo that describe the properties of the
1213 # Notes: This command is experimental. It's syntax may change in future
1216 { 'command': 'qom-list',
1217 'data': { 'path': 'str' },
1218 'returns': [ 'DevicePropertyInfo' ] }
1223 # This command will get a property from a device model path and return the
1226 # @path: The path within the device model. There are two forms of supported
1227 # paths--absolute and partial paths.
1229 # Absolute paths are derived from the root device and can follow child<>
1230 # or link<> properties. Since they can follow link<> properties, they
1231 # can be arbitrarily long. Absolute paths look like absolute filenames
1232 # and are prefixed with a leading slash.
1234 # Partial paths look like relative filenames. They do not begin
1235 # with a prefix. The matching rules for partial paths are subtle but
1236 # designed to make specifying devices easy. At each level of the
1237 # composition tree, the partial path is matched as an absolute path.
1238 # The first match is not returned. At least two matches are searched
1239 # for. A successful result is only returned if only one match is
1240 # found. If more than one match is found, a flag is return to
1241 # indicate that the match was ambiguous.
1243 # @property: The property name to read
1245 # Returns: The property value. The type depends on the property type. legacy<>
1246 # properties are returned as #str. child<> and link<> properties are
1247 # returns as #str pathnames. All integer property types (u8, u16, etc)
1248 # are returned as #int.
1252 # Notes: This command is experimental and may change syntax in future releases.
1254 { 'command': 'qom-get',
1255 'data': { 'path': 'str', 'property': 'str' },
1256 'returns': 'visitor',
1262 # This command will set a property from a device model path.
1264 # @path: see @qom-get for a description of this parameter
1266 # @property: the property name to set
1268 # @value: a value who's type is appropriate for the property type. See @qom-get
1269 # for a description of type mapping.
1273 # Notes: This command is experimental and may change syntax in future releases.
1275 { 'command': 'qom-set',
1276 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },