Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ppc-osx-on-qemu-for-osx [2020/08/11 22:07] – [Qemu PPC for OSX] cat_7 | ppc-osx-on-qemu-for-osx [2024/02/05 12:55] (current) – [Networking] cat_7 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Qemu PPC for OSX ===== | + | ===== Running |
- | (Guide | + | (Guide |
- | ==== Installing Qemu system ppc for OSX ==== | + | ===== Introduction ===== |
- | This guide covers installing and running qemu-system-ppc | + | Qemu-system-ppc |
- | ==== Requirements ==== | + | |
+ | The status of various guests based on the latest builds available from the forum: | ||
+ | ^ Guest ^ Default build ^ Sound-enabled build ^ Argument(s) ^ Remarks ^ | ||
+ | | Mac OS 9.0 | OK | OK | -M mac99 | Requires rom version 5.2.1 or above, mouse wiggle | ||
+ | | Mac OS 9.1 | OK | OK | -M mac99, | ||
+ | | Mac OS 9.2 | OK | OK | -M mac99, | ||
+ | | Mac OSX 10.0 | OK | Crackle, channel issue | -M mac99 | | ||
+ | | Mac OSX 10.1 | OK | Channel issue | -M mac99 | | ||
+ | | Mac OSX 10.2 | OK | OK, but channels reversed | ||
+ | | Mac OSX 10.3 | OK | OK | -M mac99, | ||
+ | | Mac OSX 10.4 | OK | OK | -M mac99, | ||
+ | | Mac OSX 10.5 | OK | OK | -M mac99, | ||
+ | ===== Requirements | ||
* Qemu program \\ | * Qemu program \\ | ||
* Disk images for the PowerPC versions of Mac OS or OSX you want to install | * Disk images for the PowerPC versions of Mac OS or OSX you want to install | ||
Line 14: | Line 26: | ||
Installations of other versions of Mac OS or OSX (roughly) follow the same path. \\ | 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. \\ | If you need to boot from a real CD, see the section Booting from a real CD below. \\ | ||
- | ==== Qemu installation ==== | + | ===== Qemu-system-ppc |
* Go to http:// | * Go to http:// | ||
- | * Create a folder for Qemu-related files and unpack the download. Put your Mac OS/OSX disk images in this folder. | + | * Create a folder for Qemu-related files //inside your Applications folder// |
+ | * **For users of Catalina and later: read the readme.txt about how to run Qemu on your host!** | ||
* Create an empty disk image with qemu-img. Open a command prompt and navigate to your Qemu folder. | * Create an empty disk image with qemu-img. Open a command prompt and navigate to your Qemu folder. | ||
Line 31: | Line 46: | ||
cd " | cd " | ||
| | ||
- | ./ | + | ./ |
- | | + | |
+ | | ||
+ | -display cocoa \ | ||
+ | | ||
+ | -boot d \ | ||
-drive file=MacOS9.2.iso, | -drive file=MacOS9.2.iso, | ||
- | -drive file=MacOS9.2.img, | + | -drive file=MacOS9.2.img, |
- | -netdev user, | + | |
- | -device VGA,edid=on \ | + | |
- | * Save qemu.command and make it executable: | + | * Save qemu.command and use a terminal to make it executable: |
chmod +x qemu.command | chmod +x qemu.command | ||
Line 44: | Line 61: | ||
Short explanation of the content of the file:\\ | Short explanation of the content of the file:\\ | ||
- | #!/bin/bash tells OSX this is a bash script\\ | + | * #!/bin/bash tells OSX this is a bash script\\ |
- | cd " | + | |
./ | ./ | ||
- | -L pc-bios | + | * -L pc-bios |
- | -boot d defines | + | |
- | -M mac99, | + | |
- | -m 512 defines the amount of memory (in Mb) for OS9/ | + | |
- | -prom-env 'auto-boot? | + | |
- | -prom-env ' | + | |
- | -drive file=MacOS9.2.iso, | + | |
- | -drive file=MacOS9.2.img, | + | |
- | -netdev user, | + | |
- | -device VGA,edid=on presents additional resolutions to choose from in the guest\\ | + | |
(*)The mac model entry accepts 3 options for the via parameter: \\ | (*)The mac model entry accepts 3 options for the via parameter: \\ | ||
Line 62: | Line 77: | ||
mac99, | mac99, | ||
mac99, | mac99, | ||
+ | **Note:** to run Leopard, you have to use -M mac99, | ||
* Double-click qemu.command. This starts Qemu and boots the MacOS9.2.iso installation CD image. | * Double-click qemu.command. This starts Qemu and boots the MacOS9.2.iso installation CD image. | ||
- | ==== Installation of Mac OS 9.2 ==== | + | ===== Installation of Mac OS 9.2 ===== |
- | To install Mac OS, you first need to partition the hard disk, so after you booted from the CD go into the " | + | To install Mac OS, you first need to partition the hard disk, so after you booted from the CD: |
+ | * Go into the " | ||
+ | * Select the entry "< | ||
+ | |||
+ | 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.\\ | 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. | Please note that the initialization step has to be repeated for any NEW disk added to Mac OS. | ||
- | ==== Booting the installed Mac OS ==== | + | ===== Booting the installed Mac OS ===== |
- | To boot the installed Mac OS, you need to edit the qemu.command file: \\ | + | To boot the installed Mac OS, you need to edit the qemu.command file: |
- | + | * Change the -boot d argument to -boot c. | |
- | * Change the "-boot d" | + | * Reverse the order in which your disk and cdrom entry are listed in qemu.command. |
- | * Reverse the order in which your disk and cd rom entry are listed in qemu.command. | + | |
- | So, when booting with "-boot c", make sure your hard disk image file is listed first. If you have no need for the cd rom disk to be available, you can remove the entry from the command line. Save the file. Double-click qemu.command and Mac OS will boot from the hard disk. \\ | + | 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. | Done. | ||
- | ==== Connecting other CD or disk images ==== | + | ===== Connecting other CD or disk images |
- | You easily change CDs in Qemu for OSX: 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. | + | You easily change CDs in Qemu-system-ppc |
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: | 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: | ||
Line 92: | Line 111: | ||
" | " | ||
- | And save the file. Start qemu.command. The CD image (if readable by Mac OS) will appear on the desktop for you to use. | + | 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. | |
- | ==== Changing the graphics settings ==== | + | ===== Changing the graphics settings |
If you need to change the default screen size or colour depth, you can use the -g parameter like this: | If you need to change the default screen size or colour depth, you can use the -g parameter like this: | ||
Line 102: | Line 121: | ||
Subsequent changes to the resolution can be made with default OS tools. (e.g., the Monitors control panel in MacOS or equivalent in OSX). | Subsequent changes to the resolution can be made with default OS tools. (e.g., the Monitors control panel in MacOS or equivalent in OSX). | ||
- | ==== Networking ==== | + | ===== Sharing USB devices with the Guest ===== |
+ | |||
+ | 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.\\ | ||
+ | |||
+ | ==== Mac OS 9.0 to 10.2 ==== | ||
+ | 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: | ||
+ | |||
+ | * Run a terminal and execute: sudo kextunload / | ||
+ | * Add: -device usb-host, | ||
+ | |||
+ | **Caution: | ||
+ | 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. | ||
+ | |||
+ | |||
+ | ==== Mac OS 10.3 and above ==== | ||
+ | For USB storage devices you might need to: | ||
+ | |||
+ | * Run a terminal and execute: sudo kextunload / | ||
+ | * Add: -device usb-ehci, | ||
+ | |||
+ | **Caution: | ||
+ | |||
+ | |||
+ | |||
+ | ===== Networking | ||
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 \\ | 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 [[http:// | However, you can also use the realtek 8139 device. This requires installation of the appropriate drivers. You can download them from the [[http:// | ||
- | There are several ways to get networking going in OSX hosts: | + | There are several ways to get networking going in macOS hosts: |
=== Slirp-based networking === | === Slirp-based networking === | ||
- | If not added already, add the following | + | **Note:** this is activated by default on Qemu-system-ppc, so doesn' |
- | * -netdev user,id=network01 -device sungem,netdev=network01 | + | * -device sungem,netdev=network01 -netdev |
- | === Bridging a tap device manually=== | + | == Running two Qemu-system-ppc instances with networking |
- | For OSX Mountain Lion and above, supporting | + | If you want to run two instances of Mac OS/OSX simultaneously, Qemu needs to be able to tell the network |
- | * -netdev | + | * -device sungem,netdev=network01, |
+ | and make sure you add a different mac address to the second instance: | ||
+ | * -device sungem,netdev=network01,mac=52: | ||
+ | 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.\\ | ||
+ | |||
+ | === VMNET-based: | ||
+ | **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 " | ||
+ | |||
+ | -device sungem, | ||
+ | |||
+ | (You can find the name of the host network device in the system report under networking. This will often be " | ||
+ | |||
+ | |||
+ | === Tap-based: Bridging one or more tap devices (enabling Appletalk networking)=== | ||
+ | |||
+ | **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: | ||
+ | |||
+ | * -device sungem, | ||
* sudo ifconfig bridge0 create | * sudo ifconfig bridge0 create | ||
Line 128: | Line 198: | ||
=== Bridging a tap device: the easy way === | === Bridging a tap device: the easy way === | ||
- | Create a network bridge in your OSX host network settings and add your network device to the bridge. | + | 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 script with which you boot qemu: | + | Change the qemu.command file: |
- | * remove: | + | * -device sungem,netdev=network01 |
- | * add: -netdev tap,id=network0, | + | |
- | Save the boot script | + | Save the command file and run it as root.\\ |
- | If you want, you can leave the bridge intact after you quit Qemu, so it is already available next time you run Qemu with tap networking.\\ | + | 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 |
- | === Running two qemu instances with networking === | + | === Peer to peer networking between two Qemu-system-ppc |
- | + | ||
- | If you want to run two installations of Mac OS/OSX, Qemu needs to be able to tell the network devices apart. You can add a mac address to the networking device: | + | |
- | + | ||
- | * -netdev user, | + | |
- | and make sure you add a different mac address to the second instance: | + | |
- | * -netdev user, | + | |
- | 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. | + | |
- | + | ||
- | === Peer to peer networking between two Qemu instances === | + | |
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: | 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: | ||
Line 159: | Line 220: | ||
=== Getting files in and out of your emulated Mac through a network connection === | === Getting files in and out of your emulated Mac through a network connection === | ||
+ | **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. \\ | 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. \\ | ||
Line 165: | Line 227: | ||
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.\\ | 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.\\ | ||
- | === Forwarding ports to the host === | + | **Note:** for other Mac OS 9.x/OSX guests, see the port forwarding |
- | You can provide services running on the guest to the host by forwarding | + | |
- | * -netdev user,id=network01, | + | === Forwarding ports to the host (only needed when using the slirp network option) === |
- | The webserver running on the guest is then accessible through e.g., http:// | + | **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. \\ |
- | ==== Booting from a real CD ==== | + | You can provide services running on the guest to the host by forwarding ports to the host. |
+ | |||
+ | == Running a web server == | ||
+ | To provide access to e.g., a webserver running in the guest you can use: | ||
+ | |||
+ | * -device sungem, | ||
+ | |||
+ | The webserver running on the guest is then accessible through http:// | ||
+ | |||
+ | == Getting files in and out of the guest with FTP == | ||
+ | |||
+ | * -device sungem, | ||
+ | |||
+ | Forwarding port 21 to the host allows running an ftp server | ||
+ | You can access the guest by connecting to ftp:// | ||
+ | |||
+ | ==Multiple port forwarding == | ||
+ | You can forward multiple ports: | ||
+ | |||
+ | * -device sungem, | ||
+ | |||
+ | 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. | ||
+ | |||
+ | * -device sungem, | ||
+ | ===== Booting from a real CD ===== | ||
To boot from a real CD, you first need to insert the CD and unmount it using e.g., Diskutility. \\ | To boot from a real CD, you first need to insert the CD and unmount it using e.g., Diskutility. \\ | ||
Line 180: | Line 265: | ||
#!/bin/bash | #!/bin/bash | ||
cd " | cd " | ||
- | sudo ./ | + | sudo ./ |
- | | + | |
- | -cdrom / | + | |
- | -netdev user, | + | |
+ | -boot d \ | ||
+ | -cdrom / | ||
Line 196: | Line 283: | ||
- | ==== Creating new disk image in OSX with DiskUtility ==== | + | ===== Creating new disk image in OSX with DiskUtility |
You can make new disk images which Qemu will use as hard drive, on which you can install Mac OS/OSX. \\ | You can make new disk images which Qemu will use as hard drive, on which you can install Mac OS/OSX. \\ | ||
Line 213: | Line 300: | ||
- | ==== Changing the mounted cdrom image ==== | + | ===== Changing the mounted cdrom/ |
In Mac OS guest: First drag any mounted CD from the desktop into the trash. | In Mac OS guest: First drag any mounted CD from the desktop into the trash. | ||
- | Open the Qemu Monitor by selecting | + | Through the Machine menu:\\ |
- | Type “info block” to find the name of the CD drive in Qemu (most likely: ide1-cd0) \\ | + | |
- | Type “eject ide1-cd0” \\ | + | * Select Machine/ |
- | Type “change ide1-cd0 / | + | * Navigate to the CD image you want to mount \\ |
- | Close the Qemu Monitor by selecting View/VGA \\ | + | * Select the CD image and click Open.\\ |
+ | |||
+ | **Note:** you can also mount floppy images this way. | ||
+ | |||
+ | Through | ||
+ | |||
+ | * Select | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
Also see the qemu documentation here: https:// | Also see the qemu documentation here: https:// | ||
- | ==== Mounting a real cd ==== | + | ===== Mounting a real cd ===== |
- | NOTE: you need to unmount the real cd from the desktop (using e.g., disk utility) before using it in Qemu. \\ | + | **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.)\\ | ||
- | Open the Qemu Monitor by selecting View/Compat monitor from the Qemu menu \\ | + | * Run Qemu as root \\ |
- | Type “info block” to find the name of the CD drive in Qemu (most likely: ide1-cd0) \\ | + | * Open the Qemu Monitor by selecting View/Compat monitor from the Qemu menu \\ |
- | Type “change ide1-cd0 / | + | |
- | Close the Qemu Monitor by selecting View/VGA from the Qemu menu \\ | + | |
+ | | ||
- | ==== Experimental builds ==== | + | ===== Experimental builds |
Qemu is being actively developed. This means that some new features can become available that are not yet incorporated into the official source code. | 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, | Currently there are several such developments, | ||
- | -Sound support\\ | + | -Sound support. \\ |
+ | |||
+ | You can download some of these experimental builds for our forum under **Experimental builds** : http:// | ||
+ | |||
+ | -File sharing with the host \\ | ||
+ | -Mouse tablet driver | ||
- | You can download | + | You can download |
- | ==== Various utilities ==== | + | ===== Various utilities |
=== Script to prepare a hard disk image for use with OSX Server 1.2v3 or Developer preview 2. === | === Script to prepare a hard disk image for use with OSX Server 1.2v3 or Developer preview 2. === | ||
Line 279: | Line 383: | ||
- | ==== Currently known issues ==== | + | ===== Currently known issues |
+ | * Tap networking does not work in Mojave/Big Sur | ||
* Restart doesn' | * Restart doesn' | ||
+ | * Qemu will not boot Mac OS when memory is set to 64Mb or less. | ||
+ | * Sound only works reasonably well in Mac OS 9 / Mac OSX 10.0 guests. | ||
+ | * Sound will not work in Mac OS guests with memory set to 1024Mb or more, due to virtual memory being turned off automatically. | ||
+ | |||
+ | |||
+ | ===== Useful additional command line arguments ===== | ||
+ | * -k en-us sets the keyboard language (see below for possible languages) | ||
+ | The language codes available are:\\ | ||
+ | ar de-ch es fo | ||
+ | da en-gb et fr | ||
+ | de en-us fi fr-be hr | ||
+ | * -rtc base=localtime sets the guest time to the local machine time | ||
+ | * -full-screen sets the guest to run full screen | ||
+ | * -prom-env " | ||
+ | * -prom-env " | ||
+ | * -prom-env " |