Random OpenOffice updates.
[libguestfs-talks.git] / 2014-fosdem / builder.sh
1 #!/bin/bash -
2
3 VIRT_BUILDER_SOURCE=file://$HOME/d/libguestfs/builder/website/index.asc
4 export VIRT_BUILDER_SOURCE
5
6 guests=( $(
7   virt-builder -l | awk '{print $1}'
8 ) )
9 formats=( raw qcow2 )
10 count=0
11
12 while true; do
13     guest=${guests[$(($RANDOM % ${#guests[*]}))]}
14     format=${formats[$(($RANDOM % ${#formats[*]}))]}
15
16     ((count++))
17     echo -e "\n*** Building guest # $count\n"
18
19     virt-builder $guest --output $guest.img \
20         --format $format \
21         --no-sync \
22         --hostname test$count.example.com \
23         --timezone Europe/Brussels \
24         --write '/etc/motd:
25             Welcome to FOSDEM 2014'
26
27     rm $guest.img; # Save space!
28 done