x86 macOS relevant now?

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
rpatters1
Tinkerer
Posts: 48
Joined: Sun Jul 27, 2008 3:24 pm

x86 macOS relevant now?

Post by rpatters1 »

Now that x86 macOS is moving into legacy status, is there any interest on this forum for adding information about how to emulate it? FWIW: I managed to create a virtual Mac OS Lion that mostly works with qemu. If anyone is interested I can post the instructions. (I basically used UTM to set up the virtual then hacked out the qemu settings to run it directly with qemu.)
User avatar
Cat_7
Expert User
Posts: 5475
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: x86 macOS relevant now?

Post by Cat_7 »

Of course we are interested in the instructions, after all we are about mac emulation ;-)
Even though I hope that the Intel machines will still be around and supported for a while.

I assume these instructions are for running Qemu with Intel MacOS on a M1 machine as that would be emulation?

Best,
Cat_7
rpatters1
Tinkerer
Posts: 48
Joined: Sun Jul 27, 2008 3:24 pm

Re: x86 macOS relevant now?

Post by rpatters1 »

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

Code: Select all

brew install qemu
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.
User avatar
Cat_7
Expert User
Posts: 5475
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: x86 macOS relevant now?

Post by Cat_7 »

Hi,

Thanks for the info. You might want to take a look at the -accel tcg parameter.
Qemu supports virtualisation on Intel Mac, so things could perhaps be sped up by setting it to -accel hvf

Best,
Cat_7
rpatters1
Tinkerer
Posts: 48
Joined: Sun Jul 27, 2008 3:24 pm

Re: x86 macOS relevant now?

Post by rpatters1 »

It turns out that the OS boot crashes instantly if you use -accel hvf, causing an endless loop between OVFM and EFI. UTM has the same problem (on Intel Macs). Since this VM is ultimately a solution I am looking at as a migration plan for Silicon Mac, I am not particularly concerned about it.
rpatters1
Tinkerer
Posts: 48
Joined: Sun Jul 27, 2008 3:24 pm

Re: x86 macOS relevant now?

Post by rpatters1 »

Another issue I have with it is that only one screen resolution is available: 1280x720. If you have a suggestion for how to get more options, I'd be interested in hearing it.
FreeRepublic
Student Driver
Posts: 13
Joined: Fri May 17, 2019 8:37 pm

Re: x86 macOS relevant now?

Post by FreeRepublic »

I run Mac OS9 through emulation on my ASUS Windows computer. It works great.

Mac Classic emulation on an Android tablet?
Post Reply