@ -806,7 +806,14 @@ function vm_boot() {
done
done
fi
fi
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
local SPICE="disable-ticketing=on"
local SPICE="disable-ticketing=on"
# gl=on can be use with 'spice' too, but only over local connections (not tcp ports)
if [ "${OUTPUT}" == "spice-app" ]; then
SPICE+=",gl=${gl}"
fi
# TODO: Don't use ports so local-only connections can be used with gl=on
if [ -z "${SPICE_PORT}" ]; then
if [ -z "${SPICE_PORT}" ]; then
# Find a free port for spice
# Find a free port for spice
SPICE_PORT=$(get_port 5930 9)
SPICE_PORT=$(get_port 5930 9)
@ -830,19 +837,22 @@ function vm_boot() {
echo "${FULLSPICY}"
echo "${FULLSPICY}"
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
SPICE="${SPICE},port=${SPICE_PORT},addr=127.0.0.1"
fi
fi
fi
fi
if [ -n "${PUBLIC}" ]; then
if [ -n "${PUBLIC}" ]; then
case ${guest_os} in
case ${guest_os} in
macos)
macos)
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
# Reference: https://gitlab.gnome.org/GNOME/phodav/-/issues/5
# Reference: https://gitlab.gnome.org/GNOME/phodav/-/issues/5
echo " - WebDAV: On guest: build spice-webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24)"
echo " - WebDAV: On guest: build spice-webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24)"
echo " - WebDAV: On guest: Finder -> Connect to Server -> http://localhost:9843/"
echo " - WebDAV: On guest: Finder -> Connect to Server -> http://localhost:9843/"
fi
;;
;;
*)
*)
echo " - WebDAV: On guest: dav://localhost:9843/";;
echo " - WebDAV: On guest: dav://localhost:9843/";;
esac
esac
fi
fi
fi
if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then
if [ "${guest_os}" != "windows" ] && [ -n "${PUBLIC}" ]; then
echo -n " - 9P: On guest: "
echo -n " - 9P: On guest: "
@ -896,16 +906,21 @@ function vm_boot() {
${VIDEO} -display ${DISPLAY_RENDER}
${VIDEO} -display ${DISPLAY_RENDER}
-audiodev ${AUDIO_DEV}
-audiodev ${AUDIO_DEV}
-device intel-hda -device hda-duplex,audiodev=audio0
-device intel-hda -device hda-duplex,audiodev=audio0
-rtc base=localtime,clock=host,driftfix=slew
-rtc base=localtime,clock=host,driftfix=slew)
-spice ${SPICE}
# Only enable SPICE is using SPICE display
if [ "${OUTPUT}" == "none" ] || [ "${OUTPUT}" == "spice" ] || [ "${OUTPUT}" == "spice-app" ]; then
args+=(-spice ${SPICE}
-device virtio-serial-pci
-device virtio-serial-pci
-chardev socket,id=agent0,path="${VMDIR}/${VMNAME}-agent.sock",server=on,wait=off
-chardev socket,id=agent0,path="${VMDIR}/${VMNAME}-agent.sock",server=on,wait=off
-device virtserialport,chardev=agent0,name=org.qemu.guest_agent.0
-device virtserialport,chardev=agent0,name=org.qemu.guest_agent.0
-chardev spicevmc,id=vdagent0,name=vdagent
-chardev spicevmc,id=vdagent0,name=vdagent
-device virtserialport,chardev=vdagent0,name=com.redhat.spice.0
-device virtserialport,chardev=vdagent0,name=com.redhat.spice.0
-chardev spiceport,id=webdav0,name=org.spice-space.webdav.0
-chardev spiceport,id=webdav0,name=org.spice-space.webdav.0
-device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0
-device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0)
-device virtio-rng-pci,rng=rng0
fi
args+=(-device virtio-rng-pci,rng=rng0
-object rng-random,id=rng0,filename=/dev/urandom
-object rng-random,id=rng0,filename=/dev/urandom
-device ${USB_HOST_PASSTHROUGH_CONTROLLER},id=spicepass
-device ${USB_HOST_PASSTHROUGH_CONTROLLER},id=spicepass
-chardev spicevmc,id=usbredirchardev1,name=usbredir
-chardev spicevmc,id=usbredirchardev1,name=usbredir