diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 19:32:05 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 19:32:05 -0200 |
commit | d340da83d72b102106922a426ee2ece60501ac61 (patch) | |
tree | 956948db6ef6969e0417318bf9edd0c8294aecb6 | |
parent | 79dceafaec991c67822ebce8d998bc775f7afb46 (diff) | |
download | kvmx-d340da83d72b102106922a426ee2ece60501ac61.tar.gz kvmx-d340da83d72b102106922a426ee2ece60501ac61.tar.bz2 |
Adds spice config param
-rwxr-xr-x | kvmx | 12 | ||||
-rw-r--r-- | kvmxfile | 3 |
2 files changed, 11 insertions, 4 deletions
@@ -383,14 +383,18 @@ function kvmx_up { net_opts="tap,ifname=$tap,script=no,downscript=no,vlan=0,name=hostnet0 -device virtio-net-pci,vlan=0,id=net0,mac=$mac_address,bus=pci.0" fi + if [ -z "$spice" ] || [ "$spice" == "1" ]; then + spice_opts"-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" + spice_opts"$spice_opts -device virtio-serial-pci" + spice_opts"$spice_opts -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0" + spice_opts"$spice_opts -chardev spicevmc,id=spicechannel0,name=vdagent" + fi + # Run virtual machine # See https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging nohup kvm -m $memory -name $VM \ -drive file=$image,if=$drive_interface $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 \ + $spice \ -chardev "socket,id=monitor,path=$MONITORFILE,server,nowait" -mon chardev=monitor,mode=readline \ -chardev "socket,id=serial0,path=$CONSOLEFILE,server" -device isa-serial,chardev=serial0 \ -smp $smp -soundhw ac97 -cpu host -balloon virtio \ @@ -64,6 +64,9 @@ graphics="-vga qxl" #vnc_client="xvncviewer" vnc_client="virt-viewer" +# SPICE support +spice="1" + # Set this if you want to attach an spice client when the machine boots. run_spice_client="1" |