From 9c8a8bdc69f7dbb63d7605f735cd7c227c7e5e01 Mon Sep 17 00:00:00 2001 From: Raphael Dannecker Date: Wed, 15 Jan 2025 12:22:37 +0100 Subject: [PATCH] Increase minimum available disk space after downloading a new vm image --- roles/lmn_vm/files/vm-sync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/lmn_vm/files/vm-sync b/roles/lmn_vm/files/vm-sync index 3b65077..72f5c6b 100755 --- a/roles/lmn_vm/files/vm-sync +++ b/roles/lmn_vm/files/vm-sync @@ -22,7 +22,7 @@ get_torrent() { cd "${VM_SYSDIR}" echo Size needed: $(get_image_size "${VM_NAME}.qcow2.torrent") " Bytes (VM-Image) + 5GB (spare)" echo Size available: $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) - while [[ $(( $(get_image_size "${VM_NAME}.qcow2.torrent") + 5000000000 )) -gt $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) ]]; do + while [[ $(( $(get_image_size "${VM_NAME}.qcow2.torrent") + 15000000000 )) -gt $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) ]]; do echo "Not enough space to get ${VM_NAME}." FILENAME="$(head -1 vm_usage_information.txt)" if [[ -z $FILENAME ]]; then