expand to multiple hosts starting with tp
[automated-distro-installer] / fai-revm
1 #!/bin/bash -lx
2
3 # Deploy fai configuration to faiserver,
4 # then start a virtual machine to test the config.
5
6 set -eE -o pipefail
7 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
8
9 cd "${BASH_SOURCE%/*}"
10
11 ./fai-redep
12
13 s virshrm demohost ||:
14
15 for f in /var/lib/libvirt/images/demohost{,b}; do
16 [[ -e $f ]] || s qemu-img create -o preallocation=metadata -f qcow2 $f 30G
17 done
18 # osinfo-query os | gr jessie
19 s virt-install --os-variant debian8 --cpu host -n demohost --pxe -r 2048 --vcpus 1 \
20 --disk path=/var/lib/libvirt/images/demohost \
21 --disk path=/var/lib/libvirt/images/demohostb -w bridge=br0,mac=52:54:00:9c:ef:ad