[pve-devel] [PATCH qemu-server] memory_hotplug: fix check when new valus is bigger than maxmem

Alexandre Derumier aderumier at odiso.com
Mon Jan 2 11:11:15 CET 2023


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer/Memory.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index f8fc534..3eb1c7c 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -171,7 +171,7 @@ sub qemu_memory_hotplug {
 
     die "memory can't be lower than $static_memory MB" if $value < $static_memory;
     my $MAX_MEM = get_max_mem($conf);
-    die "you cannot add more memory than max mem $MAX_MEM MB!\n" if $memory > $MAX_MEM;
+    die "you cannot add more memory than max mem $MAX_MEM MB!\n" if $value > $MAX_MEM;
 
     if ($value > $memory) {
 
-- 
2.30.2





More information about the pve-devel mailing list