提交 d39173ff 编写于 作者: P Peter Krempa

qemu: blockjob: Always save config XML when a blockjob is finished

For VMs with persistent config the config may change upon successful
completion of a job. Save it always if a persistent VM finishes a
blockjob. This will simplify further additions.
上级 f7954d6b
......@@ -194,11 +194,11 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
VIR_WARN("Unable to save status on vm %s after block job", vm->def->name);
if (persistDisk && virDomainSaveConfig(cfg->configDir,
driver->caps,
vm->newDef) < 0)
VIR_WARN("Unable to update persistent definition on vm %s "
"after block job", vm->def->name);
if (status == VIR_DOMAIN_BLOCK_JOB_COMPLETED && vm->newDef) {
if (virDomainSaveConfig(cfg->configDir, driver->caps, vm->newDef) < 0)
VIR_WARN("Unable to update persistent definition on vm %s "
"after block job", vm->def->name);
}
qemuDomainEventQueue(driver, event);
qemuDomainEventQueue(driver, event2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册