diff --git a/qa/qa-sample.json b/qa/qa-sample.json
index d1af509923ef23beab071710cda170fbe0b0f7fa..534e332693719a41c9db9da366d86bf56acf2587 100644
--- a/qa/qa-sample.json
+++ b/qa/qa-sample.json
@@ -13,7 +13,8 @@
   "primary_ip_version": 4,
 
   "os": "debian-etch",
-  "mem": "512M",
+  "maxmem": "1024M",
+  "minmem": "512M",
 
   "# Lists of disk sizes": null,
   "disk": ["1G", "512M"],
diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py
index a5e4b3f9239ffd3184d6eba80c0800d95a63e951..ac576d5f256e4d23f36483e827b1ad478ec5133f 100644
--- a/qa/qa_cluster.py
+++ b/qa/qa_cluster.py
@@ -257,12 +257,18 @@ def TestClusterReservedLvs():
 def TestClusterModifyBe():
   """gnt-cluster modify -B"""
   for fail, cmd in [
-    # mem
-    (False, ["gnt-cluster", "modify", "-B", "memory=256"]),
-    (False, ["sh", "-c", "gnt-cluster info|grep '^ *memory: 256$'"]),
-    (True, ["gnt-cluster", "modify", "-B", "memory=a"]),
-    (False, ["gnt-cluster", "modify", "-B", "memory=128"]),
-    (False, ["sh", "-c", "gnt-cluster info|grep '^ *memory: 128$'"]),
+    # max/min mem
+    (False, ["gnt-cluster", "modify", "-B", "maxmem=256"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *maxmem: 256$'"]),
+    (False, ["gnt-cluster", "modify", "-B", "minmem=256"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *minmem: 256$'"]),
+    (True, ["gnt-cluster", "modify", "-B", "maxmem=a"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *maxmem: 256$'"]),
+    (True, ["gnt-cluster", "modify", "-B", "minmem=a"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *minmem: 256$'"]),
+    (False, ["gnt-cluster", "modify", "-B", "maxmem=128,minmem=128"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *maxmem: 128$'"]),
+    (False, ["sh", "-c", "gnt-cluster info|grep '^ *minmem: 128$'"]),
     # vcpus
     (False, ["gnt-cluster", "modify", "-B", "vcpus=4"]),
     (False, ["sh", "-c", "gnt-cluster info|grep '^ *vcpus: 4$'"]),
diff --git a/qa/qa_instance.py b/qa/qa_instance.py
index 45ee521fd1a913acecd7f8735a51061cb54d9784..751176ffb5e24547f0845f21cbf89bb23ad73ca3 100644
--- a/qa/qa_instance.py
+++ b/qa/qa_instance.py
@@ -42,7 +42,11 @@ def _GetDiskStatePath(disk):
 
 
 def _GetGenericAddParameters():
-  params = ["-B", "%s=%s" % (constants.BE_MEMORY, qa_config.get("mem"))]
+  params = ["-B"]
+  params.append("%s=%s,%s=%s" % (constants.BE_MINMEM,
+                                 qa_config.get(constants.BE_MINMEM),
+                                 constants.BE_MAXMEM,
+                                 qa_config.get(constants.BE_MAXMEM)))
   for idx, size in enumerate(qa_config.get("disk")):
     params.extend(["--disk", "%s:size=%s" % (idx, size)])
   return params
@@ -196,11 +200,14 @@ def TestInstanceModify(instance):
   test_kernel = "/sbin/init"
   test_initrd = test_kernel
 
-  orig_memory = qa_config.get("mem")
+  orig_maxmem = qa_config.get(constants.BE_MAXMEM)
+  orig_minmem = qa_config.get(constants.BE_MINMEM)
   #orig_bridge = qa_config.get("bridge", "xen-br0")
   args = [
-    ["-B", "%s=128" % constants.BE_MEMORY],
-    ["-B", "%s=%s" % (constants.BE_MEMORY, orig_memory)],
+    ["-B", "%s=128" % constants.BE_MINMEM],
+    ["-B", "%s=128" % constants.BE_MAXMEM],
+    ["-B", "%s=%s,%s=%s" % (constants.BE_MINMEM, orig_minmem,
+                            constants.BE_MAXMEM, orig_maxmem)],
     ["-B", "%s=2" % constants.BE_VCPUS],
     ["-B", "%s=1" % constants.BE_VCPUS],
     ["-B", "%s=%s" % (constants.BE_VCPUS, constants.VALUE_DEFAULT)],
diff --git a/qa/qa_rapi.py b/qa/qa_rapi.py
index a453b7a29cd9e10794fd3b429ca4285ce73fd55b..e8961b044ec196a8b5800ce095fbd4d5d951a941 100644
--- a/qa/qa_rapi.py
+++ b/qa/qa_rapi.py
@@ -527,13 +527,13 @@ def TestRapiInstanceAdd(node, use_client):
   """Test adding a new instance via RAPI"""
   instance = qa_config.AcquireInstance()
   try:
-    memory = utils.ParseUnit(qa_config.get("mem"))
     disk_sizes = [utils.ParseUnit(size) for size in qa_config.get("disk")]
     disks = [{"size": size} for size in disk_sizes]
     nics = [{}]
 
     beparams = {
-      constants.BE_MEMORY: memory,
+      constants.BE_MAXMEM: utils.ParseUnit(qa_config.get(constants.BE_MAXMEM)),
+      constants.BE_MINMEM: utils.ParseUnit(qa_config.get(constants.BE_MINMEM)),
       }
 
     if use_client: