Currently I am still on an x86 Mac, but I have every reason to believe this same code will work on Silicon. (Indeed, I plan to upgrade to a Silicon Mac in the coming months, which is why I am investigating this now.) In fact, I have hopes it will work better on a Silicon Mac than it does on my current Mac.
I got the UTM instructions from
this website. That's also where you'll find links to the EFI-xxx.img and OVFM.bin images you'll need. Finally, if you need to install Lion from scratch, the install disc image is Contents/SharedSupport/InstallESD.img, and it is found by "Open Package Contents" on the Lion installer app.
You also need to know the osk key for macOS hardware. To make sure we're clean with lawyers, I am not going to copy it in this post, but it is easily findable if you search "osk key for macOS".
However, I did not install Lion. I converted a VMWare Fusion disc. Just open the package contents of the VMWare virtual machine (the .vmwarevm) and find the Virtual Disk.vdsk file. Use the following command to convert it to qcow2. (You can use any file name, but I chose MacOS.7.qcow2:
Code: Select all
qemu-img convert -O qcow2 "Virtual Disk.vdsk" MacOS.7.qcow2
And here is my qemu.command
Code: Select all
#!/bin/bash
cd "$(dirname "$0")"
qemu-system-x86_64 -machine q35, -accel tcg,thread=multi,tb-size=1536 \
-bios OVMF.bin -m 4096 \
-cpu Penryn,+ssse3,+sse4.1,+sse4.2 \
-smp 4,cores=2 \
-usb -device usb-kbd -device usb-tablet \
-device isa-applesmc,osk="actual-osk-key-goes-here" \
-netdev user,id=usr0 -device e1000-82545em,netdev=usr0,id=vnet0 \
-device usb-storage,drive=drive1,removable=false,bootindex=0 \
-drive if=none,media=disk,id=drive1,file=EFI-LEGACY.img \
-device ide-hd,bus=ide.2,drive=MacHDD,bootindex=1 \
-drive id=MacHDD,if=none,file=MacOS10.7.qcow2 \
-monitor stdio
If you need to install qemu, on mac it's simply
NOTE: this installs a *lot*, I mean a *lot* of dependencies and takes quite a while.
There are plenty of other websites with instructions for installing qemu on Linux and Windows.
Finally, I was able to access my host drive (on Big Sur) by setting up an smb network share. The afp share does not appear to work, possibly for the same reason I couldn't get it to work on Tiger. Big Sur seems to have dropped compatibility for older versions of afp.