Mac Os 10.3 Image File For Qemu

Mac OS X 10.3. MacOS X was Apple's replacement for their classic MacOS.MacOS X is based on NeXTSTEP, a Unix-based OS. The first consumer release also featured a new user interface appearance called 'Aqua'. Any of my search term words; All of my search term words; Find results in. Content titles and body; Content titles only.

This page documents how to create a hard disk image in QEMU.

The command[edit]

The standard command for creating a basic hard disk image is this.

It will create an output similar to this:

The command is broken down like this:

  1. This can be the fastest file-based format. If your file system supports holes (for example in ext2 or ext3 ), then only the written sectors will reserve space. Use qemu-img info to obtain the real size used by the image or ls -ls on Unix/Linux. Although Raw images give optimal performance, only very basic features are available with a Raw image.
  2. I've tested kqemu 1.3pre with a qemu CVS snapshot, it don't work in Windows when I use a SSE2 qemu and want to start the deadmoo image. It's the same like before:it freeze and I have to restart the PC.
  3. Qemu-img convert BaseSystem.dmg -O raw BaseSystem.img Create a virtual HDD image where macOS will be installed. If you change the name of the disk image from machdd.img to something else, the boot scripts will need updating to point to the new image name. Qemu-img create -f qcow2 machddng.img 128G.
  • qemu-img - This is the name of the program. It is necessary for using the following command.
  • create - This tells qemu-img that we are creating a disk image. Other arguments include 'dd', 'info', 'map', 'measure', 'snapshot', 'rebase', and 'resize'. This will be described in more detail later on.
  • -f - An argument that specifies which file format we are going to be using.
  • qcow2 - The file format we are using, in this case qcow2. qcow2 is the recommended since it is dynamically allocated - e.g. it only allocates space when needed, but at a (pretty much) unnoticeable speed loss. There are many other file formats, which will be listed below.
  • example.img - This specifies the name of the image we are going to be using. It can be whatever, and have whatever extension (or none at all), it doesn't matter.
  • 100M - This specifies the size of the virtual disk. 100M stands for 100 megabytes. Of course modern operating systems take up much more than that, so it's recommended to make it at least 30 gigabytes or more, which can be done by replacing 100M with 30G. The following letters are excepted:
    • K - K stands for Kilobytes. For instance, 100K would be 100 kilobytes. Unrecommended. You can create hard disk images in pure kilobytes if you wanted, e.g. 30000000k for 30 gigabytes.
    • M - M stands for Megabytes. For instance, 100M would be 100 megabytes. You can also create hard disk images in pure megabytes if you want, e.g. 30000M for 30 gigabytes.
    • G - G stands for Gigabytes. For instance, 100G would be 100 gigabytes.
    • T - T stands for Terabytes. For instance, 1T would be 1 terabyte.
    • P - P stands for Petabytes. For instance, 1P would be 1 petabyte. Unrecommended unless you happen to have a supercomputer handy.
    • E - E stands for Exabytes. For instance, 1E would be 1 exabytes. Unrecommended unless you happen to have a supercomputer handy. Fun fact: The ext4 file system is capable of a maximum of 1.1529215 exabytes.

File formats[edit]

QEMU can recognize and read several different file formats, but this section will list the ones you can create with qemu-img.

qcow2[edit]

The recommended file format. It is fast, dynamically allocated, and has decent support in QEMU. However it does have a minor speed loss compared to raw, but this is unnoticeable in normal use.

qcow[edit]

This is an older version of the qcow2 file format. The main difference between the qcow2 and qcow file formats is that qcow2 supports multiple snapshots through a newer, flexible model for storing snapshots. It is recommended to use qcow2 instead.

raw[edit]

As the name suggests - it is a 'raw' file format, which means it will allocate all the space to the disk immediately, e.g. if you formatted a file named raw with 2G as the size, it would take up 2 gigabytes of space on the disk. This is the fastest option, and is recommended if you have a lot of disk space to spare.

vdi[edit]

A file format which is also compatible with VirtualBox 1.1. Recommended only if you are going to be switching through VirtualBox and QEMU frequently.

  • static - If set, the image will be created with metadata preallocation.

vmdk[edit]

A file format which is compatible with VMWare 3 and 4. Recommended only if you are going to be switching through VMWare and QEMU frequently. It supports the following arguments:

  • compat6 - Create a VMDK 6 image, instead of the default VMDK 4.
  • hwversion - Specify the vmdk virtual hardware version. If set, the Compat6 flag cannot be enabled.

vpc[edit]

A file format which is compatible with Windows Virtual PC. Recommended only if you are going to be switching through Windows Virtual PC and QEMU frequently.

vhdx[edit]

A Hyper-V compatible image format. Not recommended unless you're going to switch between Hyper-V and QEMU frequently.

parallels[edit]

A Parallels compatible image format. Not recommended unless you're going to switch between Parallels and QEMU frequently.

file[edit]

Not a file with any format - just a plain raw file.

cow[edit]

Ancient, depreciated QEMU file format that is not present in newer versions. Like qcow2 and qcow, it is a dynamically allocated file format. This cannot be used in Win32. Not recommended.

Read only file formats[edit]

  • bochs - Bochs image file
  • cloop - Linux Compressed Loop image, useful only to reuse directly compressed CD-ROM images present for example in the Knoppix CD-ROMs.
  • dmg - Apple disk image
Retrieved from 'https://computernewb.com/w/index.php?title=How_to_create_a_disk_image_in_QEMU&oldid=16197'

(Updated Dec 11, 2018)

I recently got an urge to revisit old computer media from the late 90s and early 2000s. Growing up around that time, I remember reading a lot of MacAddict and MacWorld to learn what I could do with a Mac. Building websites, graphic design, hacking the appearance of the UI, all these were explained in the pages of magazines.

