fix: use vmware-svga for old Ubuntu releases. Fixes #966

This commit is contained in:
Martin Wimpress 2024-04-16 23:48:30 +01:00 committed by Martin Wimpress
parent 3c6e803c77
commit b6f5b1aeb8
2 changed files with 12 additions and 2 deletions

View File

@ -479,7 +479,7 @@ function vm_boot() {
# Make any OS specific adjustments
case ${guest_os} in
batocera|*bsd|freedos|haiku|linux|*solaris)
batocera|*bsd|freedos|haiku|linux*|*solaris)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
@ -742,7 +742,9 @@ function vm_boot() {
fi
# https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
if [ "${guest_os}" == "linux" ]; then
if [ "${guest_os}" == "linux_old" ]; then
DISPLAY_DEVICE="vmware-svga"
elif [ "${guest_os}" == "linux" ]; then
case ${OUTPUT} in
none|spice|spice-app)
DISPLAY_DEVICE="virtio-gpu";;

View File

@ -1576,6 +1576,14 @@ function make_vm_config() {
truenas*)
GUEST="truenas"
IMAGE_TYPE="iso";;
ubuntu*)
GUEST="linux"
IMAGE_TYPE="iso"
local SHORT_RELEASE="$(echo "${RELEASE}" | sed s'/\.//g')"
if [ ${SHORT_RELEASE} -lt 1604 ]; then
GUEST="linux_old"
fi
;;
windows)
GUEST="windows"
IMAGE_TYPE="iso";;