diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-05-26 10:05:10 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-05-26 10:05:10 -0300 |
commit | ae845472f6aea3955d0893067d3ddc74880fa841 (patch) | |
tree | d3335b163d87d32420d2e09c1f2b4e369fb62b1d /kvmx | |
parent | 577e07f537d3edc6925d65f8829fdb506b522a2d (diff) | |
download | kvmx-ae845472f6aea3955d0893067d3ddc74880fa841.tar.gz kvmx-ae845472f6aea3955d0893067d3ddc74880fa841.tar.bz2 |
Adds memory, smp and qemu_opts params
Diffstat (limited to 'kvmx')
-rwxr-xr-x | kvmx | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -308,16 +308,24 @@ function kvmx_up { graphics="-vga qxl" fi + if [ -z "$memory" ]; then + memory="2048" + fi + + if [ -z "$smp" ]; then + smp="2" + fi + # Run virtual machine # See https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging - nohup kvm -m 2048 -name $VM -drive file=$image,if=virtio $graphics $shared \ + nohup kvm -m $memory -name $VM -drive file=$image,if=virtio $graphics $shared \ -spice port=$PORT,addr=127.0.0.1,disable-ticketing,streaming-video=off,jpeg-wan-compression=never,playback-compression=off,zlib-glz-wan-compression=never,image-compression=off \ -device virtio-serial-pci \ -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \ -chardev spicevmc,id=spicechannel0,name=vdagent \ - -smp 2 -soundhw ac97 -cpu host -balloon virtio \ + -smp $smp -soundhw ac97 -cpu host -balloon virtio \ -net nic,model=virtio \ - -net user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd &> $LOGFILE < /dev/null & + -net user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd $qemu_opts &> $LOGFILE < /dev/null & PID="$!" |