delete old VM-images when running out of space

This commit is contained in:
Raphael Dannecker 2024-03-10 10:00:26 +01:00
parent c99ec444f8
commit 30f24bb666
3 changed files with 74 additions and 16 deletions

View file

@ -22,3 +22,7 @@ shift "$((OPTIND -1))"
for i in *.qcow2; do
[[ -f "${VM_DIR}/${i}" ]] || ln "${i}" "${VM_DIR}/${i}"
done
# allow lmnsynci to remove old vm images
chgrp lmnsyni "${VM_DIR}"
chmod g+w "${VM_DIR}"