From 28c3a6fbb806e9499fb45b14d3a023f2ecdf9d2a Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Tue, 27 May 2025 10:09:17 +0200 Subject: [PATCH 1/5] examples: Activate common vars when not set Signed-off-by: Joel Granados --- examples/vm/common.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/vm/common.conf b/examples/vm/common.conf index 90e257e..942223b 100644 --- a/examples/vm/common.conf +++ b/examples/vm/common.conf @@ -1,10 +1,10 @@ #!/usr/bin/env bash # vmctl run parameters -QEMU_IMG=$(/usr/bin/which qemu-img) -QEMU_EDK2_AARCH64="/usr/share/edk2-armvirt/aarch64/QEMU_EFI.fd" -GUEST_KERNEL_APPEND_EXTRA="audit=0" -GUEST_KERNEL_BOOTDEV="/dev/vda1" +: "${QEMU_IMG:=$(/usr/bin/which qemu-img)}" +: "${QEMU_EDK2_AARCH64:="/usr/share/edk2-armvirt/aarch64/QEMU_EFI.fd"}" +: "${GUEST_KERNEL_APPEND_EXTRA:="audit=0"}" +: "${GUEST_KERNEL_BOOTDEV:="/dev/vda1"}" # nvme-specific local parameters -default_nvme_ns_extra="logical_block_size=4096,physical_block_size=4096" +: "${default_nvme_ns_extra:="logical_block_size=4096,physical_block_size=4096"}" From c3d22b713b41dee0dd628d9a855f692fa6bf1253 Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Tue, 27 May 2025 10:58:02 +0200 Subject: [PATCH 2/5] examples: remove /usr/bin from exec path This is relevant for environments that do not have the executables in /usr/bin; like NIX. Signed-off-by: Joel Granados --- examples/vm/common.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vm/common.conf b/examples/vm/common.conf index 942223b..5d4058c 100644 --- a/examples/vm/common.conf +++ b/examples/vm/common.conf @@ -1,7 +1,7 @@ #!/usr/bin/env bash # vmctl run parameters -: "${QEMU_IMG:=$(/usr/bin/which qemu-img)}" +: "${QEMU_IMG:=$(which qemu-img)}" : "${QEMU_EDK2_AARCH64:="/usr/share/edk2-armvirt/aarch64/QEMU_EFI.fd"}" : "${GUEST_KERNEL_APPEND_EXTRA:="audit=0"}" : "${GUEST_KERNEL_BOOTDEV:="/dev/vda1"}" From d3ef318f61f46159eaba422c16b24a5e8aa01cd2 Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Tue, 27 May 2025 11:24:28 +0200 Subject: [PATCH 3/5] cmd/run: Add VMPRE to what gets printed on --print Signed-off-by: Joel Granados --- cmd/run | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/run b/cmd/run index 7d05554..97241fd 100644 --- a/cmd/run +++ b/cmd/run @@ -196,6 +196,15 @@ _run() { params=("${QEMU_PARAMS[@]}") if [[ -v do_print ]]; then + if [[ -v VMPRE ]]; then + echo "Before QEMU:" + for cmd in "${VMPRE[@]}"; do + echo -n " $cmd" + echo + done + fi + echo + local nargs="${#params[@]}" echo "$QEMU_SYSTEM_BINARY \\" From 81cc0c08582afb551fad6db568e6582a1a5f86b1 Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Mon, 2 Jun 2025 11:13:51 +0200 Subject: [PATCH 4/5] README: Adjust Markdown formating in README.md Signed-off-by: Joel Granados --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 849c041..5d89f0b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ running. 2. Bootstrap a config directory with the following command: - $ ./vmctl env --bootstrap $HOME/vms --verbose + $ ./vmctl env --bootstrap $HOME/vms --verbose **Note** This will: * Check that `ssh` and `socat` are installed @@ -25,16 +25,17 @@ running. 3. There are two ways of executing `vmctl`: 1. Symlink in your path to always have it available "natively" - + ``` $ ln -s /path/to/vmctl/vmctl $HOME/bin/vmctl $ vmctl --help $ vmctl -c CONFIG - + ``` 2. Activate `vmctl` with `env` for your current shell - + ``` $ ./vmctl env --confdir $HOME/vms $ vmctl --help $ vmctl -c CONFIG + ``` 4. Prepare a boot image. The base configruation `*-base.conf` will look for a base image in `img/base.qcow2`. You can use [archbase][archbase] to build a From ded490870b2dcef581be33ed378045c7910e2565 Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Mon, 2 Jun 2025 11:19:58 +0200 Subject: [PATCH 5/5] README: There is just one way of getting started Signed-off-by: Joel Granados --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d89f0b..ca58575 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ QEMU NVMe Testing Galore! running. -## Getting Started (Manual Mode) +## Getting Started 1. Clone the `vmctl` repository.