lmn-client/roles/lmn_vm/files/start-virtiofsd.sh
2023-09-04 15:38:03 +02:00

16 lines
374 B
Bash
Executable file

#!/usr/bin/bash
set -eu
# if less than one arguments supplied, display usage
if [[ $# -ne 1 ]]; then
echo "This script takes as input the name of the VM " >&2
echo "Usage: $0 vm_name" >&2
exit 1
fi
VM_NAME="$1"
## Make sure VMs can read the base directory:
chgrp 1010 "/lmn/media/${SUDO_USER}"
systemctl start virtiofs@${VM_NAME}-clone:${SUDO_USER}.service