max can be multiple of 64GB only.

Signed-off-by: Alexandre Derumier <aderum...@odiso.com>
---
 PVE/QemuServer.pm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index ad69b76..0d5b550 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -267,6 +267,9 @@ my $rng_fmt = {
     },
 };
 
+
+my @max_memory_list = map 65536*$_, 1..64;
+
 my $memory_fmt = {
     current => {
         description => "Current amount of online RAM for the VM in MB. This is 
the maximum available memory when"
@@ -276,7 +279,12 @@ my $memory_fmt = {
         optional => 1,
         minimum => 16,
         default => 512,
-    }
+    },
+    max => {
+        type => 'integer',
+        optional => 1,
+       enum => [@max_memory_list],
+    },
 };
 
 my $meta_info_fmt = {
-- 
2.30.2


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to