Lines Matching +full:suspend +full:- +full:to +full:- +full:disk

1 # *-*- Mode: Python -*-*
8 { 'pragma': { 'doc-required': true } }
10 # Lists with items allowed to permit QAPI rule violations; think twice
11 # before you add to them!
14 'member-name-exceptions': [
17 # Commands allowed to return a non-dictionary:
18 'command-returns-exceptions': [
19 'guest-file-open',
20 'guest-fsfreeze-freeze',
21 'guest-fsfreeze-freeze-list',
22 'guest-fsfreeze-status',
23 'guest-fsfreeze-thaw',
24 'guest-get-time',
25 'guest-set-vcpus',
26 'guest-sync',
27 'guest-sync-delimited' ],
29 'documentation-exceptions': [
33 # @guest-sync-delimited:
35 # Echo back a unique integer value, and prepend to response a leading
38 # This is used by clients talking to the guest agent over the wire to
41 # after any client-side timeouts (including timeouts on receiving a
42 # response to this command).
50 # clients may opt to ignore all data until a sentinel value is
51 # receiving to avoid unnecessary processing of stale data.
54 # byte to make sure the guest agent flushes any partially read JSON
57 # @id: randomly generated 64-bit integer
63 { 'command': 'guest-sync-delimited',
68 # @guest-sync:
72 # This is used by clients talking to the guest agent over the wire to
75 # the provided unique integer value is returned, and it is up to the
76 # client to handle stale whole or partially-delivered JSON text in
81 # scenario being if qemu-ga responses are fed character-by-character
82 # into a JSON parser. In these situations, using guest-sync-delimited
85 # For clients that fetch responses line by line and convert them to
86 # JSON objects, guest-sync should be sufficient, but note that in
90 # Such clients should also precede this command with a 0xFF byte to
94 # @id: randomly generated 64-bit integer
100 { 'command': 'guest-sync',
105 # @guest-ping:
107 # Ping the guest agent, a non-error return implies success
111 { 'command': 'guest-ping' }
114 # @guest-get-time:
116 # Get the information about guest's System Time relative to the Epoch
117 # of 1970-01-01 in UTC.
123 { 'command': 'guest-get-time',
127 # @guest-set-time:
131 # When a guest is paused or migrated to a file then loaded from that
133 # Depending on how long the gap was, NTP might not be able to
136 # This command tries to set guest's System Time to the given value,
137 # then sets the Hardware Clock (RTC) to the current System Time. This
138 # will make it easier for a guest to resynchronize without waiting for
139 # NTP. If no @time is specified, then the time to set is read from
141 # Windows). If that's the case users are advised to always pass a
144 # @time: time of nanoseconds, relative to the Epoch of 1970-01-01 in
149 { 'command': 'guest-set-time',
161 # @success-response: whether command returns a response on success
167 'data': { 'name': 'str', 'enabled': 'bool', 'success-response': 'bool' } }
184 # @guest-info:
192 { 'command': 'guest-info',
196 # @guest-shutdown:
198 # Initiate guest-activated shutdown. Note: this is an asynchronous
205 # when running with --no-shutdown, by issuing the query-status QMP
206 # command to confirm the VM status is "shutdown".
210 { 'command': 'guest-shutdown', 'data': { '*mode': 'str' },
211 'success-response': false }
214 # @guest-file-open:
218 # @path: Full path to the file in the guest to open.
226 { 'command': 'guest-file-open',
231 # @guest-file-close:
235 # @handle: filehandle returned by guest-file-open
239 { 'command': 'guest-file-close',
245 # Result of guest agent file-read operation
248 # base64-encoding is applied)
250 # @buf-b64: base64-encoded bytes read
257 'data': { 'count': 'int', 'buf-b64': 'str', 'eof': 'bool' } }
260 # @guest-file-read:
262 # Read from an open file in the guest. Data will be base64-encoded.
263 # As this command is just for limited, ad-hoc debugging, such as log
264 # file access, the number of bytes to read is limited to 48 MB.
266 # @handle: filehandle returned by guest-file-open
268 # @count: maximum number of bytes to read (default is 4KB, maximum is
275 { 'command': 'guest-file-read',
282 # Result of guest agent file-write operation
285 # written, after base64-decoding of provided buffer)
295 # @guest-file-write:
297 # Write to an open file in the guest.
299 # @handle: filehandle returned by guest-file-open
301 # @buf-b64: base64-encoded string representing data to be written
303 # @count: bytes to write (actual bytes, after base64-decode), default
304 # is all content in buf-b64 buffer after base64 decoding
310 { 'command': 'guest-file-write',
311 'data': { 'handle': 'int', 'buf-b64': 'str', '*count': 'int' },
318 # Result of guest agent file-seek operation
332 # Symbolic names for use in @guest-file-seek
334 # @set: Set to the specified offset (same effect as 'whence':0)
336 # @cur: Add offset to the current location (same effect as 'whence':1)
338 # @end: Add offset to the end of the file (same effect as 'whence':2)
347 # Controls the meaning of offset to @guest-file-seek.
361 # @guest-file-seek:
363 # Seek to a position in the file, as with fseek(), and return the
367 # @handle: filehandle returned by guest-file-open
369 # @offset: bytes to skip over in the file stream
377 { 'command': 'guest-file-seek',
383 # @guest-file-flush:
385 # Write file changes buffered in userspace to disk/kernel buffers
387 # @handle: filehandle returned by guest-file-open
391 { 'command': 'guest-file-flush',
401 # @frozen: all non-network guest filesystems frozen
410 # @guest-fsfreeze-status:
417 # .. note:: This may fail to properly report the current state as a
423 { 'command': 'guest-fsfreeze-status',
428 # @guest-fsfreeze-freeze:
431 # command succeeded, you may call @guest-fsfreeze-thaw later to
435 # frozen as a result of this call, then @guest-fsfreeze-status will
436 # remain "thawed" and calling @guest-fsfreeze-thaw is not necessary.
441 # Volume Shadow-copy Service DLL helper. The frozen state is limited
442 # for up to 10 seconds by VSS.
446 { 'command': 'guest-fsfreeze-freeze',
451 # @guest-fsfreeze-freeze-list:
454 # @guest-fsfreeze-freeze.
458 # @mountpoints: an array of mountpoints of filesystems to be frozen.
466 { 'command': 'guest-fsfreeze-freeze-list',
472 # @guest-fsfreeze-thaw:
478 # .. note:: If the return value does not match the previous call to
479 # guest-fsfreeze-freeze, this likely means some freezable filesystems
485 { 'command': 'guest-fsfreeze-thaw',
519 # @guest-fstrim:
523 # @minimum: Minimum contiguous free range to discard, in bytes. Free
536 { 'command': 'guest-fstrim',
542 # @guest-suspend-disk:
544 # Suspend guest to disk.
546 # This command attempts to suspend the guest using three strategies,
549 # - systemd hibernate
550 # - pm-utils (via pm-hibernate)
551 # - manual write into sysfs
555 # or, when running with --no-shutdown, by issuing the query-status QMP
556 # command to to confirm the VM status is "shutdown". However, the VM
557 # could also exit (or set its status to "shutdown") due to other
561 # - If suspend to disk is not supported, Unsupported
563 # .. note:: It's strongly recommended to issue the guest-sync command
568 { 'command': 'guest-suspend-disk', 'success-response': false,
572 # @guest-suspend-ram:
574 # Suspend guest to ram.
576 # This command attempts to suspend the guest using three strategies,
579 # - systemd hibernate
580 # - pm-utils (via pm-hibernate)
581 # - manual write into sysfs
583 # IMPORTANT: guest-suspend-ram requires working wakeup support in
584 # QEMU. You should check QMP command query-current-machine returns
585 # wakeup-suspend-support: true before issuing this command. Failure
587 # able to awaken, forcing the user to power cycle the guest to bring
591 # options to check for success:
593 # 1. Wait for the SUSPEND QMP event from QEMU
594 # 2. Issue the query-status QMP command to confirm the VM status is
598 # - If suspend to ram is not supported, Unsupported
600 # .. note:: It's strongly recommended to issue the guest-sync command
605 { 'command': 'guest-suspend-ram', 'success-response': false,
609 # @guest-suspend-hybrid:
611 # Save guest state to disk and suspend to ram.
613 # This command attempts to suspend the guest by executing, in this
616 # - systemd hybrid-sleep
617 # - pm-utils (via pm-suspend-hybrid)
619 # IMPORTANT: guest-suspend-hybrid requires working wakeup support in
620 # QEMU. You should check QMP command query-current-machine returns
621 # wakeup-suspend-support: true before issuing this command. Failure
623 # able to awaken, forcing the user to power cycle the guest to bring
627 # options to check for success:
629 # 1. Wait for the SUSPEND QMP event from QEMU
630 # 2. Issue the query-status QMP command to confirm the VM status is
634 # - If hybrid suspend is not supported, Unsupported
636 # .. note:: It's strongly recommended to issue the guest-sync command
641 { 'command': 'guest-suspend-hybrid', 'success-response': false,
662 # @ip-address: IP address
664 # @ip-address-type: Type of @ip-address (e.g. ipv4, ipv6)
666 # @prefix: Network prefix length of @ip-address
671 'data': {'ip-address': 'str',
672 'ip-address-type': 'GuestIpAddressType',
679 # @rx-bytes: total bytes received
681 # @rx-packets: total packets received
683 # @rx-errs: bad packets received
685 # @rx-dropped: receiver dropped packets
687 # @tx-bytes: total bytes transmitted
689 # @tx-packets: total packets transmitted
691 # @tx-errs: packet transmit problems
693 # @tx-dropped: dropped packets transmitted
698 'data': {'rx-bytes': 'uint64',
699 'rx-packets': 'uint64',
700 'rx-errs': 'uint64',
701 'rx-dropped': 'uint64',
702 'tx-bytes': 'uint64',
703 'tx-packets': 'uint64',
704 'tx-errs': 'uint64',
705 'tx-dropped': 'uint64'
714 # @hardware-address: Hardware address of @name
716 # @ip-addresses: List of addresses assigned to @name
718 # @statistics: various statistic counters related to @name (since
725 '*hardware-address': 'str',
726 '*ip-addresses': ['GuestIpAddress'],
731 # @guest-network-get-interfaces:
739 { 'command': 'guest-network-get-interfaces',
746 # @logical-id: Arbitrary guest-specific unique identifier of the VCPU.
750 # @can-offline: Whether offlining the VCPU is possible. This member
758 'data': {'logical-id': 'int',
760 '*can-offline': 'bool'},
764 # @guest-get-vcpus:
768 # This is a read-only operation.
775 { 'command': 'guest-get-vcpus',
780 # @guest-set-vcpus:
782 # Attempt to reconfigure (currently: enable/disable) logical
785 # @vcpus: The logical processors to be reconfigured. This list is
786 # processed node by node in order. In each node @logical-id is
787 # used to look up the guest VCPU, for which @online specifies the
788 # requested state. The set of distinct @logical-id's is only
789 # required to be a subset of the guest-supported identifiers.
791 # @logical-id (with possibly different @online field). Preferably
793 # @guest-get-vcpus' return value.
799 # - 0:
802 # - < length(@vcpus):
804 # entire @vcpus list. Guest state has changed accordingly. To
808 # - length(@vcpus):
812 # - If the reconfiguration of the first node in @vcpus failed.
817 { 'command': 'guest-set-vcpus',
857 # @sas: Win serial-attaches SCSI bus type
863 # @file-backed-virtual: Win file-backed bus type
872 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ],
917 # @pci-controller: controller's PCI address (fields are set to -1 if
920 # @bus-type: bus type
932 # @ccw-address: CCW address on s390x (since: 6.0)
937 'data': {'pci-controller': 'GuestPCIAddress',
938 'bus-type': 'GuestDiskBusType',
941 '*ccw-address': 'GuestCCWAddress'},
955 'data': {'critical-warning': 'int',
957 'available-spare': 'int',
958 'available-spare-threshold': 'int',
959 'percentage-used': 'int',
960 'data-units-read-lo': 'uint64',
961 'data-units-read-hi': 'uint64',
962 'data-units-written-lo': 'uint64',
963 'data-units-written-hi': 'uint64',
964 'host-read-commands-lo': 'uint64',
965 'host-read-commands-hi': 'uint64',
966 'host-write-commands-lo': 'uint64',
967 'host-write-commands-hi': 'uint64',
968 'controller-busy-time-lo': 'uint64',
969 'controller-busy-time-hi': 'uint64',
970 'power-cycles-lo': 'uint64',
971 'power-cycles-hi': 'uint64',
972 'power-on-hours-lo': 'uint64',
973 'power-on-hours-hi': 'uint64',
974 'unsafe-shutdowns-lo': 'uint64',
975 'unsafe-shutdowns-hi': 'uint64',
976 'media-errors-lo': 'uint64',
977 'media-errors-hi': 'uint64',
978 'number-of-error-log-entries-lo': 'uint64',
979 'number-of-error-log-entries-hi': 'uint64' },
985 # Disk type related smart information.
987 # @type: disk bus type
1002 # @partition: whether this is a partition or disk
1006 # will contain the disk where the volume is placed. (Linux)
1008 # @address: disk address information (only for non-virtual devices)
1010 # @alias: optional alias assigned to the disk, on Linux this is a name
1013 # @smart: disk smart information (Since 7.1)
1024 # @guest-get-disks:
1028 # of non-zero size including e.g. removable devices, loop devices,
1033 { 'command': 'guest-get-disks',
1040 # @name: disk name
1046 # @used-bytes: file system used bytes (since 3.0)
1048 # @total-bytes: filesystem capacity in bytes for unprivileged users (since 3.0)
1050 # @total-bytes-privileged: filesystem capacity in bytes for privileged users
1053 # @disk: an array of disk hardware information that the volume lies
1054 # on, which may be empty if the disk type is not supported
1060 '*used-bytes': 'uint64', '*total-bytes': 'uint64',
1061 '*total-bytes-privileged': 'uint64', 'disk': ['GuestDiskAddress']},
1065 # @guest-get-fsinfo:
1068 # The returned mountpoints may be specified to
1069 # @guest-fsfreeze-freeze-list. Network filesystems (such as CIFS
1074 { 'command': 'guest-get-fsinfo',
1079 # @guest-set-user-password:
1081 # @username: the user account whose password to change
1087 # If the @crypted flag is true, it is the caller's responsibility to
1089 # does not attempt to interpret or report on the encryption scheme.
1090 # Refer to the documentation of the guest operating system in question
1091 # to determine what is supported.
1094 # flag, as they may require the clear-text password
1097 # transmission, even if already crypt()d, to ensure it is 8-bit safe
1102 { 'command': 'guest-set-user-password',
1109 # @phys-index: Arbitrary guest-specific unique identifier of the
1114 # @can-offline: Whether offlining the MEMORY BLOCK is possible. This
1122 'data': {'phys-index': 'uint64',
1124 '*can-offline': 'bool'},
1128 # @guest-get-memory-blocks:
1132 # This is a read-only operation.
1140 { 'command': 'guest-get-memory-blocks',
1152 # @not-found: can't find the corresponding memoryXXX directory in
1155 # @operation-not-supported: for some old kernels, it does not support
1158 # @operation-failed: the operation of online/offline memory block
1164 'data': ['success', 'not-found', 'operation-not-supported',
1165 'operation-failed'],
1171 # @phys-index: same with the 'phys-index' member of @GuestMemoryBlock.
1175 # @error-code: the error number. When memory block operation fails,
1176 # we assign the value of 'errno' to this member, it indicates what
1182 'data': { 'phys-index': 'uint64',
1184 '*error-code': 'int' },
1188 # @guest-set-memory-blocks:
1190 # Attempt to reconfigure (currently: enable/disable) state of memory
1193 # @mem-blks: The memory blocks to be reconfigured. This list is
1194 # processed node by node in order. In each node @phys-index is
1195 # used to look up the guest MEMORY BLOCK, for which @online
1197 # @phys-index's is only required to be a subset of the
1198 # guest-supported identifiers. There's no restriction on list
1199 # length or on repeating the same @phys-index (with possibly
1201 # describe a modified subset of @guest-get-memory-blocks' return
1205 # @GuestMemoryBlockResponse, which is corresponding to the input
1208 # Note: it will return an empty list if the @mem-blks list was
1214 { 'command': 'guest-set-memory-blocks',
1215 'data': {'mem-blks': ['GuestMemoryBlock'] },
1233 # @guest-get-memory-block-info:
1235 # Get information relating to guest memory blocks.
1241 { 'command': 'guest-get-memory-block-info',
1255 # @out-data: base64-encoded stdout of the process. This field will
1258 # @err-data: base64-encoded stderr of the process. Note: @out-data
1259 # and @err-data are present only if 'capture-output' was specified
1260 # for 'guest-exec'. This field will only be populated after the
1263 # @out-truncated: true if stdout was not fully captured due to size
1266 # @err-truncated: true if stderr was not fully captured due to size
1273 '*out-data': 'str', '*err-data': 'str',
1274 '*out-truncated': 'bool', '*err-truncated': 'bool' }}
1276 # @guest-exec-status:
1279 # guest-exec. Reap the process and associated metadata if it has
1282 # @pid: pid returned from guest-exec
1288 { 'command': 'guest-exec-status',
1305 # An enumeration of guest-exec capture modes.
1314 # GuestExecStatus out-data and err-data, respectively
1317 # out-data. Not effective on windows guests.
1328 # Controls what guest-exec output gets captures.
1330 # @flag: captures both stdout and stderr if true. Equivalent to
1342 # @guest-exec:
1346 # @path: path or executable name to execute
1348 # @arg: argument list to pass to executable
1350 # @env: environment variables to pass to executable
1352 # @input-data: data to be passed to process stdin (base64 encoded)
1354 # @capture-output: bool flag to enable capture of stdout/stderr of
1355 # running process. Defaults to false.
1361 { 'command': 'guest-exec',
1363 '*input-data': 'str', '*capture-output': 'GuestExecCaptureOutput' },
1370 # @host-name: Fully qualified domain name of the guest OS
1375 'data': { 'host-name': 'str' } }
1378 # @guest-get-host-name:
1382 # The returned name is not necessarily a fully-qualified domain name,
1390 { 'command': 'guest-get-host-name',
1401 # @login-time: Time of login of this user on the computer. If
1409 'data': { 'user': 'str', 'login-time': 'number', '*domain': 'str' },
1413 # @guest-get-users:
1421 { 'command': 'guest-get-users',
1431 # @offset: Offset to UTC in seconds, negative numbers for time zones
1440 # @guest-get-timezone:
1448 { 'command': 'guest-get-timezone',
1454 # @kernel-release:
1458 # @kernel-version:
1467 # * POSIX: as defined by os-release(5)
1471 # * POSIX: as defined by os-release(5)
1474 # @pretty-name:
1475 # * POSIX: as defined by os-release(5)
1479 # * POSIX: as defined by os-release(5)
1483 # @version-id:
1484 # * POSIX: as defined by os-release(5)
1488 # * POSIX: as defined by os-release(5)
1491 # @variant-id:
1492 # * POSIX: as defined by os-release(5)
1495 # .. note:: On POSIX systems the fields @id, @name, @pretty-name,
1496 # @version, @version-id, @variant and @variant-id follow the
1497 # definition specified in os-release(5). Refer to the manual page for
1499 # os-release file. If the file is not present in the system, or the
1509 '*kernel-release': 'str', '*kernel-version': 'str',
1511 '*pretty-name': 'str', '*version': 'str', '*version-id': 'str',
1512 '*variant': 'str', '*variant-id': 'str' } }
1515 # @guest-get-osinfo:
1523 { 'command': 'guest-get-osinfo',
1538 # @vendor-id: vendor ID
1540 # @device-id: device ID
1545 'data': { 'vendor-id': 'uint16', 'device-id': 'uint16' },
1566 # @driver-name: name of the associated driver
1568 # @driver-date: driver release date, in nanoseconds since the epoch
1570 # @driver-version: driver version
1578 'driver-name': 'str',
1579 '*driver-date': 'int',
1580 '*driver-version': 'str',
1586 # @guest-get-devices:
1594 { 'command': 'guest-get-devices',
1612 # @guest-ssh-get-authorized-keys:
1617 # @username: the user account to add the authorized keys
1623 { 'command': 'guest-ssh-get-authorized-keys',
1629 # @guest-ssh-add-authorized-keys:
1631 # Append public keys to user .ssh/authorized_keys on Unix systems (not
1634 # @username: the user account to add the authorized keys
1636 # @keys: the public keys to add (in OpenSSH/sshd(8) authorized_keys
1643 { 'command': 'guest-ssh-add-authorized-keys',
1648 # @guest-ssh-remove-authorized-keys:
1654 # @username: the user account to remove the authorized keys
1656 # @keys: the public keys to remove (in OpenSSH/sshd(8) authorized_keys
1661 { 'command': 'guest-ssh-remove-authorized-keys',
1668 # @read-sectors: sectors read
1670 # @read-ios: reads completed successfully
1672 # @read-merges: read requests merged
1674 # @write-sectors: sectors written
1676 # @write-ios: writes completed
1678 # @write-merges: write requests merged
1680 # @discard-sectors: sectors discarded
1682 # @discard-ios: discards completed successfully
1684 # @discard-merges: discard requests merged
1686 # @flush-ios: flush requests completed successfully
1688 # @read-ticks: time spent reading(ms)
1690 # @write-ticks: time spent writing(ms)
1692 # @discard-ticks: time spent discarding(ms)
1694 # @flush-ticks: time spent flushing(ms)
1696 # @ios-pgr: number of I/Os currently in flight
1698 # @total-ticks: time spent doing I/Os (ms)
1700 # @weight-ticks: weighted time spent doing I/Os since the last update
1706 'data': {'*read-sectors': 'uint64',
1707 '*read-ios': 'uint64',
1708 '*read-merges': 'uint64',
1709 '*write-sectors': 'uint64',
1710 '*write-ios': 'uint64',
1711 '*write-merges': 'uint64',
1712 '*discard-sectors': 'uint64',
1713 '*discard-ios': 'uint64',
1714 '*discard-merges': 'uint64',
1715 '*flush-ios': 'uint64',
1716 '*read-ticks': 'uint64',
1717 '*write-ticks': 'uint64',
1718 '*discard-ticks': 'uint64',
1719 '*flush-ticks': 'uint64',
1720 '*ios-pgr': 'uint64',
1721 '*total-ticks': 'uint64',
1722 '*weight-ticks': 'uint64'
1729 # @name: disk name
1731 # @major: major device number of disk
1733 # @minor: minor device number of disk
1745 # @guest-get-diskstats:
1747 # Retrieve information about disk stats.
1749 # Returns: List of disk stats of guest.
1753 { 'command': 'guest-get-diskstats',
1787 # @iowait: Time waiting for I/O to complete (since Linux 2.5.41)
1789 # @irq: Time servicing interrupts (since Linux 2.6.0-test4)
1791 # @softirq: Time servicing softirqs (since Linux 2.6.0-test4)
1833 # @guest-get-cpustats:
1841 { 'command': 'guest-get-cpustats',
1861 # @irtt: Initial round-trip delay (not for windows, IPv4 only)
1907 # @guest-network-get-route:
1914 { 'command': 'guest-network-get-route',