提交 c5e81090 编写于 作者: D Dmitry Andreev 提交者: Cole Robinson

qemuDomainRevertToSnapshot: save domain configuration

Reverting to a snapshot may change domain configuration. New
configuration should be saved if domain has persistent flag.

VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT is emitted in case of
configuration update.
上级 8047d457
......@@ -15546,6 +15546,15 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
} else if (snap) {
snap->def->current = false;
}
if (ret == 0 && config && vm->persistent &&
!(ret = virDomainSaveConfig(cfg->configDir, driver->caps,
vm->newDef ? vm->newDef : vm->def))) {
detail = VIR_DOMAIN_EVENT_DEFINED_FROM_SNAPSHOT;
qemuDomainEventQueue(driver,
virDomainEventLifecycleNewFromObj(vm,
VIR_DOMAIN_EVENT_DEFINED,
detail));
}
if (event) {
qemuDomainEventQueue(driver, event);
qemuDomainEventQueue(driver, event2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册