Add a simple script to manage all the machines

master
LEdoian 2 years ago
parent 098d24b61d
commit 32c4e15e3d

@ -0,0 +1,21 @@
#!/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"
;;
'attach')
remote-viewer "spice+unix://./$vm/spice.sock"
;;
*)
echo >&2 "Usage: $0 (start | stop | attach)"
exit 1
;;
esac
done

@ -4,6 +4,7 @@ iface lo inet loopback
{% for br in c.bridges %} {% for br in c.bridges %}
auto net_{{ br.num }} auto net_{{ br.num }}
iface net_{{br.num}} inet static iface net_{{br.num}} inet static
pre-up nameif -s
address 172.23.{{ br.num }}.{{ c.num }}/24 address 172.23.{{ br.num }}.{{ c.num }}/24
{% endfor %} {% endfor %}

Loading…
Cancel
Save