This commit is contained in:
2025-06-05 13:01:49 +00:00
parent dd52f1afe6
commit 719baaf847
14 changed files with 47 additions and 52 deletions

26
arch-user/bin/qemu/arch.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
if [ -z "$1" ]; then
echo Error: no name >&2
exit 1
fi
if ! screen -ls | grep -q qemu-arch; then
screen-detach "qemu-arch-$1" \
qemu-system-x86_64 "$HOME/lfs/vm/$1" \
-display none \
-m 2G \
-accel kvm -cpu host \
-net nic -net user,hostfwd=tcp:127.0.0.1:2222-:22
fi
screen -ls | grep qemu-arch
if ! screen -ls | grep -q "qemu-arch-$1"; then
echo Error: another kind is running >&2
exit 1
fi
while true; do
ssh arch@127.0.0.1 -p 2222 && break
sleep 5
done