Although I installed OpenBSD in the virtual machine, the host is
Linux. And it seems it’s a bit more complicated than it is on x86.
You need the iso of the OS you want to install. Then you need a
firmware .bin file, like a BIOS if you wish, for the SPARC
machine you wish to emulate. In my case, that’s a SS-5, and
I got the bin file from here.
Create a virtual hard disk as you usually do, with qemu-img, then
here’s the line:
$ qemu-system-sparc -m 256 -cdrom my.iso -bios ss5.bin\ -M SS-5 -nographic -L . -hda my.hdd
Two things: after the firmware finishes loading, type
boot disk2:d -v
to boot from CD. Also, remember that 256 MB memory is
the maximum size you’ll get on a SPARC (this is 32-bit.)