These magazines are freely available on the Internet Archive, including their cover discs. I was curious to see what applications were around back then — what about emulating Classic Mac OS to see?

Creative variations in UI design

My first instinct was to reach for VirtualBox, but that is a no go as I need to emulate a Motorola 68K or IBM PowerPC architecture. I recalled that QEMU could emulate other architectures, surely someone has already tried to emulate Mac OS 9.

Yes, many people have already written about emulating Mac OS 9, but only recently (2018) did experimental audio support come out for QEMU. Here is a short guide on how I got it running with MacOS High Sierra as the Host OS.

Note that while QEMU is available in Homebrew, it does not have the experimental audio support (yet).

Internet Archive

Magazines can be browsed right on the archive site, or downloaded as archives or PDFs (or a torrent containing all formats). Cover discs can be downloaded directly as ISO files or a torrent for the ISO. Don’t worry about seedless torrents; these ones are backed with web seeding.

Requirements

DevTools: I already have homebrew and XCode installed; because of this I was not prompted for missing command line tools. If you don’t have them, you might be prompted (by MacOS) to install them.

Hardware: I am not sure about hardware requirements, as most modern Macs will probably eclipse the power needed to run the guest OS. However if you have a low-power CPU (e.g. MacBook) then there may be some struggling.

Windows/Linux: These instructions should probably work there too, although you will probably have to substitute something else for coreaudio in the configuration step.

Get QEMU “Screamer” Fork

These instructions are adapted from Cat_7 from the Emaculation forums

I started by creating a directory for all this emulation stuff.

Next clone the fork of QEMU with experimental audio support:

Then configure the source to use MacOS CoreAudio. I have also enabled LibUSB, KVM, HyperVirtualization Framework, and the Cocoa UI. In this case I am only compiling the emulator for PPC (32-bit).

Next use make to compile QEMU. (If you have more processor cores, use make -j 4 or however many cores to speed up the process.)

This will create a binary in qemu-screamer/ppc-softmmu/qemu-system-ppc that we can use.

Optionally you can install these binaries to /usr/local/bin or wherever. I kept them in the ~/emulation directory to separate them from the Homebrew QEMU binaries.

Create HD for Mac OS 9

We will need to have a hard drive image for our guest OS. I made mine 5 GB in size, which would be typical at the time for Mac OS 9.

In our qemu-screamer directory, we will use qemu-img to create the disk image.

Mac Os 10.3 Image File For Qemu

Get a Mac OS 9 Installer

If you have an ISO of a Mac OS 9 install disc (a Mac OS X classic install disc will not work — it must be bootable), then you can use that in the next step. If you don’t have one, you can download one from Mac OS 9 Lives: Mac OS 9.2.2 Universal Install.

Mac Os 10.3 Image File For Qemu

Install Mac OS 9

Qemu PPC For OSX [E-Maculation Wiki]

The Mac OS 9 Lives method won’t install quite like an original Mac OS 9 installer would, but instead will use Apple System Restore to restore an image onto the hard drive.

Start up QEMU with the following options:

A breakdown of that command:

  • -L qemu-screamer/pc-bios sets the BIOS
  • -cpu 'g4' emulate a G4 CPU
  • -M mac99,via=pmu will define the Mac model and enable USB support
  • -m 512 use 512 MB of RAM, could go lower probably
  • -hda macos92.img use our generated disk image for the hard drive
  • -cdrom '~/Downloads/Mac OS 9.2.2 Universal Install.iso' use the ISO for the cdrom
  • -boot d boot from the disk drive
  • -g 1024x768x32 default to 1024x768 resolution and 32 bit colour
  • -device usb-kbd enable USB keyboard emulation/support
  • -device usb-mouse enable USB mouse input, will improve cursor tracking somewhat

Once it starts up, you will be able to run Disk Initializer to format your hard drive image. Go ahead and do that, using Mac OS HFS Extended as the file system. One partition is good.

After initializing the disk, run Apple System Restore with the Mac OS 9 Lives disk image as the source and your disk as the destination. This will take a minute to restore. Once done, shut down the emulated system (Special Menu -> Shut Down).

Boot Mac OS 9

Similar to the last command, except we start up from the disk we created.

It should boot up and you will have a running Mac OS 9 with audio! I recommend saving this command as a shell script in your ~/emulation directory.

Qemu Gui Mac

Boots much faster than it did in 2001

Tips

Backups: When the emulator is shut down, just make a copy of the hard disk image to create a backup. If something breaks your Mac OS 9 installation then you can restore the file.

Discs: You can dynamically attach CDs/DVDs to the emulated system by going to the menu bar on your host system for the QEMU application and selecting the option to attach to the CD IDE drive. It will open a dialog letting you select your ISO.

Compatibility: This is emulating Mac OS 9.2.2, released in late 2001. The emulated hardware is more or less of the same vintage, meaning software from the mid-to-late 90s will have some trouble running (as I found). The most common problem is not being able to drop down to 256 colours, although I later found a solution (link below). I have not tried emulating Mac OS 8/8.5; a cursory reading of forums has mentioned that doesn’t work yet.

Easter Egg in Finder

256 Colours

See Full List On Github.com

To support 256 colours you will need to add a bios driver. See the EMaculation forums for instructions; it involves replacing a file in the pc-bios directory with an older version that still supports 256 colours.

2018-12-11 Updates

Run Mac Os On Qemu

I removed the extra arguments from configure as by default it will enable everything it can. make should use -j instead of -J. Using USB devices for mouse/keyboard improves mouse performance, but it still is a bit sluggish compared to the host machine. I found a way to get 256 colours working; see that section for a guide.

Comments are closed.