mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu_process: Use accessor for def->mem.total_memory
When connecting to the monitor, a timeout is calculated that is bigger the more memory guest has (because QEMU has to allocate and possibly zero out the memory and what not, empirically deducted). However, when computing the timeout the @total_memory mmember is accessed directly even though virDomainDefGetMemoryTotal() should have been used. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9ccbed6afb
commit
6e9c4811be
@ -2026,7 +2026,7 @@ qemuConnectMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, int asyncJob,
|
||||
* handing them over to qemu. This can be very time
|
||||
* consuming. Therefore, add a second to timeout for each
|
||||
* 1GiB of guest RAM. */
|
||||
timeout = vm->def->mem.total_memory / (1024 * 1024);
|
||||
timeout = virDomainDefGetMemoryTotal(vm->def) / (1024 * 1024);
|
||||
|
||||
ignore_value(virTimeMillisNow(&priv->monStart));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user