qemush/qemu/launchers/virtiofs

16 lines
422 B
Text
Raw Normal View History

#!/bin/sh -x
2024-03-09 23:32:06 +01:00
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 \
2024-03-09 23:32:06 +01:00
"$@"
fi
exec "$base" "$@"