diff options
author | 2015-12-12 14:42:12 +0100 | |
---|---|---|
committer | 2015-12-12 14:42:12 +0100 | |
commit | c675b29dbc3f9b53b21e8998c3b0172932c7bd11 (patch) | |
tree | 5badef2db45e4fa3d6679d3e5e4847b715191638 | |
parent | Add qemu-init-scripts-0.2.2.ebuild with reduced keywords to ~ (diff) | |
download | kvm-tools-c675b29dbc3f9b53b21e8998c3b0172932c7bd11.tar.gz kvm-tools-c675b29dbc3f9b53b21e8998c3b0172932c7bd11.tar.bz2 kvm-tools-c675b29dbc3f9b53b21e8998c3b0172932c7bd11.zip |
added DRIVE_FORMAT
-rw-r--r-- | app-emulation/qemu-init-scripts/files/qemu-conf.example | 8 | ||||
-rw-r--r-- | app-emulation/qemu-init-scripts/files/qemu-init-script | 2 |
2 files changed, 9 insertions, 1 deletions
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} |