Consolidate BSD, Haiku and Linux guests

This commit is contained in:
Martin Wimpress 2022-02-21 05:57:59 +00:00
parent 8f41c4c90f
commit 5bfec8a9d3
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
2 changed files with 10 additions and 20 deletions

View File

@ -464,14 +464,19 @@ function vm_boot() {
# Make any OS specific adjustments
case ${guest_os} in
freebsd|linux|openbsd)
*bsd|haiku|linux)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
fi
if [ "${guest_os}" == "freebsd" ]; then
MOUSE="usb-mouse"
elif [ "${guest_os}" == "haiku" ]; then
MACHINE_TYPE="pc"
NET_DEVICE="rtl8139"
fi
if [ -z "${disk_size}" ]; then
disk_size="16G"
fi
@ -483,22 +488,10 @@ function vm_boot() {
fi
MACHINE_TYPE="pc"
NET_DEVICE="rtl8139"
GUEST_TWEAKS="-boot d"
if [ -z "${disk_size}" ]; then
disk_size="256M"
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
;;
macos)
#https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
# A CPU with SSE4.1 support is required for >= macOS Sierra

View File

@ -588,8 +588,8 @@ function make_vm_config() {
IMAGE_FILE="${1}"
ISO_FILE="${2}"
case "${OS}" in
freebsd )
GUEST="freebsd"
freebsd|openbsd)
GUEST="bsd"
IMAGE_TYPE="iso";;
haiku)
GUEST="haiku"
@ -597,13 +597,10 @@ function make_vm_config() {
kolibrios)
GUEST="kolibrios"
IMAGE_TYPE="iso";;
openbsd )
GUEST="openbsd"
IMAGE_TYPE="iso";;
macos )
macos)
GUEST="macos"
IMAGE_TYPE="img";;
windows )
windows)
GUEST="windows"
IMAGE_TYPE="iso";;
*)