Refactor guest tweak for Batocera, KolobriOS, ReactOS, Haiku & FreeDOS

This commit is contained in:
Martin Wimpress 2022-08-19 17:16:54 +01:00
parent d8417a6abe
commit c147560731
No known key found for this signature in database
GPG key ID: 61DF940515E06DA3
2 changed files with 16 additions and 24 deletions

View file

@ -464,7 +464,7 @@ function vm_boot() {
# Make any OS specific adjustments # Make any OS specific adjustments
case ${guest_os} in case ${guest_os} in
*bsd|haiku|freedos|linux) batocera|*bsd|freedos|haiku|linux)
CPU="-cpu host,kvm=on" CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext" CPU="${CPU},topoext"
@ -472,7 +472,7 @@ function vm_boot() {
if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then
MOUSE="usb" MOUSE="usb"
elif [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "freedos" ]; then elif [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ]; then
MACHINE_TYPE="pc" MACHINE_TYPE="pc"
NET_DEVICE="rtl8139" NET_DEVICE="rtl8139"
fi fi
@ -482,35 +482,23 @@ function vm_boot() {
SMM="on" SMM="on"
fi fi
if [ -z "${disk_size}" ]; then if [ -z "${disk_size}" ]; then
disk_size="16G" disk_size="16G"
fi fi
;; ;;
batocera) kolibrios|reactos)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
fi
MACHINE_TYPE="pc"
NET_DEVICE="rtl8139"
disk_size="8G"
;;
kolibrios)
CPU="-cpu qemu32,kvm=on" CPU="-cpu qemu32,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext" CPU="${CPU},topoext"
fi fi
MACHINE_TYPE="pc" MACHINE_TYPE="pc"
NET_DEVICE="rtl8139" case ${guest_os} in
;; kolibrios) NET_DEVICE="rtl8139";;
reactos) reactos)
CPU="-cpu qemu32,kvm=on" NET_DEVICE="e1000"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then KEYBOARD="ps2"
CPU="${CPU},topoext" ;;
fi esac
MACHINE_TYPE="pc"
NET_DEVICE="e1000"
;; ;;
macos) macos)
#https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/ #https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/

View file

@ -759,8 +759,12 @@ EOF
# OS specific tweaks # OS specific tweaks
case ${OS} in case ${OS} in
alma|centos-stream|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; alma|centos-stream|oraclelinux|rockylinux)
dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
batocera)
echo "disk_size=\"8G\"" >> "${CONF_FILE}";;
dragonflybsd|haiku|openbsd|netbsd|slackware|tails)
echo "boot=\"legacy\"" >> "${CONF_FILE}";;
deepin) deepin)
echo "disk_size=\"64G\"" >> "${CONF_FILE}" echo "disk_size=\"64G\"" >> "${CONF_FILE}"
echo "ram=\"4G\"" >> "${CONF_FILE}" echo "ram=\"4G\"" >> "${CONF_FILE}"