diff options
Diffstat (limited to 'kvmx')
-rwxr-xr-x | kvmx | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1312,6 +1312,11 @@ function kvmx_restart { echo "Guest $VM was not running, so starting it anyway..." kvmx_start else + #if [ "$ssh_support" != "y" ]; then + # echo sudo reboot | kvmx_ssh + # exit + #fi + echo "Powering off guest $VM..." kvmx_poweroff @@ -1616,11 +1621,15 @@ function kvmx_compress { exit 1 fi + if [ "$qcow2_compression" != "0" ]; then + $compression = "-c" + fi + # Size before compression local size_before_bytes="`du $image | awk '{ print $1 }'`" local size_before_human="`du -h $image | awk '{ print $1 }'`" - qemu-img convert -O qcow2 -p -c $image $image.new && mv $image.new $image || exit 1 + qemu-img convert -O qcow2 -p $compression $image $image.new && mv $image.new $image || exit 1 # Size after compression local size_after_bytes="`du $image | awk '{ print $1 }'`" |