mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
qemu: Fix updating balloon period in live XML
Up until now, we set memballoon period in monitor successfully, however we did not update domain definition structure, thus dumpxml was omitting period attribute in memballoon element Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1140960
This commit is contained in:
parent
f4ba3385ba
commit
e3a7b8740f
@ -2460,9 +2460,15 @@ static int qemuDomainSetMemoryStatsPeriod(virDomainPtr dom, int period,
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
r = qemuMonitorSetMemoryStatsPeriod(priv->mon, period);
|
||||
qemuDomainObjExitMonitor(driver, vm);
|
||||
if (r < 0)
|
||||
if (r < 0) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("unable to set balloon driver collection period"));
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
vm->def->memballoon->period = period;
|
||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||
|
Loading…
Reference in New Issue
Block a user