diff options
author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2020-11-11 20:54:19 +0900 |
---|---|---|
committer | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2020-11-11 20:54:19 +0900 |
commit | 5b62d47a905d7de17213a21e757e2777bbb27eb0 (patch) | |
tree | 2895fd23c81fe3097a33a17080fdde7a3f4c5b08 | |
parent | 88cd30f073714bd097d83bc7a6b028c0e4bf7a2b (diff) | |
download | virtme-5b62d47a905d7de17213a21e757e2777bbb27eb0.tar.gz |
run.py: introduce '--cpus' argument
Introduce a --cpu argument to virtme-run, so we can set qemu's -smp commandline
parameter.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
-rw-r--r-- | virtme/commands/run.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/virtme/commands/run.py b/virtme/commands/run.py index f9ee4dd..f11444e 100644 --- a/virtme/commands/run.py +++ b/virtme/commands/run.py @@ -75,6 +75,8 @@ def make_parser() -> argparse.ArgumentParser: help='Add a read/write virtio-blk disk. The device nodes will be /dev/disk/by-id/virtio-virtme_disk_blk_NAME.') g.add_argument('--memory', action='store', default=None, help='Set guest memory and qemu -m flag.') + g.add_argument('--cpus', action='store', default=None, + help='Set guest cpu and qemu -smp flag.') g.add_argument('--name', action='store', default=None, help='Set guest hostname and qemu -name flag.') @@ -415,6 +417,9 @@ def do_it() -> int: if args.memory: qemuargs.extend(['-m', args.memory]) + if args.cpus: + qemuargs.extend(['-smp', args.cpus]) + if args.blk_disk: for i,d in enumerate(args.blk_disk): driveid = 'blk-disk%d' % i |