diff --git a/README.md b/README.md index 2abebed..0aa98eb 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,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 @@ -335,15 +336,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: diff --git a/quickemu b/quickemu index 4b61f6f..62f2a28 100755 --- a/quickemu +++ b/quickemu @@ -228,7 +228,7 @@ function vm_boot() { local KERNEL_NODE="" local KERNEL_VER="?" local LSB_DESCRIPTION="Unknown OS" - local MACHINETYPE="q35" + local MACHINE_TYPE="q35" local MAC_BOOTLOADER="" local MAC_MISSING="" local MAC_DISK_DEV="ide-hd,bus=ahci.2" @@ -475,13 +475,24 @@ function vm_boot() { if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then CPU="${CPU},topoext" fi - MACHINETYPE="pc" + 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 @@ -852,7 +863,7 @@ function vm_boot() { # shellcheck disable=SC2054,SC2206,SC2140 args+=(-name ${VMNAME},process=${VMNAME} -pidfile "${VMDIR}/${VMNAME}.pid" - -enable-kvm -machine ${MACHINETYPE},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}" diff --git a/quickget b/quickget index 5aeecb8..ddaebed 100755 --- a/quickget +++ b/quickget @@ -45,6 +45,7 @@ function pretty_name() { freebsd) PRETTY_NAME="FreeBSD";; gentoo) PRETTY_NAME="Gentoo";; garuda) PRETTY_NAME="Garuda Linux";; + haiku) PRETTY_NAME="Haiku";; kdeneon) PRETTY_NAME="KDE Neon";; kolibrios) PRETTY_NAME="KolibriOS";; linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; @@ -194,6 +195,7 @@ function os_support() { fedora \ garuda \ gentoo \ + haiku \ kali \ kdeneon \ kolibrios \ @@ -320,6 +322,11 @@ function releases_garuda() { cinnamon } +function releases_haiku() { + echo r1beta3-x86_64 \ + r1beta3-x86_gcc2h +} + function releases_kali() { echo latest \ weekly @@ -630,6 +637,9 @@ function make_vm_config() { elif [ "${OS}" == "gentoo" ]; then GUEST="linux" IMAGE_TYPE="iso" + elif [ "${OS}" == "haiku" ]; then + GUEST="haiku" + IMAGE_TYPE="iso" elif [ "${OS}" == "kdeneon" ]; then GUEST="linux" IMAGE_TYPE="iso" @@ -730,6 +740,11 @@ EOF echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" fi + if [ "${OS}" == "haiku" ]; then + echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf" + echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf" + fi + if [ "${OS}" == "oraclelinux" ]; then echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf" fi @@ -1476,6 +1491,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}" @@ -1952,6 +1982,8 @@ if [ -n "${2}" ]; then get_cachyos elif [ "${OS}" == "gentoo" ]; then get_gentoo + elif [ "${OS}" == "haiku" ]; then + get_haiku elif [ "${OS}" == "kali" ]; then get_kali elif [ "${OS}" == "kdeneon" ]; then @@ -2059,6 +2091,8 @@ else releases_cachyos elif [ "${OS}" == "gentoo" ]; then releases_gentoo + elif [ "${OS}" == "haiku" ]; then + releases_haiku elif [ "${OS}" == "kali" ]; then releases_kali elif [ "${OS}" == "kolibrios" ]; then