mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
qemu: Fix updating bandwidth limits in live XML
When trying to update bandwidth limits on a running domain, limits get updated in our internal structures, however XML parser reads bandwidth limits from network 'actual' definition. Committing this patch it is now available to update bandwidth 'actual' definition as well, thus updating domain runtime XML.
This commit is contained in:
parent
99b2b4571d
commit
f4ba3385ba
@ -10215,7 +10215,18 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
|
||||
} else {
|
||||
net->bandwidth = NULL;
|
||||
}
|
||||
|
||||
if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
|
||||
virNetDevBandwidthFree(net->data.network.actual->bandwidth);
|
||||
if (virNetDevBandwidthCopy(&net->data.network.actual->bandwidth,
|
||||
net->bandwidth) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||
if (!persistentNet->bandwidth) {
|
||||
persistentNet->bandwidth = bandwidth;
|
||||
|
Loading…
Reference in New Issue
Block a user