|
1 | 1 | set -e |
2 | | -# Making a 1G disk on /dev/loop0 |
3 | | -rm -f bigdisk |
4 | | -dd if=/dev/zero of=bigdisk bs=1 seek=16G count=0 |
| 2 | +set -x |
| 3 | + |
| 4 | +# There is an important bugfix in the master branch. If you see |
| 5 | +# ECONNREFUSED you might need this: |
| 6 | +# opam pin add conduit git://github.com/mirage/ocaml-conduit -y |
| 7 | +# If you are using a XenServer build environment then the patch is |
| 8 | +# already included in the RPM. |
| 9 | + |
| 10 | +if [ "$EUID" -ne "0" ]; then |
| 11 | + echo "Please run me as uid 0. I need to create a loop device and device mapper devices" |
| 12 | + exit 1 |
| 13 | +fi |
| 14 | + |
| 15 | +# Making a 1G disk |
| 16 | +rm -f bigdisk _build/xenvm*.out |
| 17 | +dd if=/dev/zero of=bigdisk bs=1 seek=256G count=0 |
| 18 | +echo Using /dev/loop0 |
5 | 19 | losetup /dev/loop0 bigdisk |
6 | | -BISECT_FILE=xenvm.coverage ./xenvm.native format /dev/loop0 --vg djstest |
7 | | -BISECT_FILE=xenvmd.coverage ./xenvmd.native & |
| 20 | +cat test.xenvmd.conf.in | sed -r "s|@BIGDISK@|/dev/loop0|g" > test.xenvmd.conf |
| 21 | +mkdir -p /etc/xenvm.d |
| 22 | +BISECT_FILE=_build/xenvm.coverage ./xenvm.native format /dev/loop0 --vg djstest |
| 23 | +BISECT_FILE=_build/xenvmd.coverage ./xenvmd.native --config ./test.xenvmd.conf --daemon |
| 24 | + |
| 25 | +export BISECT_FILE=_build/xenvm.coverage |
8 | 26 |
|
9 | | -export BISECT_FILE=xenvm.coverage |
| 27 | +./xenvm.native set-vg-info --pvpath /dev/loop0 -S /tmp/xenvmd djstest --local-allocator-path /tmp/xenvm-local-allocator --uri file://local/services/xenvmd/djstest |
10 | 28 |
|
11 | | -./xenvm.native create --lv live |
12 | | -./xenvm.native activate --lv live `pwd`/djstest-live /dev/loop0 |
| 29 | +./xenvm.native lvcreate -n live -L 4 djstest |
| 30 | +./xenvm.native lvchange -ay /dev/djstest/live |
13 | 31 |
|
14 | | -./xenvm.native benchmark |
| 32 | +#./xenvm.native benchmark |
15 | 33 |
|
16 | | -./xenvm.native host-create host1 |
17 | | -./xenvm.native host-connect host1 |
| 34 | +./xenvm.native host-create /dev/djstest host1 |
| 35 | +#./xenvm.native host-connect /dev/djstest host1 |
18 | 36 |
|
19 | | -echo Run 'sudo ./local_allocator.native' and type 'djstest-live' to request an allocation |
| 37 | +#echo Run 'sudo ./xenvm.native host-connect /dev/djstest host1' to connect to the local allocator' |
| 38 | +#echo Run 'sudo ./local_allocator.native' and type 'djstest-live' to request an allocation |
20 | 39 | echo Run './cleanup.sh' to remove all volumes and devices |
0 commit comments