Skip to content

Commit

Permalink
contest: vm: support setting memory size
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
kuba-moo committed Nov 4, 2024
1 parent 935b553 commit 4297af0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contest/remote/lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ def start(self, cwd=None):
cpus = self.config.get('vm', 'cpus', fallback="")
if cpus:
cmd += ["--cpus", cpus]
mem = self.config.get('vm', 'mem', fallback="")
if mem:
cmd += ["--memory", mem]

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

0 comments on commit 4297af0

Please sign in to comment.