From 9f27cbffa268dbefeb17e5b08f3596e8f3a93436 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Sun, 26 Dec 2021 16:05:38 +0100 Subject: [PATCH 1/5] Add Haiku R1 Beta 3 to quickget script --- quickget | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/quickget b/quickget index 235fd9a..577ad0c 100755 --- a/quickget +++ b/quickget @@ -41,6 +41,7 @@ function pretty_name() { elementary) PRETTY_NAME="elementary OS";; freebsd) PRETTY_NAME="FreeBSD";; garuda) PRETTY_NAME="Garuda Linux";; + haiku) PRETTY_NAME="Haiku";; kdeneon) PRETTY_NAME="KDE Neon";; linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; linuxmint-mate) PRETTY_NAME="Linux Mint MATE";; @@ -168,6 +169,7 @@ function os_support() { freebsd \ fedora \ garuda \ + haiku \ kali \ kdeneon \ kubuntu \ @@ -262,6 +264,11 @@ function releases_garuda() { cinnamon } +function releases_haiku() { + echo r1beta3-x86_64 \ + r1beta3-x86_gcc2h +} + function releases_kali() { echo latest \ weekly @@ -537,6 +544,9 @@ function make_vm_config() { elif [ "${OS}" == "garuda" ]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "haiku" ]; then + GUEST="haiku" + IMAGE_TYPE="iso" elif [ "${OS}" == "kdeneon" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -611,6 +621,10 @@ EOF echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" fi + if [ "${OS}" == "haiku" ]; then + echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" + fi + if [ "${OS}" == "oraclelinux" ]; then echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" fi @@ -1185,6 +1199,21 @@ function get_garuda() { make_vm_config "${OS}-${RELEASE}.iso" } +function get_haiku() { + local ISO="" + local URL="" + local HASH="" + + validate_release "releases_haiku" + + ISO="haiku-${RELEASE}-anyboot.iso" + URL="https://cdn.haiku-os.org/haiku-release/$(echo $RELEASE | awk -F '-' '{print $1}')/${ISO}" + HASH=$(wget -q -O- ${URL}.sha256 | grep "${ISO}" | cut -d' ' -f4) + web_get "${URL}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function unattended_windows() { cat << 'EOF' > "${1}" @@ -1653,6 +1682,8 @@ if [ -n "${2}" ]; then get_fedora elif [ "${OS}" == "garuda" ]; then get_garuda + elif [ "${OS}" == "haiku" ]; then + get_haiku elif [ "${OS}" == "kali" ]; then get_kali elif [ "${OS}" == "kdeneon" ]; then @@ -1744,6 +1775,8 @@ else releases_fedora elif [ "${OS}" == "garuda" ]; then releases_garuda + elif [ "${OS}" == "haiku" ]; then + releases_haiku elif [ "${OS}" == "kali" ]; then releases_kali elif [[ "${OS}" == *"linuxmint-"* ]]; then 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 2/5] 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}" From 1f917c85c19a42532ef68ecd28ff41609aa2f868 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Sun, 26 Dec 2021 16:11:16 +0100 Subject: [PATCH 3/5] Add Haiku to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 78ac412..62e904f 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ comprehensive support for macOS and Windows**. * [Oracle Linux](https://www.oracle.com/linux/) and [Rocky Linux](https://rockylinux.org/) * [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and latest 2.0.0 pre-release ) * [FreeBSD](https://www.freebsd.org/) & [OpenBSD](https://www.openbsd.org/) + * [Haiku](https://www.haiku-os.org/) * Full SPICE support including host/guest clipboard sharing * VirtIO-webdavd file sharing for Linux and Windows guests * VirtIO-9p file sharing for Linux and macOS guests From 935b83a490863466cb7f9f394b3d42125e0f823b Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Sun, 26 Dec 2021 18:27:17 +0100 Subject: [PATCH 4/5] Set an explicit disk size of 32G for Haiku --- quickget | 1 + 1 file changed, 1 insertion(+) diff --git a/quickget b/quickget index 577ad0c..46e465a 100755 --- a/quickget +++ b/quickget @@ -623,6 +623,7 @@ EOF if [ "${OS}" == "haiku" ]; then echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" + echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" fi if [ "${OS}" == "oraclelinux" ]; then From aee9ea296c0abec040b0ed833f8d22eaaf96b302 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Sun, 26 Dec 2021 18:54:23 +0100 Subject: [PATCH 5/5] Add more info about Haiku to README.md Replacing second "BSD Guests" section, because it was duplicated above. --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 62e904f..d11a907 100644 --- a/README.md +++ b/README.md @@ -330,15 +330,28 @@ tpm="on" * `fixed_iso=` specifies the ISO image that provides VirtIO drivers. * `tpm="on"` instructs `quickemu` to create a software emulated TPM device using `swtpm`. -## BSD Guests +## Haiku Guests -`quickemu` supports FreeBSD and OpenBSD. +`quickemu` supports [Haiku](https://www.haiku-os.org/). ```bash -quickget freebsd 13_0 -quickemu --vm freebsd-13_0.conf +quickget quickget haiku r1beta3-x86_64 +quickemu --vm haiku-r1beta3-x86_64.conf ``` +At the moment the only way to share files between host and a Haiku guest is by +using SSH (having a SSH server running on the host): + +On guest: + +```bash +scp example.txt user@host-local-ip:/home/user # sending a file from guest to host +scp user@host-local-ip:/home/user/example.txt . # receiving a file from host to guest +``` + +`quickget` cannot automatically download and create virtual machines for Haiku +nightly versions, but they work if the ISO and configuration are set up manually. + # SPICE The following features are available while using the SPICE protocol: