From 7dffeb86650a68644a3569657019ca5e5ce6b996 Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Sat, 10 Jun 2023 23:48:14 +0200 Subject: [PATCH] Handle memory sizes properly. --- .../templates/Standard-VM-latest.ftl.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.jdrupes.vmoperator.runner.qemu/templates/Standard-VM-latest.ftl.yaml b/org.jdrupes.vmoperator.runner.qemu/templates/Standard-VM-latest.ftl.yaml index 783b7d9..febe780 100644 --- a/org.jdrupes.vmoperator.runner.qemu/templates/Standard-VM-latest.ftl.yaml +++ b/org.jdrupes.vmoperator.runner.qemu/templates/Standard-VM-latest.ftl.yaml @@ -69,8 +69,8 @@ # * Provide RAM - [ "-object", "memory-backend-ram,id=pc.ram,\ - size=${ vm.maximumRam!"1G" }" ] - - [ "-m", "${ vm.maximumRam!"1G" }" ] + size=${ (vm.maximumRam!1073741824)?c }" ] + - [ "-m", "${ ((vm.maximumRam!1073741824)/1048576)?c }" ] - [ "-device", "virtio-balloon-pci,id=balloon0" ] <#if vm.useTpm> # Attach TPM