From: Silvio Rhatto Date: Wed, 5 Jun 2019 17:36:40 +0000 (-0300) Subject: Compress: check if image exists X-Git-Tag: 0.1.0~127 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=442c6c82e06dc0b33d48850cf3f2ec1ac6c0f028;p=kvmx.git Compress: check if image exists --- diff --git a/kvmx b/kvmx index b146a28..920e346 100755 --- a/kvmx +++ b/kvmx @@ -1939,6 +1939,11 @@ function kvmx_compress { exit 1 fi + if [ ! -e "$image" ]; then + echo "$BASENAME: image not found: $image" + exit 1 + fi + # Avoid trying to convert guest using other images such as LVM volumes if [ "$format" != "qcow2" ]; then echo "$BASENAME: please convert guest $VM image to qcow2 and update your config"