3 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
6 [[ $EUID == 0 ]] ||
exec sudo
-E "$BASH_SOURCE" "$@"
8 virsh destroy demohost ||
:
10 # there's some other ways to configure it, but by default, we get perms of this user
11 usermod
-a -G ian libvirt-qemu
12 usermod
-a -G traci libvirt-qemu
15 virsh attach-device demohost
<(e
"<filesystem type='mount' accessmode='mapped'> <source dir='/q'/> <target dir='/q'/> </filesystem>") --config ||
:
16 virsh attach-device demohost
<(e
"<filesystem type='mount' accessmode='mapped'> <source dir='/a'/> <target dir='/a'/> </filesystem>") --config ||
:
19 while ! timeout
-s 9 5 ssh demohost
:; do sleep 3; done
21 ssh root@demohost bash
-s <<'EOFOUTER'
24 cat >>/etc/modules <<EOF
33 cat >>/etc/fstab <<'EOF'
34 /a /a 9p trans=virtio 0 0
35 /q /q 9p trans=virtio 0 0