summaryrefslogtreecommitdiff
path: root/scripts/testing/finalize-base-vm.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-27 17:22:55 -0600
committerCraig Jennings <c@cjennings.net>2026-01-27 17:22:55 -0600
commit70bb2d5ab1bf6787bc613e33f5398be2eca1f5fd (patch)
tree0d8cd5057dd32f5f312a7f3534d590b99c2f0f91 /scripts/testing/finalize-base-vm.sh
parent0c6175bfc98f2c5ff2debc665fd8bf91f9171f4e (diff)
feat(testing): rewrite test infrastructure from libvirt to direct QEMU
Replace the never-fully-operational libvirt-based VM test infrastructure with direct QEMU management and archangel ISO for fully automated, unattended base VM creation. Key changes: - vm-utils.sh: complete rewrite — QEMU process mgmt via PID file, monitor socket for graceful shutdown, qemu-img snapshots, SSH port forwarding (localhost:2222) - create-base-vm.sh: boots archangel ISO, SSHs in, runs unattended install via config file, verifies, creates clean-install snapshot - run-test.sh: snapshot revert, git bundle transfer, detached archsetup execution with setsid, polling, validation, and report generation - debug-vm.sh: CoW overlay disk, GTK display, auto-cleanup on close - setup-testing-env.sh: reduced deps to qemu-full/sshpass/edk2-ovmf/socat - cleanup-tests.sh: PID-based process management, orphan detection - validation.sh: port-based SSH (backward compatible), fuzzel/foot for Hyprland, corrected package list paths - network-diagnostics.sh: getent/curl instead of nslookup/ping (SLIRP) New files: - archsetup-test.conf: archangel config for base VM (btrfs, no encrypt) - archsetup-vm.conf: archsetup config for unattended test execution - assets/archangel.conf.example: reference archangel config Deleted: - finalize-base-vm.sh: merged into create-base-vm.sh - archinstall-config.json: replaced by archangel .conf format Tested: full end-to-end run — 51 validations passed, 0 failures. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/testing/finalize-base-vm.sh')
-rwxr-xr-xscripts/testing/finalize-base-vm.sh31
1 files changed, 0 insertions, 31 deletions
diff --git a/scripts/testing/finalize-base-vm.sh b/scripts/testing/finalize-base-vm.sh
deleted file mode 100755
index 225ffae..0000000
--- a/scripts/testing/finalize-base-vm.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# Finalize base VM after installation
-VM_NAME="archsetup-base"
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
-BASE_DISK="$PROJECT_ROOT/vm-images/archsetup-base.qcow2"
-
-echo "[i] Removing ISO from VM..."
-virsh --connect qemu:///system change-media $VM_NAME sda --eject 2>/dev/null || true
-virsh --connect qemu:///system change-media $VM_NAME hda --eject 2>/dev/null || true
-echo "[✓] ISO removed"
-
-echo "[i] Fixing base disk permissions..."
-sudo chown $USER:$USER "$BASE_DISK"
-sudo chmod 644 "$BASE_DISK"
-echo "[✓] Permissions fixed"
-
-echo "[i] Starting VM from installed system..."
-virsh --connect qemu:///system start $VM_NAME
-echo "[i] Waiting for boot..."
-sleep 30
-IP=$(virsh --connect qemu:///system domifaddr $VM_NAME 2>/dev/null | grep -oP '(\d+\.){3}\d+' | head -1)
-echo "[✓] Base VM is ready!"
-echo ""
-echo "Connect via:"
-echo " Console: virsh console $VM_NAME"
-echo " SSH: ssh root@$IP"
-echo " Password: archsetup"
-echo ""
-echo "To create a test clone:"
-echo " ./scripts/testing/run-test.sh"