Skip to content

Commit

Permalink
revised health checker
Browse files Browse the repository at this point in the history
milliseconds, almost instant ...

fix for earlier pr which failed on new installs
if disk was not present #848
  • Loading branch information
TuxVinyards authored and flexiondotorg committed Apr 12, 2024
1 parent 77123d0 commit d030221
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,15 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
exit 1
fi

if [ -e "${disk_img}" ]; then
DiskChkMsg="$("$QEMU_IMG" check -q "${disk_img}" 2>&1)"
if [[ $DiskChkMsg ]]; then
echo; echo "ERROR! disk.qcow2 has problems. Try qemu-img check --help."
echo; echo "$DiskChkMsg" ; echo
exit 1
fi
fi

VMDIR=$(dirname "${disk_img}")
VMNAME=$(basename "${VM}" .conf)
VMPATH=$(realpath "$(dirname "${VM}")")
Expand Down

0 comments on commit d030221

Please sign in to comment.