You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
398 B
Bash
25 lines
398 B
Bash
#!/bin/sh
|
|
|
|
set -exu
|
|
|
|
for vm in output/*/; do
|
|
case "$1" in
|
|
'start')
|
|
( cd "$vm" && ./qemu.sh ) &
|
|
;;
|
|
'stop')
|
|
echo system_powerdown | ncat -U "$vm/monitor.sock"
|
|
;;
|
|
'force-stop')
|
|
echo quit | ncat -U "$vm/monitor.sock"
|
|
;;
|
|
'attach')
|
|
remote-viewer "spice+unix://./$vm/spice.sock" &
|
|
;;
|
|
*)
|
|
echo >&2 'Usage: $0 (start | [force-]stop | attach)'
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|