From 45ba46043d86c732f37714f4d2c39eba6b94e479 Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 10 Mar 2024 22:47:57 +0100 Subject: [PATCH] fix: qemu flags docs --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fc65ea9..85f18a4 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,32 @@ # VMs ## HOW-TO + To start (or create) a VM, go in the desired folder and run ```console -$ ./run.sh +$ ./run.sh [OPTS] ``` +You can pass `qemu` flags to `./run.sh` directly or you can make theses flags +permanent in `run.sh` (this VM only) or `lib.sh` (all VMs). + +See `QEMU(1)` for all options. + ### CPU/RAM limit -See QEMU(1) for CPU limit
. -Default RAM flag: `-m "2G,maxmem=$((MAX_RAM - 2))G"`.
-You can limit the CPU/RAM usage with these flags: + +See `QEMU(1)` for CPU limit.
+Default RAM flag: `-m "2G,maxmem=$((MAX_RAM - 2))G"`. ``` ./run.sh -smp "$NB_CPUS,maxcpus=$MAX_CPUS" \ -m "${RAM}G,maxmem=${MAX_RAM}G" ``` -You can make this permanent in run.sh (this VM only) or lib.sh (all VMs). ### Port forwarding + To forward host port 2222 to guest 22: ``` ./run.sh -nic user,hostfwd=tcp::2222-:22 ``` -You can make this permanent in run.sh (this VM only) or lib.sh (all VMs). ### USB passthrough