From: Ian Kelling Date: Mon, 16 Oct 2017 03:21:11 +0000 (-0700) Subject: failed 9p experiment X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=a5ab31675fd4b19fb5dcd32987c3323f0686fed0 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 --- 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