mirror of https://gitee.com/openkylin/libvirt.git
conf: Add the size of failed max_memory in error
If virDomainDefCompatibleDevice fails because there is insufficient domain def->mem.max_memory, then let's also print out that value in the error message. Signed-off-by: John Ferlan <jferlan@redhat.com> ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
dd45c2710f
commit
4f0854e7df
|
@ -28926,7 +28926,8 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
|
|||
if ((virDomainDefGetMemoryTotal(def) + sz) > def->mem.max_memory) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Attaching memory device with size '%llu' would "
|
||||
"exceed domain's maxMemory config"), sz);
|
||||
"exceed domain's maxMemory config size '%llu'"),
|
||||
sz, def->mem.max_memory);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue