arighi / virtme-ng

Quickly build and run kernels inside a virtualized snapshot of your live system
GNU General Public License v2.0
417 stars 45 forks source link

Update README.md #105

Closed l-0-l closed 5 months ago

l-0-l commented 5 months ago

Fix an updated flag reference

l-0-l commented 5 months ago

Interesting! Here's my command and the result:

$ virtme-run --kdir . --mods=auto --cpus 1 --memory 4G --rw --verbose --pwd --user $USER --name my_machine --network user
usage: virtme-run [-h] [--installed-kernel [VERSION] | --kimg [KIMG] | --kdir KDIR] [--mods {none,use,auto}] [-a KOPT] [--root ROOT] [--rw] [--graphics [BINARY]] [--verbose] [--net [{user,bridge,loop}]]
                  [--balloon] [--sound] [--snaps] [--disk NAME=PATH] [--blk-disk NAME=PATH] [--memory MEMORY] [--numa NUMA] [--cpus CPUS] [--name NAME] [--user USER] [--script-sh SHELL_COMMAND]
                  [--script-exec BINARY] [--arch ARCHITECTURE] [--busybox PATH_TO_BUSYBOX] [--qemu-bin QEMU_BIN] [-q QEMU_OPT] [--qemu-opts ...] [--disable-microvm] [--disable-kvm] [--force-initramfs]
                  [--force-9p] [--dry-run] [--show-command] [--save-initramfs SAVE_INITRAMFS] [--show-boot-console] [--no-virtme-ng-init] [--pwd | --cwd CWD] [--rwdir RWDIR] [--rodir RODIR]
                  [--overlay-rwdir OVERLAY_RWDIR]
virtme-run: error: unrecognized arguments: --network user

It runs fine when --network is replaced with --net, and that's what I see in the usage help. I've cloned and compiled it today:

$ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
$ git log --oneline -2
9c203ed (HEAD -> main, origin/main, origin/HEAD) Merge pull request #103 from jpirko/net_loop
75e0180 virtme: allow user to ask for multiple network devices
arighi commented 5 months ago

@l-0-l It probably depends on different versions of the argparse python module, looking at the code it makes more sense to document your syntax, therefore, approved! :)

Thanks for the extra details.