From 98266009f039e2649f7c1e9de3d9f5fa167ee7f1 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Sun, 26 Dec 2021 16:07:25 +0100 Subject: [PATCH] Allow using a different chipset on quickemu Haiku is incompatible with the q35 machine type, as it emulates a ICH9 host chipset. Instad, the "pc" machine type needs to be used (emulates I44FX). https://wiki.qemu.org/Features/Q35 --- quickemu | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index 5507580..7a73559 100755 --- a/quickemu +++ b/quickemu @@ -228,6 +228,7 @@ function vm_boot() { local KERNEL_NODE="" local KERNEL_VER="?" local LSB_DESCRIPTION="Unknown OS" + local MACHINE_TYPE="q35" local MAC_BOOTLOADER="" local MAC_MISSING="" local MAC_DISK_DEV="ide-hd,bus=ahci.2" @@ -463,6 +464,18 @@ function vm_boot() { disk_size="16G" fi ;; + haiku) + CPU="-cpu host,kvm=on" + MACHINE_TYPE="pc" + NET_DEVICE="rtl8139" + if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then + CPU="${CPU},topoext" + fi + if [ -z "${disk_size}" ]; then + disk_size="32G" + fi + echo "WARNING! Unrecognised guest OS: ${guest_os}" + ;; macos) #https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/ # A CPU with SSE4.1 support is required for >= macOS Sierra @@ -833,7 +846,7 @@ function vm_boot() { # shellcheck disable=SC2054,SC2206,SC2140 args+=(-name ${VMNAME},process=${VMNAME} -pidfile "${VMDIR}/${VMNAME}.pid" - -enable-kvm -machine q35,smm=${SMM},vmport=off ${GUEST_TWEAKS} + -enable-kvm -machine ${MACHINE_TYPE},smm=${SMM},vmport=off ${GUEST_TWEAKS} ${CPU} ${SMP} -m ${RAM_VM} ${BALLOON} -smbios type=2,manufacturer="Quickemu Project",product="Quickemu",version="${VERSION}",serial="0xDEADBEEF",location="quickemu.com",asset="${VMNAME}"