Using the sample in the compiling guide, I got it to start via the qemu cli, using a script (ZSH in my case, but I don’t see why the shell would matter for executing a single command):
#!/bin/zsh
qemu-system-aarch64 -bios /opt/homebrew/share/qemu/edk2-aarch64-code.fd -M virt -cpu host -accel hvf -smp 4 -m 8192 \
-drive file=/Applications/QEMU/Haiku/haiku-mmc.image,if=none,format=raw,id=x0 \
-device virtio-blk-device,drive=x0 \
-device virtio-keyboard-device \
-device virtio-tablet-device \
-device virtio-gpu-device \
-device virtio-rng-device \
-netdev user,id=net0 \
-device virtio-net-device,netdev=net0 \
-serial stdio
It started fine, and I had mouse control, but it’s unusable in that state as the default resolution (the size of the window) is too small to see the entire desktop. It was enough that I could see the menu pop up when I right-clicked the desktop, so I know it was working, but I couldn’t see enough to do much.
EDIT: Okay, that actually did work. And it was startlingly easy.
When you start it, it’s in 640x480, and not scaling correctly. The VM will have 3 displays (QEMU’s command line, a parallel (serial?) display, and the actual desktop GUI that it opens up by default.
Switch to either of the other two, and then back to the desktop GUI, and it’ll be scaled down to 640x480 so you can see the entire desktop. Then you can change the resolution as normal from inside Haiku, and it’ll remember what you did the next time it starts up.
EDIT 2: There’s also an option to install Haiku, which I haven’t tried yet, but I installing the full OS onto an actual virtual HDD seems to be the next step … as soon as I figure out how to add a virtual HDD
.
EDIT 3: Networking also worked out of the box.