From c675b29dbc3f9b53b21e8998c3b0172932c7bd11 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 12 Dec 2015 14:42:12 +0100 Subject: added DRIVE_FORMAT --- app-emulation/qemu-init-scripts/files/qemu-conf.example | 8 ++++++++ app-emulation/qemu-init-scripts/files/qemu-init-script | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'app-emulation') diff --git a/app-emulation/qemu-init-scripts/files/qemu-conf.example b/app-emulation/qemu-init-scripts/files/qemu-conf.example index 54f089f..58beaf7 100644 --- a/app-emulation/qemu-init-scripts/files/qemu-conf.example +++ b/app-emulation/qemu-init-scripts/files/qemu-conf.example @@ -46,6 +46,14 @@ DISKIMAGE=/mnt/kvm/gentoo64.qcow2 # #DRIVE_MODEL= +# Drive format. +# +# See qemu documentation, +# +# Defaults to autodetection. +# +#DRIVE_FORMAT= + ## General settings diff --git a/app-emulation/qemu-init-scripts/files/qemu-init-script b/app-emulation/qemu-init-scripts/files/qemu-init-script index 2102cc0..4eeb42b 100644 --- a/app-emulation/qemu-init-scripts/files/qemu-init-script +++ b/app-emulation/qemu-init-scripts/files/qemu-init-script @@ -184,7 +184,7 @@ start() { "${vm_args[@]}" \ -pidfile ${PIDFILE} -monitor unix:${MONITOR},server,nowait \ -runas ${DROP_USER} -name ${VMNAME} \ - -drive file="${DISKIMAGE//,/,,}",if=${DRIVE_MODEL:-virtio},cache=${DRIVE_CACHE:-none} \ + -drive file="${DISKIMAGE//,/,,}",if=${DRIVE_MODEL:-virtio},cache=${DRIVE_CACHE:-none}${DRIVE_FORMAT:+,format=${DRIVE_FORMAT}} \ "${NIC_COMMAND[@]}" \ ${DISABLE_KVM:---enable-kvm} \ ${MEMORY:+-m ${MEMORY}} ${SMP:+-smp ${SMP}} ${OTHER_ARGS} -- cgit v1.2.3-65-gdbad