Jump to navigation Jump to search

QEMU on Haiku hosts

QEMU can be built on Haiku hosts. Haiku users also maintain a Gentoo-like ports system (with a qemu port + patches) called haikuports

This page includes documentation of how to get Haiku running in a VM inside QEMU, so that Linux-based developers can do build tests on them.

If you're running natively on Haiku you can ignore the "VM setup" instructions.


Haiku has several supported architecture targets:

 * x86_gcc2 gcc2, BeOS ABI compatible, 32-bit
 * x86_64 gcc7, 64-bit

There are also several "unsupported" architectures in various states of development:

 * arm (armv7) gcc7
 * arm64 (aarch64) gcc7
 * m68k gcc7
 * powerpc gcc7
 * riscv64 someday

Haiku is working towards clang native builds, but gcc7 is the current stable toolchain.

VM Setup

Haiku natively has robust support for virtio network and disk controllers, so it plays very nicely within a qemu container.

While Haiku is working towards their "R1" release, it is HIGHLY recommend to use nightly os images. These can be run live, or installed to a disk.

The latest x86_64 builds automatically populate here:

We generally offer at minimum two build types:

  • anyboot - an install ISO which can be burned to a cd, or dd'ed directly to a USB flash device.
  • raw - a raw disk image of Haiku.

After obtaining a boot media, you can create a new Haiku VM per the following steps:

  1. unzip the boot media
  2. make destination install image
    1. qemu-img create -f qcow2 haiku.qcow2 6G
  3. Boot Haiku VM
    1. qemu-system-x86_64 -hda haiku.qcow2 -cdrom haiku-nightly-anyboot.iso -m 4G --enable-kvm
  4. Install Haiku
    1. Run through the steps to install Haiku to the qcow2. A single partition is sufficient.
  5. Enable key-based SSH login
    1. add sshd user
      1. Add your ssh public key here: ~/config/settings/ssh/authorized_keys
      2. useradd sshd
      3. start sshd via: `which sshd`
      4. SSH into haiku machine as "user" user.
  6. Install qemu build requirements
    1. pkgman install glib2 glib2_devel pixman pixman_devel libsdl2 libsdl2_devel devel:libgnutls devel:libfdt devel:liblzo2