D-Bus VMState
QEMU 的 dbus-vmstate 对象用于迁移运行在 QEMU D-Bus 总线上的辅助程序数据。 D-Bus 使用建议见 D-Bus。
迁移时,QEMU 遍历 org.qemu.VMState1 D-Bus 名称所有者队列,查询各自的 Id。
辅助程序之间的 Id 必须唯一。
随后保存每个 Id 的任意数据,通过迁移流传输,并在目标端对应辅助程序中恢复或加载。
目前传输数据量暂定限制为 1Mb。状态必须快速保存,在不到一秒内完成。 D-Bus 本身也限制回复时间;若数据提供不够快,迁移会失败。
可通过 dbus-vmstate 的 id-list 属性配置预期辅助程序列表,
值为逗号分隔的 Id 列表。
org.qemu.VMState1 interface
- interface org.qemu.VMState1
This interface must be implemented at the object path
/org/qemu/VMState1to support helper migration.- method Load(ay data) ()
- 参数:
data (ay) -- data to restore the state.
The method called on destination with the state to restore.
The helper may be initially started in a waiting state (with an
-incomingargument for example), and it may resume on success.An error may be returned to the caller.
- method Save() (ay data)
- 返回:
data (ay) -- state data to save for later resume.
The method called on the source to get the current state to be migrated. The helper should continue to run normally.
An error may be returned to the caller.
- property Id:s
- Access:
read-only
- Emits Changed:
yes
A string that identifies the helper uniquely. (maximum 256 bytes including terminating NUL byte)
备注
The VMState helper ID namespace is its own namespace. In particular, it is not related to QEMU "id" used in -object/-device objects.