Compare commits

..

No commits in common. "7611715fbe652e13d214d59b2c6cfce170e13779" and "7d0a44df213a263fae95069e3aef33dfd6c1249e" have entirely different histories.

5 changed files with 40 additions and 0 deletions

View file

8
etc/runit/sv/virtiofsd/finish Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh -e
# Read configuration
sourceconf() { [ -r "$1" ] && . "$1"; }
sourceconf ./conf
# Delete socket and PID file
exec rm -f "$socket" "${socket}.pid"

13
etc/runit/sv/virtiofsd/run Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh -e
# Read configuration
sourceconf() {
[ -r "$1" ] && . "$1"
}
sourceconf ./conf
# Start a virtiofsd sharing qemu shared dir
exec /usr/lib/virtiofsd \
--shared-dir "$shared_dir" \
--socket-path "$socket" \
--socket-group qemu

15
qemu/launchers/virtiofs Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh -x
base=$(echo "$QEMUSH_BASE" | cut -d , -f 1)
QEMUSH_BASE=$(echo "$QEMUSH_BASE" | sed "s/^${base}//" | sed 's/^,//')
. /run/runit/service/virtiofsd/conf
if [ -S "$socket" ]; then set -- \
-chardev socket,id=char0,path="${socket}" \
-device vhost-user-fs-pci,chardev=char0,tag=shared \
-object memory-backend-memfd,id=mem,size="${QEMUSH_RAM}",share=on \
-numa node,memdev=mem \
"$@"
fi
exec "$base" "$@"

View file

@ -1,6 +1,10 @@
#!/usr/bin/env sh
export QEMUSH_RAM=4G
export QEMUSH_BASE=kvm
[ -z "$QEMUSH_NAME" ] && {
export QEMUSH_NAME
QEMUSH_NAME=$(basename "$0")
}
# Launch the virtual machine
set -- spice \