Make sure there is at least 5GB of free space after the VM sync.
This commit is contained in:
		
							parent
							
								
									6e578a6d95
								
							
						
					
					
						commit
						ecad541567
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -20,9 +20,9 @@ get_torrent() { | ||||||
|       exit 1 |       exit 1 | ||||||
|     fi |     fi | ||||||
|     cd "${VM_SYSDIR}" |     cd "${VM_SYSDIR}" | ||||||
|     echo Size needed: $(get_image_size "${VM_NAME}.qcow2.torrent") |     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) |     echo Size available: $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) | ||||||
|     while [[ $(get_image_size "${VM_NAME}.qcow2.torrent") -gt $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) ]]; do |     while [[ $(( $(get_image_size "${VM_NAME}.qcow2.torrent") + 5000000000 )) -gt $(df --block-size=1 --output=avail "${VM_SYSDIR}" | sed 1d) ]]; do | ||||||
|       echo "Not enough space to get ${VM_NAME}." |       echo "Not enough space to get ${VM_NAME}." | ||||||
|       FILENAME="$(head -1 vm_usage_information.txt)" |       FILENAME="$(head -1 vm_usage_information.txt)" | ||||||
|       if [[ -z $FILENAME ]]; then |       if [[ -z $FILENAME ]]; then | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Raphael Dannecker
						Raphael Dannecker