Skip to the content.

qemu 中 yank 的含义

就是我一直被 vim 误导,导致以为 yank 的含义是复制,所以 qemu migration 下复制是什么意思呢?

但是 yank 的含义 用力拉、猛地拽走、迅速取走 这也是 Vim 中使用该词的原因是, 不是“优雅复制” 而是“快速把一段内容拽走放到寄存器里”

它是一个 QMP 恢复机制,不是普通的正常停止流程。用途是当 QEMU 因某个外部连接卡住时, 直接把这个连接关掉,让 QEMU 从 hang 里恢复。

当前支持的对象有:

语义分别是:

如果从实现上看,yank 本质是:

具体代码

从 https://www.mail-archive.com/qemu-devel@nongnu.org/msg772357.html 中找到:

The yank feature allows to recover from hanging qemu by "yanking"
at various parts. Other qemu systems can register themselves and
multiple yank functions. Then all yank functions for selected
instances can be called by the 'yank' out-of-band qmp command.
Available instances can be queried by a 'query-yank' oob command.

qapi/yank.json

##
# @YankInstance:
#
# A yank instance can be yanked with the @yank qmp command to recover from a
# hanging QEMU.
#
# Currently implemented yank instances:
#  - nbd block device:
#    Yanking it will shut down the connection to the nbd server without
#    attempting to reconnect.
#  - socket chardev:
#    Yanking it will shut down the connected socket.
#  - migration:
#    Yanking it will shut down all migration connections. Unlike
#    @migrate_cancel, it will not notify the migration process, so migration
#    will go into @failed state, instead of @cancelled state. @yank should be
#    used to recover from hangs.
#
# Since: 6.0
##

关联的函数:

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。