(Guide updated January 10th, 2021)
Qemu-system-ppc can run the PowerPC versions of Mac OS 9.0 to 9.2 and OSX 10.0 to 10.5. Qemu can also run some OSX release previews.
The status of various guests based on the latest builds available from the forum:
Guest | Default build | Sound-enabled build | Specific arguments | Remarks |
---|---|---|---|---|
Mac OS 9.0 | OK | Needs -cpu G3 | -M mac99 | Requires rom version 5.6 or above |
Mac OS 9.1 | OK | Needs -cpu G3 | -M mac99 | |
Mac OS 9.2 | OK | OK | ||
Mac OSX 10.0 | OK | OK | -M mac99 | |
Mac OSX 10.1 | OK | OK | -M mac99 | |
Mac OSX 10.2 | OK | Sound crackles | Has display issue | |
Mac OSX 10.3 | OK | Sound crackles | ||
Mac OSX 10.4 | OK | Sound crackles | ||
Mac OSX 10.5 | OK | Sound crackles |
This guide assumes you are installing Mac OS 9.2 on a 2gb file that will act as your hard disk for Mac OS.
The CD image you install from is called MacOS9.2.iso and the hard disk is called MacOS9.2.img
Installations of other versions of Mac OS or OSX (roughly) follow the same path.
NOTE: When trying to install Mac OS 9.0.4 you need to make sure to use a version that contains a Mac OS ROM version 5.6 or above.
Also make sure to set the -M parameter to -M mac99.
If you need to boot from a real CD, see the section Booting from a real CD below.
./qemu-img create -f raw -o size=2G MacOS9.2.img
#!/bin/bash cd "$(dirname "$0")" ./qemu-system-ppc \ -L pc-bios \ -M mac99,via=pmu \ -m 512 \ -boot d \ -drive file=MacOS9.2.iso,format=raw,media=cdrom \ -drive file=MacOS9.2.img,format=raw,media=disk
chmod +x qemu.command
Short explanation of the content of the file:
./qemu-system-ppc starts qemu with all the following as parameters:
(*)The mac model entry accepts 3 options for the via parameter:
mac99,via=pmu (this option supports usb mouse and keyboard)
mac99,via=pmu-adb (this allows some older Mac OS/Mac OS server builds to use a keyboard and mouse through the adb bus)
mac99,via=cuda (this is the default setting, allowing the use of the older, now less supported cuda)
Note: to run Leopard, you have to use -M mac99,via=pmu
To install Mac OS, you first need to partition the hard disk, so after you booted from the CD:
After initialization has finished and a disk icon has appeared on the desktop, quit the program.
You can then start the installation of Mac OS. Shut down Mac OS after the installation has finished.
Please note that the initialization step has to be repeated for any NEW disk added to Mac OS.
To boot the installed Mac OS, you need to edit the qemu.command file:
When booting with -boot c, make sure your hard disk image file is listed first. Save the file. Double-click qemu.command and Mac OS will boot from the hard disk.
Done.
You easily change CDs in Qemu-system-ppc for macOS: first drag the current CD icon to the trash. Then open the menu Machine and click change ide1-cd0 and navigate to the CD image you want to mount. Double click the image and wait for it to be mounted on the Mac OS/OSX desktop.
If you want to install software, make an image of the CD-Rom and attach it to Qemu. Add a disk after the hard disk like below to qemu.command:
"-drive file=Name-of-CD-image.iso,format=raw,media=cdrom" (without the quotes!)
or for a second hard disk:
"-drive file=Name-of-hard-disk-image.img,format=raw,media=disk" (without the quotes!)
And save the file. Start qemu.command. The CD image (if readable by Mac OS) will appear on the desktop for you to use.
A new hard disk needs to be partitioned as described above.
If you need to change the default screen size or colour depth, you can use the -g parameter like this:
"-g 1024x768x32" (Without the quotes!)
Subsequent changes to the resolution can be made with default OS tools. (e.g., the Monitors control panel in MacOS or equivalent in OSX).
You can pass-through some devices attached to the host to the guest.
On a macOS host, you can find the required USB vendorid and productid by checking the USB devices in the System Profiler.
To allow Qemu to take control of the device the driver (kext) the host loaded for the device has to be unloaded.
Sharing an USB device with Mac OS 9.0 up to Mac OSX 10.2 is restricted to using USB 1.1 devices.
A way to push a USB 2.0 device into USB 1.1 mode is to attach it to a strictly USB 1.1 hub (as found in older Apple keyboards or regular 1.1 hubs).
For USB storage devices you might need to:
Caution: Other devices might be using other kexts (drivers), so you would need to find out which kext is loaded for the device. Some devices might be using a kext that is also in use for other host devices. If you unload such a kext, the host will loose access to those devices. A reboot will restore functionality.
For USB storage devices you might need to:
Caution: Other devices might be using other kexts (drivers), so you would need to find out which kext is loaded for the device. Some devices might be using a kext that is also in use for other host devices. If you unload such a kext, the host will loose access to those devices. A reboot will restore functionality.
The latest Qemu for OSX builds emulate a network device that is supported out of the box for Mac OS 9.0 up to OSX 10.5
However, you can also use the realtek 8139 device. This requires installation of the appropriate drivers. You can download them from the Realtek site, or all drivers in one iso from here
There are several ways to get networking going in macOS hosts:
Note: this is activated by default on Qemu-system-ppc, so doesn't need to be mentioned explicitly on the command line:
If you want to run two instances of Mac OS/OSX simultaneously, Qemu needs to be able to tell the network devices apart. You can add a mac address to the networking device:
and make sure you add a different mac address to the second instance:
Please note that adding a mac address other than the default to the network device leads to the discovery of a new network card in OSX. You need to configure that card through the network preferences.
Note: running Qemu with vmnet support requires you to run Qemu-system-ppc as root.
The VMNET option allows three different networking modes. We cover only the “bridging” mode as that allows the most versatile access to host and guest.
-device sungem,netdev=network01 -netdev vmnet-bridged,id=network01,ifname=name-of-the-host-network-device
(You can find the name of the host network device in the system report under networking. This will often be “en0” or “en1”)
Note: Tap-based networking requires the installation of tuntaposx or the tap device from Tunnelblick. This will, however, not work for Mojave or Big Sur hosts.
Add the first line to your qemu command line, run qemu with sudo, and execute the other lines in another terminal window:
Create a network bridge in your macOS host network settings and add your network device to the bridge. We provide two scripts in the tap-scripts folder. They assume your bridge is called bridge0. The first script adds the tap device to the brigde when qemu-system-ppc starts. The second script removes the tap device from the bridge once you stop qemu-system-ppc.
Change the qemu.command file:
Save the command file and run it as root.
If you want, you can leave the bridge intact after you quit Qemu-system-ppc, so it is already available next time you run Qemu-system-ppc with tap networking.
Qemu can use socket networking to connect two peers. The peers will have no internet access, but can exchange data between each-other. Set one guest to be a listener for network traffic:
Set the other guest to connect to the listener:
For both instances, set the TCP/IP settings manually to a free ip address in your IP range and set the subnetmask to 255.255.255.0. No other settings have to be made.
Note: the option below will not work on Big Sur hosts as afp support was removed, or on Catalina hosts when the shared folder is not a on HFS+ volume.
OSX 10.3/10.4 guests: Make sure you have file sharing enabled on your host and that you share some folder. Find the current IP address of your host: open the system report and click Networking. The IP address should show behind the active network connection.
Start Qemu, click Go/Connect to server. Enter
afp://ip-address-of-your-host.
At Connect as select Registered user and enter your user name and password for your host. Then select a shared folder from the list and click OK. You can now read and write files to the shared folder that appeared on your desktop.
Note: for other Mac OS 9.x/OSX guests, see the port forwarding solution below.
NOTE: in macOS host, you need to run Qemu as root for port forwarding to work for port numbers below 1024, so it is best to forward a higher port number.
You can provide services running on the guest to the host by forwarding ports to the host.
To provide access to e.g., a webserver running in the guest you can use:
The webserver running on the guest is then accessible through http://name-or-ip-adress-of-host:8080 from other machines running on your network.
Forwarding port 21 to the host allows running an ftp server (such as Netpresenz) on an Mac OS 9.x guest and read/write access to the file system of the guest. Make sure to use an FTP client capable of active transfer mode on the host (such as Filezilla, we are dealing with an old guest system after all.) For access to a Mac OS X guest, enable the ftp service.
You can access the guest by connecting to ftp://name-or-ip-adress-of-host:2121 from other machines running on your network.
You can forward multiple ports:
You can also forward ports for Appletalk over tcp/ip. Note you would have to run Qemu as root for this, which is not advisable.
To boot from a real CD, you first need to insert the CD and unmount it using e.g., Diskutility.
Next, run Qemu as root. So add sudo in front of ./qemu-system-ppc and set -cdrom /dev/cdrom in your command file.
Example command line:
#!/bin/bash cd "$(dirname "$0")" sudo ./qemu-system-ppc \ -L pc-bios \ -M mac99 \ -m 512 \ -boot d \ -cdrom /dev/cdrom
If the CD was not unmounted correctly, Qemu tells you the commands you need to enter (in e.g., another terminal window) to unmount the CD. For example:
qemu-system-ppc: -cdrom /dev/cdrom: If device /dev/disk5 is mounted on the desktop, unmount it first before using it in QEMU qemu-system-ppc: -cdrom /dev/cdrom: Command to unmount device: diskutil unmountDisk /dev/disk5 qemu-system-ppc: -cdrom /dev/cdrom: Command to mount device: diskutil mountDisk /dev/disk5
The CD might stay unmounted after you stop Qemu. You can use diskutility to mount it again and eject it. Or use the terminal command Qemu suggests for mounting the CD.
You can make new disk images which Qemu will use as hard drive, on which you can install Mac OS/OSX.
Open Disk Utility, create a new image like this:
This creates an image called “OSX-Jaguar.img”
In Mac OS guest: First drag any mounted CD from the desktop into the trash.
Through the Machine menu:
Note: you can also mount floppy images this way.
Through the Qemu monitor:
Also see the qemu documentation here: https://www.linux-kvm.org/page/Change_cdrom
NOTE 1: you need to unmount the real cd from the desktop (using e.g., disk utility) before using it in Qemu.
NOTE 2: you have to run Qemu as root to access a real CD. (See above at booting from a real CD.)
Qemu is being actively developed. This means that some new features can become available that are not yet incorporated into the official source code. Currently there are several such developments, in various states of reliability:
-Sound support
-VMNET support to enable full network access for hosts where tap networking will not work (Catalina and upwards)
You can download some of these experimental builds from our forum: https://www.emaculation.com/forum/viewtopic.php?p=52104#p52104
#!/bin/sh
TARGET_IMAGE=Mac_OS_X_Server_1.0-4G.img
#1G
DISKSIZE_IN_BLOCKS=2097152
#2G
#DISKSIZE_IN_BLOCKS=4194304
#4G
#DISKSIZE_IN_BLOCKS=8388608
PRIMARY_PARTITIONSIZE_IN_BLOCKS=`expr $DISKSIZE_IN_BLOCKS - 512 - 16384 - 64`
echo $PRIMARY_PARTITIONSIZE_IN_BLOCKS
pdisk $TARGET_IMAGE -initialize
pdisk $TARGET_IMAGE -createPartition MOSX_OF3_Booter Apple_HFS 64 16384
pdisk $TARGET_IMAGE -createPartition SecondaryLoader Apple_Loader 16448 512
pdisk $TARGET_IMAGE -createPartition “0x000001FF 0x0008 0x00” Apple_Rhapsody_Inst 16960 $PRIMARY_PARTITIONSIZE_IN_BLOCKS
The language codes available are:
ar de-ch es fo fr-ca hu ja mk no pt-br sv
da en-gb et fr fr-ch is lt nl pl ru th
de en-us fi fr-be hr it lv nl-be pt sl tr