aboutsummaryrefslogtreecommitdiff
path: root/travis/setup-guest
blob: e5f982a53f8aabe0e143268247662d13b179f9bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -x

unset http_proxy

check_network() {
  ping -c 3 archive.ubuntu.com
}

while check_network ; [ $? -ne 0 ];do
  echo waiting for network to be ready...
  sleep 1
done

apt-get -qq update
apt-get install -y qemu libvirt-bin libvirt-dev golang-1.8 ovmf
echo -e "<pool type='dir'>\n<name>default</name>\n<target>\n<path>/pool-default</path>\n</target>\n</pool>" > pool.xml
mkdir /pool-default
chmod a+rwx /pool-default
virsh pool-define pool.xml
virsh pool-start default