]> git.proxmox.com Git - qemu-server.git/commitdiff
memory hot-plug: fix check for maximal memory value
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 2 Jan 2023 10:11:15 +0000 (11:11 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 2 Jan 2023 12:56:43 +0000 (13:56 +0100)
Fixes: 4d3f29e ("memory hotplug patch v10")
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Memory.pm

index f8fc534098d628813a0862f7209ee1d7d1251d66..3eb1c7c90a5bfb05c7d29f9c89b54ab3401da4fc 100644 (file)
@@ -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) {