#!/bin/bash -lx # Deploy fai configuration to faiserver, # then start a virtual machine to test the config. set -eE -o pipefail trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR cd "${BASH_SOURCE%/*}" ./fai-redep s virshrm demohost ||: for f in /var/lib/libvirt/images/demohost{,b}; do [[ -e $f ]] || s qemu-img create -o preallocation=metadata -f qcow2 $f 30G done # osinfo-query os | gr jessie s virt-install --os-variant debian8 --cpu host -n demohost --pxe -r 2048 --vcpus 1 \ --disk path=/var/lib/libvirt/images/demohost \ --disk path=/var/lib/libvirt/images/demohostb -w bridge=br0,mac=52:54:00:9c:ef:ad