Emaculation.com
 

Installing Qemu for Windows

(Guide Updated February 18, 2017)

Introduction

Qemu can run PPC Mac OS 9.0, 9.1, 9.2 and PPC OSX 10.0, 10.1, 10.2, 10.3, 10.4 and 10.5

Requirements

  • Qemu program
  • Disk images for the PowerPC versions of Mac OS or OSX you want to install

Assumptions in this guide

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.

Qemu installation

  • Go to http://www.emaculation.com/forum/viewtopic.php?f=34&t=9028 and download our latest build from the official Qemu source.
  • Create a folder for Qemu-related files and unpack the download. Put your Mac OS/OSX disk images in this folder.
  • Create an empty disk image with qemu-img.exe. Open a command prompt and navigate to your Qemu folder.
qemu-img.exe create -f raw -o size=2G MacOS9.2.img 
  • Open your favorite text editor and create a file called qemu.bat in your qemu folder. (If one is contained in the download, edit that one).
  • Paste the code below into the file (all on one line!):
qemu-system-ppc.exe -L pc-bios -boot d -m 512 -M mac99 -prom-env "auto-boot?=true" -prom-env 
"boot-args=-v" -prom-env "vga-ndrv?=true" -drive file=MacOS9.2.iso,format=raw,media=cdrom -drive file=MacOS9.2.img,format=raw,media=disk -sdl -netdev user,id=network01 -device sungem,netdev=network01 
  • Save qemu.bat

Short explanation of the content of the file:

qemu-system-ppc.exe starts qemu with all the following as parameters:
-L pc-bios defines the location of bios files to be used.
-boot d defines to boot from a drive entry marked as a cdrom, “-boot c” would define to boot from a drive entry marked as disk.
-M mac99 defines the mac model used(*).
-m 512 defines the amount of memory (in Mb) for OS9/OSX.
-prom-env “auto-boot?=true” -prom-env “boot-args=-v” define boot parameters for openbios and Mac OSX. The “-v” makes the boot process verbose
-prom-env “vga-ndrv?=true” loads the qemu-vga.ndrv file to provide on the fly resolution swithing. Setting this to false ignores the driver
-drive file=MacOS9.2.iso,format=raw,media=cdrom defines the name, location, format, and type of a cdrom (or dvd) image file to be used
-drive file=MacOS9.2.img,format=raw,media=disk defines the name, location, format, and type of a hard disk image file to be used
-sdl instructs Qemu to use SDL for the graphical display
-netdev user,id=network01 -device sungem,netdev=network01 tell qemu to use the sungem network device on a qemu-internal DHCP server

(*)The mac model entry accepts 3 options for the via parameter:
mac99,via=pmu (with PMU, supporting 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 (default, this allows use of the older, now less supported cuda)

  • Double-click qemu.bat. This starts Qemu and boots the MacOS9.2.iso installation CD image.

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 “Utilities” folder and start the “Drive Setup” program. Select the entry “<not initialized>” and click “Initialize” and again in the next window. 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.

Booting the installed Mac OS

To boot the installed Mac OS, you need to edit the qemu.bat file: Change the “-boot d” argument to “-boot c” . Also reverse the order in which your disk and cd rom entry are listed in qemu.bat. When booting with “-boot c”, make sure your hard disk image file is listed first. Save the file. Double-click qemu.bat and Mac OS will boot from the hard disk.

Done.

Connecting other CDs or disk images

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.bat:

"-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.bat. The CD image (if readable by Mac OS) will appear on the desktop for you to use.

Changing the graphics settings

You can set the initial size and colour depth of the boot window, using the -g parameter like this:

"-g 1024x768x32"  (Without the quotes!) 

Once in Mac OS, you can use the monitors control panel to set the desired screen size and colour depth.

Networking

The latest Qemu for Windows 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 two ways to get networking going in Windows: through slirp or tap networking

Slirp-based networking

If not added already, add the following to your command line:

  • -netdev user,id=network01 -device sungem,netdev=network01

Bridging a tap device

You need to install the OpenVPN tap driver, bridge it with your normal ethernet connection and use the following in the qemu command line:

  • -netdev tap,ifname=TapEthernet1,id=network01 -device sungem,netdev=network01 (and replace “TapEthernet1” with the name of the tap device network connection)

Running two qemu instances with networking

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,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:56 (this is the default mac address)

and make sure you add a different mac address to the second instance:

  • -netdev user,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:66

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.

To allow two qemu instances to “see” eachother on the network, you can e.g. install a second tap device and bridge both tap devices with the default network connection. You must then also use different mac addresses for each connection:

  • -netdev tap,ifname=TapEthernet1,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:56
  • -netdev tap,ifname=TapEthernet2,id=network01 -device sungem,netdev=network01,mac=52:54:00:12:34:66

Advanced usage

Printing

There are multiple way to print from the guest operating system to the host:

Print directly to a networked printer you have Mac OS/OSX drivers for. This assumes you have set up tap networking so Mac OS can see the windows network and networked printer.

Print to a file that is moved to the host to print. How to print to e.g., a pdf file depends on the guest operating system.

Changing the mounted cdrom image

In Mac OS: First drag any mounted CD from the desktop into the trash

Open the Qemu Monitor by pressing Ctrl-Alt-2
Type “info block” to find the name of the CD drive in Qemu (most likely: ide1-cd0)
Type “eject ide1-cd0”
Type “change ide1-cd0 Driveletter:/path/name-of-cd-image.iso” (note the forward slashes!)
Close the Qemu Monitor by pressing Ctrl-Alt-2 again (do not close the window by clicking the close button)

Mounting a real cd

NOTE: you cannot mount Mac formatted CD's, but other formats work

Open the Qemu Monitor by pressing Ctrl-Alt-2
Type “info block” to find the name of the CD drive in Qemu (most likely: ide1-cd0)
Type “change ide1-cd0 /dev/cdrom” (note the forward slashes!)
Close the Qemu Monitor by pressing Ctrl-Alt-2 again (do not close the window by clicking the close button)

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. Currently there are several such developments, in various states of reliability:

-Sound support

You can download some of these experimental builds for our forum under Experimental builds : http://www.emaculation.com/forum/viewtopic.php?f=34&t=9028

ppc-osx-on-qemu-for-windows.txt · Last modified: 2018/09/11 02:18 by cat_7
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki