12 # An enumeration of yank instance types. See @YankInstance for more
17 { 'enum': 'YankInstanceType',
18 'data': [ 'block-node', 'chardev', 'migration' ] }
21 # @YankInstanceBlockNode:
23 # Specifies which block graph node to yank. See @YankInstance for
26 # @node-name: the name of the block graph node
30 { 'struct': 'YankInstanceBlockNode',
31 'data': { 'node-name': 'str' } }
34 # @YankInstanceChardev:
36 # Specifies which character device to yank. See @YankInstance for
39 # @id: the chardev's ID
43 { 'struct': 'YankInstanceChardev',
44 'data': { 'id': 'str' } }
49 # A yank instance can be yanked with the @yank qmp command to recover
50 # from a hanging QEMU.
52 # Currently implemented yank instances:
54 # - nbd block device: Yanking it will shut down the connection to the
55 # nbd server without attempting to reconnect.
56 # - socket chardev: Yanking it will shut down the connected socket.
57 # - migration: Yanking it will shut down all migration connections.
58 # Unlike @migrate_cancel, it will not notify the migration process,
59 # so migration will go into @failed state, instead of @cancelled
60 # state. @yank should be used to recover from hangs.
64 { 'union': 'YankInstance',
65 'base': { 'type': 'YankInstanceType' },
66 'discriminator': 'type',
68 'block-node': 'YankInstanceBlockNode',
69 'chardev': 'YankInstanceChardev' } }
74 # Try to recover from hanging QEMU by yanking the specified instances.
75 # See @YankInstance for more information.
77 # Takes a list of @YankInstance as argument.
80 # - Nothing on success
81 # - @DeviceNotFound error, if any of the YankInstances doesn't exist
85 # -> { "execute": "yank",
88 # { "type": "block-node",
89 # "node-name": "nbd0" }
96 'data': { 'instances': ['YankInstance'] },
102 # Query yank instances. See @YankInstance for more information.
104 # Returns: list of @YankInstance
108 # -> { "execute": "query-yank" }
110 # { "type": "block-node",
111 # "node-name": "nbd0" }
116 { 'command': 'query-yank',
117 'returns': ['YankInstance'],