From a5ab31675fd4b19fb5dcd32987c3323f0686fed0 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 15 Oct 2017 20:21:11 -0700 Subject: [PATCH] failed 9p experiment symlinks like /a/exe/x -> /a/bin/x would fail to read, ls: cannot read symbolic link 'rs': Too many levels of symbolic links --- demohost-mount | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 demohost-mount diff --git a/demohost-mount b/demohost-mount new file mode 100755 index 0000000..416ab2e --- /dev/null +++ b/demohost-mount @@ -0,0 +1,42 @@ +#!/bin/bash +set -eE -o pipefail +trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR + + +[[ $EUID == 0 ]] || exec sudo -E "$BASH_SOURCE" "$@" + +virsh destroy demohost ||: + +# there's some other ways to configure it, but by default, we get perms of this user +usermod -a -G ian libvirt-qemu +usermod -a -G traci libvirt-qemu + + +virsh attach-device demohost <(e " ") --config ||: +virsh attach-device demohost <(e " ") --config ||: + +virsh start demohost +while ! timeout -s 9 5 ssh demohost :; do sleep 3; done + +ssh root@demohost bash -s <<'EOFOUTER' +set -eE -o pipefail + +cat >>/etc/modules <>/etc/fstab <<'EOF' +/a /a 9p trans=virtio 0 0 +/q /q 9p trans=virtio 0 0 +/q/p /p none bind 0 0 +EOF +mkdir -p /a /q /p +mount /a +mount /q +mount /p +EOFOUTER -- 2.30.2