progress snapshot

This commit is contained in:
2026-01-21 08:33:09 -05:00
parent 6c96f3c549
commit 1339705f9d
20 changed files with 3387 additions and 46 deletions

View File

@@ -2,7 +2,7 @@
# Football VM Control Script (libvirt/virsh)
# Manages QEMU VM for testing Football ISO
set -e
set -euo pipefail
BUILD_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ISO_FILE="$BUILD_DIR/output/football-installer.iso"
@@ -115,7 +115,19 @@ EOF
stop)
echo "Stopping VM..."
virsh shutdown "$VM_NAME" && echo "VM stopped" || virsh destroy "$VM_NAME" && echo "VM destroyed"
virsh shutdown "$VM_NAME" 2>/dev/null || true
# Wait for VM to actually stop (up to 30 seconds)
for _ in {1..30}; do
if ! virsh list --name | grep -q "^${VM_NAME}$"; then
echo "VM stopped"
break
fi
sleep 1
done
# If still running, force destroy
if virsh list --name | grep -q "^${VM_NAME}$"; then
virsh destroy "$VM_NAME" && echo "VM destroyed"
fi
;;
reboot)
@@ -141,10 +153,8 @@ EOF
;;
delete)
echo "WARNING: This will delete VM, disk, and ISO!"
echo "Press Ctrl+C to cancel, or Enter to continue..."
read
echo "Deleting VM, disk, and ISO..."
# Stop VM
virsh destroy "$VM_NAME" 2>/dev/null || true
virsh undefine "$VM_NAME" 2>/dev/null || true