Update UEFI VM script with correct paths and add snapshot script
This commit is contained in:
19
take_snapshot.sh
Executable file
19
take_snapshot.sh
Executable 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
|
||||
Reference in New Issue
Block a user