blob: 7156265553239c70c69f69b7d715aa1c1dc29f88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/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
add-apt-repository -y ppa:gophers/archive
apt-get -qq update
apt-get install -y qemu libvirt-bin libvirt-dev golang-1.9 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
|