Update UEFI VM script with correct paths and add snapshot script

This commit is contained in:
2026-02-05 14:18:39 +01:00
parent 7bfab2ac5b
commit 4eff9d7e22
2 changed files with 59 additions and 0 deletions

19
take_snapshot.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
SOCKET="$HOME/.local/share/iridium-installer-vm/monitor.sock"
SNAPSHOT_NAME="${1:-clean-state}"
if [ ! -S "$SOCKET" ]; then
echo "Error: QEMU monitor socket not found at $SOCKET"
echo "Is the VM running?"
exit 1
fi
echo "Taking snapshot: $SNAPSHOT_NAME"
echo "savevm $SNAPSHOT_NAME" | nc -U "$SOCKET"
if [ $? -eq 0 ]; then
echo "Snapshot command sent successfully."
else
echo "Failed to send snapshot command. Ensure 'nc' (netcat) with -U support is installed."
fi