mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
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.
This commit is contained in:
parent
f7954d6b07
commit
d39173ff7a
@ -194,11 +194,11 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver,
|
|||||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps) < 0)
|
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);
|
VIR_WARN("Unable to save status on vm %s after block job", vm->def->name);
|
||||||
|
|
||||||
if (persistDisk && virDomainSaveConfig(cfg->configDir,
|
if (status == VIR_DOMAIN_BLOCK_JOB_COMPLETED && vm->newDef) {
|
||||||
driver->caps,
|
if (virDomainSaveConfig(cfg->configDir, driver->caps, vm->newDef) < 0)
|
||||||
vm->newDef) < 0)
|
VIR_WARN("Unable to update persistent definition on vm %s "
|
||||||
VIR_WARN("Unable to update persistent definition on vm %s "
|
"after block job", vm->def->name);
|
||||||
"after block job", vm->def->name);
|
}
|
||||||
|
|
||||||
qemuDomainEventQueue(driver, event);
|
qemuDomainEventQueue(driver, event);
|
||||||
qemuDomainEventQueue(driver, event2);
|
qemuDomainEventQueue(driver, event2);
|
||||||
|
Loading…
Reference in New Issue
Block a user