add disk health check
This commit is contained in:
parent
030e60a2c4
commit
0e4fc7e79a
8
quickemu
8
quickemu
|
@ -1749,6 +1749,14 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
VMDIR=$(dirname "${disk_img}")
|
VMDIR=$(dirname "${disk_img}")
|
||||||
VMNAME=$(basename "${VM}" .conf)
|
VMNAME=$(basename "${VM}" .conf)
|
||||||
VMPATH=$(realpath "$(dirname "${VM}")")
|
VMPATH=$(realpath "$(dirname "${VM}")")
|
||||||
|
|
Loading…
Reference in New Issue