Add a check for minimum support Qemu version

This commit is contained in:
Martin Wimpress 2021-09-06 22:24:20 +01:00
parent 0332b23b31
commit 943612589b
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3

View file

@ -569,6 +569,12 @@ if [ ! -e "${QEMU}" ] && [ ! -e "${QEMU_IMG}" ]; then
exit 1
fi
QEMU_VER=$(${QEMU} -version | head -n1 | cut -d' ' -f4 | cut -d'(' -f1 | sed 's/\.//g')
if [ ${QEMU_VER} -lt 600 ]; then
echo "ERROR! Qemu 6.0.0 is newer is required, detected $(${QEMU} -version | head -n1 | cut -d' ' -f4 | cut -d'(' -f1)."
exit 1
fi
# Take command line arguments
if [ $# -lt 1 ]; then
usage