Index: start.template ================================================================== --- start.template +++ start.template @@ -1,15 +1,27 @@ #!/bin/sh +# Get machine name from current directory name NAME=$(basename $(pwd)) # if remote access is enabled, then there should be # SPICE_PASSWORD=password +QEMU_AUDIO_DRV=spice +export QEMU_AUDIO_DRV +if [ -n "$SPICE_PASSWORD" ]; then + SPICE_AUTH="password=$SPICE_PASSWORD" +else + SPICE_AUTH="disable-ticketing,addr=127.0.0.1" +fi SPICE_PORT=$(find_free_port 5900) -. /etc/vws/vm.conf + {qemubinary} -name $NAME {accel} \ {drive} \ {cdrom} \ {net} \ {usb} \ {sound} \ -$MONITOR_OPTIONS \ -$SPICE_OPTIONS \ -$PROCESS_OPTIONS +-chardev socket,server,nowait,path=/home/vitus/asta.monitor,id=monitor \ +-mon chardev=monitor,mode=readline \ +-vga qxl \ +-spice port=$SPICE_PORT,$SPICE_AUTH \ +-device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent \ +-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \ +-daemonize -pidfile pid DELETED vm.conf Index: vm.conf ================================================================== --- vm.conf +++ vm.conf @@ -1,14 +0,0 @@ -QEMU_AUDIO_DRV=spice -export QEMU_AUDIO_DRV -if [ -n "$SPICE_PASSWORD" = yes ]; then - SPICE_AUTH="password=$SPICE_PASSWORD" -else - SPICE_AUTH="disable-ticketing,addr=127.0.0.1 -fi -SPICE_OPTIONS="-vga qxl --spice port=$SPICE_PORT,$SPICE_AUTH --device virtio-serial -chardev spicevmc,id=vdagent,name=vdagent --device virtserialport,chardev=vdagent,name=com.redhat.spice.0" -MONITOR_OPTIONS="-monitor socket,path=monitor" -PROCESS_OPTIONS="-daemonize -pidfile pid" - Index: vwsgui ================================================================== --- vwsgui +++ vwsgui @@ -7,6 +7,6 @@ uri=`vms spiceuri $1` if [ $? -gt 0 ]; then exit 1 fi spicy $uri /dev/null && /usr/lib/vms/ask_shutdown $1