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
This commit is contained in:
parent
4106ae65ac
commit
f4dde9280b
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user