summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2016-02-25 13:09:19 -0800
committerBrian Dolbec <dolsen@gentoo.org>2016-02-25 13:09:19 -0800
commita968d725358b1fd45022dc278bcca35fc9244686 (patch)
tree75c0145f8c4ae6a16d95e13f678593df570455db /app-emulation/qemu-init-scripts/files/qemu-init-script
parentUpdate the binary determination code (diff)
downloadkvm-tools-a968d725358b1fd45022dc278bcca35fc9244686.tar.gz
kvm-tools-a968d725358b1fd45022dc278bcca35fc9244686.tar.bz2
kvm-tools-a968d725358b1fd45022dc278bcca35fc9244686.zip
Add MACHINE, CPU, ENABLE_KVM options
ENABLE_KVM replaces the DISABLE_KVM option that was present only in the init script. It did not have a corresponding conf.d option example. MACHINE allows for the specifcation of the system to emulate. CPU allows setting the specific cpu to emulate.
Diffstat (limited to 'app-emulation/qemu-init-scripts/files/qemu-init-script')
-rw-r--r--app-emulation/qemu-init-scripts/files/qemu-init-script6
1 files changed, 4 insertions, 2 deletions
diff --git a/app-emulation/qemu-init-scripts/files/qemu-init-script b/app-emulation/qemu-init-scripts/files/qemu-init-script
index ff42d78..1ca9670 100644
--- a/app-emulation/qemu-init-scripts/files/qemu-init-script
+++ b/app-emulation/qemu-init-scripts/files/qemu-init-script
@@ -186,8 +186,10 @@ start() {
-runas ${DROP_USER} -name ${VMNAME} \
-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}
+ ${ENABLE_KVM:+--enable-kvm} ${CPU:+-cpu ${CPU}} \
+ ${MACHINE:+-M ${MACHINE}} \
+ ${MEMORY:+-m ${MEMORY}} ${SMP:+-smp ${SMP}} \
+ ${OTHER_ARGS}
einfo "invoking ${@}"
"${@}"
ret=$?