aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-11 13:09:23 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-11 13:09:23 -0300
commit9d5c8b8cb92b6a6cd0b4f185b49cbad267e680ef (patch)
treecd3a8908deda1d4d9c4e219eb133d20add088a5e
parent8356c30791a582ffc357a5522cc5ec9e6c7140a2 (diff)
downloadkvmx-9d5c8b8cb92b6a6cd0b4f185b49cbad267e680ef.tar.gz
kvmx-9d5c8b8cb92b6a6cd0b4f185b49cbad267e680ef.tar.bz2
Honor format config at kvmx_install
-rwxr-xr-xkvmx6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index 2425658..37d35b5 100755
--- a/kvmx
+++ b/kvmx
@@ -1629,9 +1629,13 @@ function kvmx_install {
memory="2048"
fi
+ if [ -z "$format" ]; then
+ format="qcow2"
+ fi
+
if [ ! -e "$image" ]; then
echo "Creating $image with size $size..."
- qemu-img create -f qcow2 $image $size
+ qemu-img create -f $format $image $size
fi
kvm -m $memory -net nic,model=virtio -net user -drive file=$image -cdrom $media