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