Lines Matching +full:suspend +full:- +full:to +full:- +full:ram
1 # *-*- Mode: Python -*-*
8 # For locating a particular item, please see the `qapi-qga-index`.
12 # .. qmp-example::
14 # -> ... text sent by client (commands) ...
15 # <- ... text sent by server (command responses and events) ...
20 # Please refer to the
21 # :doc:`QEMU Machine Protocol Specification </interop/qmp-spec>`
25 { 'pragma': { 'doc-required': true } }
27 # Lists with items allowed to permit QAPI rule violations; think twice
28 # before you add to them!
31 'member-name-exceptions': [
34 # Commands allowed to return a non-dictionary:
35 'command-returns-exceptions': [
36 'guest-file-open',
37 'guest-fsfreeze-freeze',
38 'guest-fsfreeze-freeze-list',
39 'guest-fsfreeze-status',
40 'guest-fsfreeze-thaw',
41 'guest-get-time',
42 'guest-set-vcpus',
43 'guest-sync',
44 'guest-sync-delimited' ],
46 'documentation-exceptions': [
50 # @guest-sync-delimited:
52 # Echo back a unique integer value, and prepend to response a leading
55 # This is used by clients talking to the guest agent over the wire to
58 # after any client-side timeouts (including timeouts on receiving a
59 # response to this command).
67 # clients may opt to ignore all data until a sentinel value is
68 # receiving to avoid unnecessary processing of stale data.
71 # byte to make sure the guest agent flushes any partially read JSON
74 # @id: randomly generated 64-bit integer
80 { 'command': 'guest-sync-delimited',
85 # @guest-sync:
89 # This is used by clients talking to the guest agent over the wire to
92 # the provided unique integer value is returned, and it is up to the
93 # client to handle stale whole or partially-delivered JSON text in
98 # scenario being if qemu-ga responses are fed character-by-character
99 # into a JSON parser. In these situations, using `guest-sync-delimited`
102 # For clients that fetch responses line by line and convert them to
103 # JSON objects, `guest-sync` should be sufficient, but note that in
107 # Such clients should also precede this command with a 0xFF byte to
111 # @id: randomly generated 64-bit integer
117 { 'command': 'guest-sync',
122 # @guest-ping:
124 # Ping the guest agent, a non-error return implies success
128 { 'command': 'guest-ping' }
131 # @guest-get-time:
133 # Get the information about guest's System Time relative to the Epoch
134 # of 1970-01-01 in UTC.
140 { 'command': 'guest-get-time',
144 # @guest-set-time:
148 # When a guest is paused or migrated to a file then loaded from that
150 # Depending on how long the gap was, NTP might not be able to
153 # This command tries to set guest's System Time to the given value,
154 # then sets the Hardware Clock (RTC) to the current System Time. This
155 # will make it easier for a guest to resynchronize without waiting for
156 # NTP. If no @time is specified, then the time to set is read from
158 # Windows). If that's the case users are advised to always pass a
161 # @time: time of nanoseconds, relative to the Epoch of 1970-01-01 in
166 { 'command': 'guest-set-time',
178 # @success-response: whether command returns a response on success
184 'data': { 'name': 'str', 'enabled': 'bool', 'success-response': 'bool' } }
201 # @guest-info:
207 { 'command': 'guest-info',
211 # @guest-shutdown:
213 # Initiate guest-activated shutdown. Note: this is an asynchronous
220 # when running with --no-shutdown, by issuing the `query-status` QMP
221 # command to confirm the VM status is "shutdown".
225 { 'command': 'guest-shutdown', 'data': { '*mode': 'str' },
226 'success-response': false }
229 # @guest-file-open:
233 # @path: Full path to the file in the guest to open.
241 { 'command': 'guest-file-open',
246 # @guest-file-close:
250 # @handle: filehandle returned by `guest-file-open`
254 { 'command': 'guest-file-close',
260 # Result of guest agent file-read operation
263 # base64-encoding is applied)
265 # @buf-b64: base64-encoded bytes read
272 'data': { 'count': 'int', 'buf-b64': 'str', 'eof': 'bool' } }
275 # @guest-file-read:
277 # Read from an open file in the guest. Data will be base64-encoded.
278 # As this command is just for limited, ad-hoc debugging, such as log
279 # file access, the number of bytes to read is limited to 48 MB.
281 # @handle: filehandle returned by `guest-file-open`
283 # @count: maximum number of bytes to read (default is 4KB, maximum is
288 { 'command': 'guest-file-read',
295 # Result of guest agent file-write operation
298 # written, after base64-decoding of provided buffer)
308 # @guest-file-write:
310 # Write to an open file in the guest.
312 # @handle: filehandle returned by `guest-file-open`
314 # @buf-b64: base64-encoded string representing data to be written
316 # @count: bytes to write (actual bytes, after base64-decode), default
317 # is all content in buf-b64 buffer after base64 decoding
321 { 'command': 'guest-file-write',
322 'data': { 'handle': 'int', 'buf-b64': 'str', '*count': 'int' },
329 # Result of guest agent file-seek operation
343 # Symbolic names for use in `guest-file-seek`
345 # @set: Set to the specified offset (same effect as 'whence':0)
347 # @cur: Add offset to the current location (same effect as 'whence':1)
349 # @end: Add offset to the end of the file (same effect as 'whence':2)
358 # Controls the meaning of offset to `guest-file-seek`.
372 # @guest-file-seek:
374 # Seek to a position in the file, as with fseek(), and return the
378 # @handle: filehandle returned by `guest-file-open`
380 # @offset: bytes to skip over in the file stream
386 { 'command': 'guest-file-seek',
392 # @guest-file-flush:
394 # Write file changes buffered in userspace to disk/kernel buffers
396 # @handle: filehandle returned by `guest-file-open`
400 { 'command': 'guest-file-flush',
410 # @frozen: all non-network guest filesystems frozen
419 # @guest-fsfreeze-status:
423 # .. note:: This may fail to properly report the current state as a
429 { 'command': 'guest-fsfreeze-status',
434 # @guest-fsfreeze-freeze:
437 # command succeeded, you may call `guest-fsfreeze-thaw` later to
441 # frozen as a result of this call, then `guest-fsfreeze-status` will
442 # remain "thawed" and calling `guest-fsfreeze-thaw` is not necessary.
447 # Volume Shadow-copy Service DLL helper. The frozen state is limited
448 # for up to 10 seconds by VSS.
452 { 'command': 'guest-fsfreeze-freeze',
457 # @guest-fsfreeze-freeze-list:
460 # `guest-fsfreeze-freeze`.
464 # @mountpoints: an array of mountpoints of filesystems to be frozen.
472 { 'command': 'guest-fsfreeze-freeze-list',
478 # @guest-fsfreeze-thaw:
484 # .. note:: If the return value does not match the previous call to
485 # `guest-fsfreeze-freeze`, this likely means some freezable filesystems
491 { 'command': 'guest-fsfreeze-thaw',
525 # @guest-fstrim:
529 # @minimum: Minimum contiguous free range to discard, in bytes. Free
541 { 'command': 'guest-fstrim',
547 # @guest-suspend-disk:
549 # Suspend guest to disk.
551 # This command attempts to suspend the guest using three strategies,
554 # - systemd hibernate
555 # - pm-utils (via pm-hibernate)
556 # - manual write into sysfs
560 # or, when running with --no-shutdown, by issuing the `query-status` QMP
561 # command to to confirm the VM status is "shutdown". However, the VM
562 # could also exit (or set its status to "shutdown") due to other
566 # - If suspend to disk is not supported, Unsupported
568 # .. note:: It's strongly recommended to issue the `guest-sync` command
573 { 'command': 'guest-suspend-disk', 'success-response': false,
577 # @guest-suspend-ram:
579 # Suspend guest to ram.
581 # This command attempts to suspend the guest using three strategies,
584 # - systemd hibernate
585 # - pm-utils (via pm-hibernate)
586 # - manual write into sysfs
588 # IMPORTANT: `guest-suspend-ram` requires working wakeup support in
589 # QEMU. You should check QMP command `query-current-machine` returns
590 # wakeup-suspend-support: true before issuing this command. Failure
592 # able to awaken, forcing the user to power cycle the guest to bring
596 # options to check for success:
598 # 1. Wait for the `SUSPEND` QMP event from QEMU
599 # 2. Issue the `query-status` QMP command to confirm the VM status is
603 # - If suspend to ram is not supported, Unsupported
605 # .. note:: It's strongly recommended to issue the `guest-sync` command
610 { 'command': 'guest-suspend-ram', 'success-response': false,
614 # @guest-suspend-hybrid:
616 # Save guest state to disk and suspend to ram.
618 # This command attempts to suspend the guest by executing, in this
621 # - systemd hybrid-sleep
622 # - pm-utils (via pm-suspend-hybrid)
624 # IMPORTANT: `guest-suspend-hybrid` requires working wakeup support in
625 # QEMU. You should check QMP command `query-current-machine` returns
626 # wakeup-suspend-support: true before issuing this command. Failure
628 # able to awaken, forcing the user to power cycle the guest to bring
632 # options to check for success:
634 # 1. Wait for the `SUSPEND` QMP event from QEMU
635 # 2. Issue the `query-status` QMP command to confirm the VM status is
639 # - If hybrid suspend is not supported, Unsupported
641 # .. note:: It's strongly recommended to issue the `guest-sync` command
646 { 'command': 'guest-suspend-hybrid', 'success-response': false,
667 # @ip-address: IP address
669 # @ip-address-type: Type of @ip-address (e.g. ipv4, ipv6)
671 # @prefix: Network prefix length of @ip-address
676 'data': {'ip-address': 'str',
677 'ip-address-type': 'GuestIpAddressType',
684 # @rx-bytes: total bytes received
686 # @rx-packets: total packets received
688 # @rx-errs: bad packets received
690 # @rx-dropped: receiver dropped packets
692 # @tx-bytes: total bytes transmitted
694 # @tx-packets: total packets transmitted
696 # @tx-errs: packet transmit problems
698 # @tx-dropped: dropped packets transmitted
703 'data': {'rx-bytes': 'uint64',
704 'rx-packets': 'uint64',
705 'rx-errs': 'uint64',
706 'rx-dropped': 'uint64',
707 'tx-bytes': 'uint64',
708 'tx-packets': 'uint64',
709 'tx-errs': 'uint64',
710 'tx-dropped': 'uint64'
719 # @hardware-address: Hardware address of @name
721 # @ip-addresses: List of addresses assigned to @name
723 # @statistics: various statistic counters related to @name (since
730 '*hardware-address': 'str',
731 '*ip-addresses': ['GuestIpAddress'],
736 # @guest-network-get-interfaces:
742 { 'command': 'guest-network-get-interfaces',
749 # @logical-id: Arbitrary guest-specific unique identifier of the VCPU.
753 # @can-offline: Whether offlining the VCPU is possible. This member
761 'data': {'logical-id': 'int',
763 '*can-offline': 'bool'},
767 # @guest-get-vcpus:
771 # This is a read-only operation.
778 { 'command': 'guest-get-vcpus',
783 # @guest-set-vcpus:
785 # Attempt to reconfigure (currently: enable/disable) logical
788 # @vcpus: The logical processors to be reconfigured. This list is
789 # processed node by node in order. In each node @logical-id is
790 # used to look up the guest VCPU, for which @online specifies the
791 # requested state. The set of distinct @logical-id's is only
792 # required to be a subset of the guest-supported identifiers.
794 # @logical-id (with possibly different @online field). Preferably
796 # `guest-get-vcpus`' return value.
802 # - 0:
805 # - < length(@vcpus):
807 # entire @vcpus list. Guest state has changed accordingly. To
811 # - length(@vcpus):
815 # - If the reconfiguration of the first node in @vcpus failed.
820 { 'command': 'guest-set-vcpus',
860 # @sas: Win serial-attaches SCSI bus type
866 # @file-backed-virtual: Win file-backed bus type
875 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ],
920 # @pci-controller: controller's PCI address (fields are set to -1 if
923 # @bus-type: bus type
935 # @ccw-address: CCW address on s390x (since: 6.0)
940 'data': {'pci-controller': 'GuestPCIAddress',
941 'bus-type': 'GuestDiskBusType',
944 '*ccw-address': 'GuestCCWAddress'},
958 'data': {'critical-warning': 'int',
960 'available-spare': 'int',
961 'available-spare-threshold': 'int',
962 'percentage-used': 'int',
963 'data-units-read-lo': 'uint64',
964 'data-units-read-hi': 'uint64',
965 'data-units-written-lo': 'uint64',
966 'data-units-written-hi': 'uint64',
967 'host-read-commands-lo': 'uint64',
968 'host-read-commands-hi': 'uint64',
969 'host-write-commands-lo': 'uint64',
970 'host-write-commands-hi': 'uint64',
971 'controller-busy-time-lo': 'uint64',
972 'controller-busy-time-hi': 'uint64',
973 'power-cycles-lo': 'uint64',
974 'power-cycles-hi': 'uint64',
975 'power-on-hours-lo': 'uint64',
976 'power-on-hours-hi': 'uint64',
977 'unsafe-shutdowns-lo': 'uint64',
978 'unsafe-shutdowns-hi': 'uint64',
979 'media-errors-lo': 'uint64',
980 'media-errors-hi': 'uint64',
981 'number-of-error-log-entries-lo': 'uint64',
982 'number-of-error-log-entries-hi': 'uint64' },
1011 # @address: disk address information (only for non-virtual devices)
1013 # @alias: optional alias assigned to the disk, on Linux this is a name
1027 # @guest-get-disks:
1031 # of non-zero size including e.g. removable devices, loop devices,
1036 { 'command': 'guest-get-disks',
1049 # @used-bytes: file system used bytes (since 3.0)
1051 # @total-bytes: filesystem capacity in bytes for unprivileged users (since 3.0)
1053 # @total-bytes-privileged: filesystem capacity in bytes for privileged users
1063 '*used-bytes': 'uint64', '*total-bytes': 'uint64',
1064 '*total-bytes-privileged': 'uint64', 'disk': ['GuestDiskAddress']},
1068 # @guest-get-fsinfo:
1071 # The returned mountpoints may be specified to
1072 # `guest-fsfreeze-freeze-list`. Network filesystems (such as CIFS
1077 { 'command': 'guest-get-fsinfo',
1082 # @guest-set-user-password:
1084 # @username: the user account whose password to change
1090 # If the @crypted flag is true, it is the caller's responsibility to
1092 # does not attempt to interpret or report on the encryption scheme.
1093 # Refer to the documentation of the guest operating system in question
1094 # to determine what is supported.
1097 # flag, as they may require the clear-text password
1100 # transmission, even if already crypt()d, to ensure it is 8-bit safe
1105 { 'command': 'guest-set-user-password',
1112 # @phys-index: Arbitrary guest-specific unique identifier of the
1117 # @can-offline: Whether offlining the MEMORY BLOCK is possible. This
1125 'data': {'phys-index': 'uint64',
1127 '*can-offline': 'bool'},
1131 # @guest-get-memory-blocks:
1135 # This is a read-only operation.
1143 { 'command': 'guest-get-memory-blocks',
1155 # @not-found: can't find the corresponding memoryXXX directory in
1158 # @operation-not-supported: for some old kernels, it does not support
1161 # @operation-failed: the operation of online/offline memory block
1167 'data': ['success', 'not-found', 'operation-not-supported',
1168 'operation-failed'],
1174 # @phys-index: same with the 'phys-index' member of `GuestMemoryBlock`.
1178 # @error-code: the error number. When memory block operation fails,
1179 # we assign the value of 'errno' to this member, it indicates what
1185 'data': { 'phys-index': 'uint64',
1187 '*error-code': 'int' },
1191 # @guest-set-memory-blocks:
1193 # Attempt to reconfigure (currently: enable/disable) state of memory
1196 # @mem-blks: The memory blocks to be reconfigured. This list is
1197 # processed node by node in order. In each node @phys-index is
1198 # used to look up the guest MEMORY BLOCK, for which @online
1200 # @phys-index's is only required to be a subset of the
1201 # guest-supported identifiers. There's no restriction on list
1202 # length or on repeating the same @phys-index (with possibly
1204 # describe a modified subset of `guest-get-memory-blocks`' return
1208 # `GuestMemoryBlockResponse`, which is corresponding to the input
1211 # Note: it will return an empty list if the @mem-blks list was
1217 { 'command': 'guest-set-memory-blocks',
1218 'data': {'mem-blks': ['GuestMemoryBlock'] },
1236 # @guest-get-memory-block-info:
1238 # Get information relating to guest memory blocks.
1242 { 'command': 'guest-get-memory-block-info',
1256 # @out-data: base64-encoded stdout of the process. This field will
1259 # @err-data: base64-encoded stderr of the process. Note: @out-data
1260 # and @err-data are present only if 'capture-output' was specified
1261 # for `guest-exec`. This field will only be populated after the
1264 # @out-truncated: true if stdout was not fully captured due to size
1267 # @err-truncated: true if stderr was not fully captured due to size
1274 '*out-data': 'str', '*err-data': 'str',
1275 '*out-truncated': 'bool', '*err-truncated': 'bool' }}
1277 # @guest-exec-status:
1280 # `guest-exec`. Reap the process and associated metadata if it has
1283 # @pid: pid returned from `guest-exec`
1287 { 'command': 'guest-exec-status',
1304 # An enumeration of `guest-exec` capture modes.
1313 # `GuestExecStatus` out-data and err-data, respectively
1316 # out-data. Not effective on windows guests.
1327 # Controls what `guest-exec` output gets captures.
1329 # @flag: captures both stdout and stderr if true. Equivalent to
1341 # @guest-exec:
1345 # @path: path or executable name to execute
1347 # @arg: argument list to pass to executable
1349 # @env: environment variables to pass to executable
1351 # @input-data: data to be passed to process stdin (base64 encoded)
1353 # @capture-output: bool flag to enable capture of stdout/stderr of
1354 # running process. Defaults to false.
1360 { 'command': 'guest-exec',
1362 '*input-data': 'str', '*capture-output': 'GuestExecCaptureOutput' },
1369 # @host-name: Fully qualified domain name of the guest OS
1374 'data': { 'host-name': 'str' } }
1377 # @guest-get-host-name:
1381 # The returned name is not necessarily a fully-qualified domain name,
1389 { 'command': 'guest-get-host-name',
1400 # @login-time: Time of login of this user on the computer. If
1408 'data': { 'user': 'str', 'login-time': 'number', '*domain': 'str' },
1412 # @guest-get-users:
1420 { 'command': 'guest-get-users',
1430 # @offset: Offset to UTC in seconds, negative numbers for time zones
1439 # @guest-get-timezone:
1445 { 'command': 'guest-get-timezone',
1451 # @kernel-release:
1455 # @kernel-version:
1464 # * POSIX: as defined by os-release(5)
1468 # * POSIX: as defined by os-release(5)
1471 # @pretty-name:
1472 # * POSIX: as defined by os-release(5)
1476 # * POSIX: as defined by os-release(5)
1480 # @version-id:
1481 # * POSIX: as defined by os-release(5)
1485 # * POSIX: as defined by os-release(5)
1488 # @variant-id:
1489 # * POSIX: as defined by os-release(5)
1492 # .. note:: On POSIX systems the fields @id, @name, @pretty-name,
1493 # @version, @version-id, @variant and @variant-id follow the
1494 # definition specified in os-release(5). Refer to the manual page for
1496 # os-release file. If the file is not present in the system, or the
1506 '*kernel-release': 'str', '*kernel-version': 'str',
1508 '*pretty-name': 'str', '*version': 'str', '*version-id': 'str',
1509 '*variant': 'str', '*variant-id': 'str' } }
1512 # @guest-get-osinfo:
1518 { 'command': 'guest-get-osinfo',
1533 # @vendor-id: vendor ID
1535 # @device-id: device ID
1540 'data': { 'vendor-id': 'uint16', 'device-id': 'uint16' },
1561 # @driver-name: name of the associated driver
1563 # @driver-date: driver release date, in nanoseconds since the epoch
1565 # @driver-version: driver version
1573 'driver-name': 'str',
1574 '*driver-date': 'int',
1575 '*driver-version': 'str',
1581 # @guest-get-devices:
1587 { 'command': 'guest-get-devices',
1605 # @guest-ssh-get-authorized-keys:
1610 # @username: the user account to add the authorized keys
1614 { 'command': 'guest-ssh-get-authorized-keys',
1620 # @guest-ssh-add-authorized-keys:
1622 # Append public keys to user .ssh/authorized_keys on Unix systems (not
1625 # @username: the user account to add the authorized keys
1627 # @keys: the public keys to add (in OpenSSH/sshd(8) authorized_keys
1634 { 'command': 'guest-ssh-add-authorized-keys',
1639 # @guest-ssh-remove-authorized-keys:
1645 # @username: the user account to remove the authorized keys
1647 # @keys: the public keys to remove (in OpenSSH/sshd(8) authorized_keys
1652 { 'command': 'guest-ssh-remove-authorized-keys',
1659 # @read-sectors: sectors read
1661 # @read-ios: reads completed successfully
1663 # @read-merges: read requests merged
1665 # @write-sectors: sectors written
1667 # @write-ios: writes completed
1669 # @write-merges: write requests merged
1671 # @discard-sectors: sectors discarded
1673 # @discard-ios: discards completed successfully
1675 # @discard-merges: discard requests merged
1677 # @flush-ios: flush requests completed successfully
1679 # @read-ticks: time spent reading(ms)
1681 # @write-ticks: time spent writing(ms)
1683 # @discard-ticks: time spent discarding(ms)
1685 # @flush-ticks: time spent flushing(ms)
1687 # @ios-pgr: number of I/Os currently in flight
1689 # @total-ticks: time spent doing I/Os (ms)
1691 # @weight-ticks: weighted time spent doing I/Os since the last update
1697 'data': {'*read-sectors': 'uint64',
1698 '*read-ios': 'uint64',
1699 '*read-merges': 'uint64',
1700 '*write-sectors': 'uint64',
1701 '*write-ios': 'uint64',
1702 '*write-merges': 'uint64',
1703 '*discard-sectors': 'uint64',
1704 '*discard-ios': 'uint64',
1705 '*discard-merges': 'uint64',
1706 '*flush-ios': 'uint64',
1707 '*read-ticks': 'uint64',
1708 '*write-ticks': 'uint64',
1709 '*discard-ticks': 'uint64',
1710 '*flush-ticks': 'uint64',
1711 '*ios-pgr': 'uint64',
1712 '*total-ticks': 'uint64',
1713 '*weight-ticks': 'uint64'
1736 # @guest-get-diskstats:
1744 { 'command': 'guest-get-diskstats',
1778 # @iowait: Time waiting for I/O to complete (since Linux 2.5.41)
1780 # @irq: Time servicing interrupts (since Linux 2.6.0-test4)
1782 # @softirq: Time servicing softirqs (since Linux 2.6.0-test4)
1824 # @guest-get-cpustats:
1832 { 'command': 'guest-get-cpustats',
1843 # @load1m: 1-minute load avage
1845 # @load5m: 5-minute load avage
1847 # @load15m: 15-minute load avage
1861 # @guest-get-load:
1874 { 'command': 'guest-get-load',
1894 # @irtt: Initial round-trip delay (not for windows, IPv4 only)
1940 # @guest-network-get-route:
1948 { 'command': 'guest-network-get-route',