Skip to content

Commit 4d92db1

Browse files
committed
contest: vm: support setting memory size
Add first class citizen setting for memory size, since we have one for CPU count. Like QEMU and vng the memory size is in MB. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a0992af commit 4d92db1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contest/remote/lib/vm.py

+3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ def start(self, cwd=None):
179179
cpus = self.config.get('vm', 'cpus', fallback="")
180180
if cpus:
181181
cmd += ["--cpus", cpus]
182+
mem = self.config.get('vm', 'mem', fallback="")
183+
if mem:
184+
cmd += ["--memory", mem]
182185

183186
print(f"INFO{self.print_pfx} VM starting:", " ".join(cmd))
184187
self.log_out += "# " + " ".join(cmd) + "\n"

0 commit comments

Comments
 (0)