From f4dde9280b02d5473c7adf8da41730ee6a0aafc2 Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Fri, 10 Nov 2017 05:25:21 -0600 Subject: [PATCH] Fix qemu image compatibility mode The qemu compatibility mode preserves compatibility with the previous generation of the qemu-img tools. In 2014, when Ubuntu Trusty was introduced, it was set to compat=0.10 to provide compatibility with servers installed with Ubuntu Precise as both Trusty and Precise were supported at that time. Precise is now End of Life since April 2017, so the compatibility mode is being updated to the default mode that exists for Trusty which is compat=1.1. The mode has not been updated since then. Updating the mode has the advantage of picking up support for newer qemu features like more efficient copy-on-read behavior. Setting it to an explicit value ensures that the mode is not silently changed. Change-Id: Ifdfccf252585e7e2805b6dfc0940b630ad746cfb --- integration/scripts/functions_qemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/scripts/functions_qemu b/integration/scripts/functions_qemu index e05468b188..41b9682a2b 100644 --- a/integration/scripts/functions_qemu +++ b/integration/scripts/functions_qemu @@ -45,7 +45,7 @@ function build_vm() { export BRANCH_OVERRIDE export DIB_APT_CONF_DIR=/etc/apt/apt.conf.d export DIB_CLOUD_INIT_ETC_HOSTS=true - local QEMU_IMG_OPTIONS=$(! $(qemu-img | grep -q 'version 1') && echo "--qemu-img-options compat=0.10") + local QEMU_IMG_OPTIONS="--qemu-img-options compat=1.1" disk-image-create -a amd64 -o "${VM}" \ -x ${QEMU_IMG_OPTIONS} ${DISTRO} ${EXTRA_ELEMENTS} vm \ cloud-init-datasources ${DISTRO}-${RELEASE}-guest ${DISTRO}-${RELEASE}-${SERVICE_TYPE}