Qemu on MacOS Host - rather slow performance in Haiku Guest

Hi all, I’ve been a long past BeOS user and have also been involved in the early BeGeistert Meetups, those where fun!

Anyhow, I’m pondering and tinkering a bit with Haiku recently and am currently running it on MacOS via

qemu-system-x86_64 -hda haiku.qcow2 -cdrom /Users/fabian/Downloads/haiku-r1beta2-x86_64-anyboot/haiku-r1beta2-hrev54154_111-x86_64-anyboot.iso -m 4G -vga virtio -display cocoa,show-cursor=on -usb -device usb-tablet -cpu max -machine accel=hvf -smp 8,cores=2,threads=2 -net nic,model=virtio -net user,hostfwd=tcp::10022-:22

Those parameters are a mere attempt to get it working somewhat well, mostly copy and pasted together from stuff I found online.

My Host is

  • MacOS 11.2,
  • 6 core Intel Core i7-9750H, Coffee Lake
  • AMD Radeon Pro 5500M 8 GB
  • Intel UHD Graphics 630 1536 MB

Haiku inside of it runs rather slow, everything is kinda laggy and feels def. slower than BeOS R5 on a Pentium II :confused:
Is anyone aware of a way to make Haiku as Guest on a MacOS Host via Qemu more performant?
And is there a possibility to get the Intel-GPU working? I know that AMD won’t work.

Thanks, Fabian

1 Like

I also run Haiku virtually on a macbook pro: MacOSX 11.2.3 (Big Sur), but I use VirtualBox and it’s quite fast - I haven’t had time to deal with display resolutions stuff: (see: VirtualBox + VMSVGA driver (vmware). Need test).

But I would love to hear if qemu is a better option than VirtualBox if you figure things out.

Have you tried changing the hypervisor? The default is really slow (tcg), but you can change to hvf (Apples Hypervisor framework). Or if you are brave enough try haxm (from Intel)

VMWare Fusion Player on Mac is free now. Its probably you best option after Parallel if you want speed.

Thanks!
It does seem that Qemu, at least on Mac (I can def. not evaluate on another host) is not the best option. I’m already using the hvf hypervisor.
Will give VMWare Fusion Player a spin as that would also make most sense for the other VMs that I can switch from Parallels.

@konrad Thanks for the tip for VMWare Fusion Player free version on Mac!

Do you have updated instructions / guides for setting up and running a Haiku as guest OS on VMWare Fusion Player?

How did you get the hvf accelerator working?

I’m on a 2014 MBP (Haswell Intel CPU*) with OSX10.15 but only get Haiku to boot with the tcg accelerator, which results in rather long boot time and sluggish GUI performance, which might be related to the use of “AMD QEMU Virtual CPU version 2.5+ 2.2GHz” as the default CPU.

That’s what I run:
qemu-system-x86_64 -drive file=“Haiku-disk.img”,index=0,media=disk,format=raw
-m 4G --usb -device usb-tablet -accel hvf
-cpu host,-pdpe1gb -smp cores=2 -vga virtio

I assume just when it wants to change from boot splash to GUI is, when it crashes with “vmx_write_mem: mmu_gva_to_gpa ffffffff82189000 failed”.

This post QEMU .qcow2 mmu_gva_to_gpa crash in Mac OS X suggests that huge pages are the issue, hence the option “-pdpe1gb” but to no avail on my end.


*sysctl - a | grep machte.cpu.brand_string shows an “i7-4770HQ CPU @ 2.20GHz” which according to Intel® Core™ i7-4770HQ Processor is a Crystal Well due to the iGPU.