[pve-devel] [PATCH v2 qemu-server 2/2] fix #3581: pass size via argument for memory-backend-ram qmp call
Constantin Herold
proxmox8914 at herold.me
Tue Aug 17 17:34:34 CEST 2021
Signed-off-by: Constantin Herold <proxmox8914 at herold.me>
---
PVE/QemuServer/Memory.pm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index f3e15f1..a41f5ae 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -143,8 +143,7 @@ sub qemu_memory_hotplug {
my $hugepages_host_topology = hugepages_host_topology();
hugepages_allocate($hugepages_topology, $hugepages_host_topology);
- eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-file", id => "mem-$name", props => {
- size => int($dimm_size*1024*1024), 'mem-path' => $path, share => JSON::true, prealloc => JSON::true } ); };
+ eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-file", id => "mem-$name", size => int($dimm_size*1024*1024), 'mem-path' => $path, share => JSON::true, prealloc => JSON::true ) };
if (my $err = $@) {
hugepages_reset($hugepages_host_topology);
die $err;
@@ -155,7 +154,7 @@ sub qemu_memory_hotplug {
eval { hugepages_update_locked($code); };
} else {
- eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-ram", id => "mem-$name", props => { size => int($dimm_size*1024*1024) } ) };
+ eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-ram", id => "mem-$name", size => int($dimm_size*1024*1024) ) };
}
if (my $err = $@) {
--
2.23.0
More information about the pve-devel
mailing list