提交 5a8a49d7 编写于 作者: J Jan Kiszka 提交者: Luiz Capitulino

Reset system before loadvm

In case we load the vmstate during incoming migration, we start from a
clean, default machine state as we went through system reset before. But
if we load from a snapshot, the machine can be in any state. That can
cause troubles if loading an older image which does not carry all state
information the executing QEMU requires. Hardly any device takes care of
this scenario.

However, fixing this is trivial. We just need to issue a system reset
during loadvm as well.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 e063eb1f
......@@ -2073,6 +2073,7 @@ int load_vmstate(const char *name)
return -EINVAL;
}
qemu_system_reset(VMRESET_SILENT);
ret = qemu_loadvm_state(f);
qemu_fclose(f);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册