Move dev VM script to test_tooling/dev_vm/, update paths and README

This commit is contained in:
Softer 2026-06-03 17:02:37 +03:00
parent 9a785e5ea4
commit 384045c2fd
4 changed files with 29 additions and 11 deletions

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ SAFETY_LOCK
**/**.egg*
**/**.sh
!archinstall/locales/locales_generator.sh
!scripts/dev_vm.sh
!test_tooling/dev_vm/dev_vm.sh
**/**.egg-info/
**/**build/
**/**src/

View File

@ -170,6 +170,24 @@ replace the archinstall version with a newer one and execute the subsequent step
rare case it will not work is if the source has introduced any new dependencies that are not installed yet
- Installing the branch version with `pip install --break-system-packages .` and `archinstall`
## Developer VM (recommended for contributors)
The fastest way to iterate on archinstall is the dev VM script in `test_tooling/dev_vm/`.
It builds a minimal Arch ISO with runtime deps pre-installed, then launches QEMU with the
project source mounted read-only via 9p - edit code on the host, run `archinstall` in the
guest immediately, no rebuild needed.
```shell
./test_tooling/dev_vm/dev_vm.sh # first run builds ISO, then boots
./test_tooling/dev_vm/dev_vm.sh rebuild # force rebuild ISO
./test_tooling/dev_vm/dev_vm.sh boot # boot from installed disk (no ISO)
./test_tooling/dev_vm/dev_vm.sh --bios # legacy BIOS mode
./test_tooling/dev_vm/dev_vm.sh -h # all options
```
Requires an Arch-based host with `qemu-base` installed. See the script header for details
on 9p shares, log streaming, and env overrides.
## Without a Live ISO Image
To test this without a live ISO, the simplest approach is to use a local image and create a loop device.<br>

View File

@ -18,22 +18,22 @@
# archinstall wrapper around `python -m archinstall`; clears the
# log directory on every invocation
#
# Run from the project root or from inside scripts/ - both work, the script
# resolves the project root from its own location.
# Run from the project root or from inside test_tooling/dev_vm/ - both work,
# the script resolves the project root from its own location.
#
# Usage (from project root):
# ./scripts/dev_vm.sh - build ISO if missing, fresh disk, boot
# ./scripts/dev_vm.sh rebuild | r - force rebuild ISO, fresh disk, boot
# ./scripts/dev_vm.sh keep | k - reuse disk, boot ISO
# ./scripts/dev_vm.sh boot | b - boot from installed disk (no ISO)
# ./scripts/dev_vm.sh clean | c - remove disk, NVRAM, ISO, logs
# ./scripts/dev_vm.sh -h - show this help
# ./test_tooling/dev_vm/dev_vm.sh - build ISO if missing, fresh disk, boot
# ./test_tooling/dev_vm/dev_vm.sh rebuild | r - force rebuild ISO, fresh disk, boot
# ./test_tooling/dev_vm/dev_vm.sh keep | k - reuse disk, boot ISO
# ./test_tooling/dev_vm/dev_vm.sh boot | b - boot from installed disk (no ISO)
# ./test_tooling/dev_vm/dev_vm.sh clean | c - remove disk, NVRAM, ISO, logs
# ./test_tooling/dev_vm/dev_vm.sh -h - show this help
#
# Firmware mode (default is UEFI 64-bit):
# --bios - legacy BIOS boot (SeaBIOS, no OVMF)
#
# Flag can be combined with a command:
# ./scripts/dev_vm.sh --bios rebuild
# ./test_tooling/dev_vm/dev_vm.sh --bios rebuild
#
# Env overrides:
# SCREEN_W, SCREEN_H - virtio-vga resolution (default 1280x720)
@ -44,7 +44,7 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
DEV_DIR="$PROJECT_DIR/.dev"
CONFIGS_DIR="$DEV_DIR/configs"
LOGS_DIR="$DEV_DIR/logs"