How to set up Mac OS X 10.0 using QEMU Links: Hard Drive Command: OS Download: https://winworldp. QEMU (short for Quick EMUlator dubious – discuss) is a free and open-source emulator and virtualizer that can perform hardware virtualization. QEMU is a hosted virtual machine monitor: it emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems.
(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.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.
Install Mac OS 9
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.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
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
http://www.lepotofon1986.simpsite.nl/mojave-download-for-macbook-pro-2011. directory with an older version that still supports 256 colours.2018-12-11 Updates
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.Status - 17 July 2020 - Core information collected [Optionally: I may at some point add section on moving to / from: Physical to Virtual Mac and to / from VMWare Fusion to QEMU / KVM Macs] and now verified with Ubuntu 20.04 and does some further Q35 Version and Network device testing.
If you do Mac development then its likely you will run virtual Mac's. In fact runing virtual machines for development is pretty much essential for anything that is non-trival. For Mac developer, this meant a choice of VMWare or Parallels and now you can also use Linux with KVM / QEMU and Clover/OVMF.
Download Guitar Pro 7.5 trial version. Windows 7 SP1 / 8 / 10 Mac OS X Yosemite 10.10 or later Languages The software is available in English, French, German, Italian, Japanese, Korean, Portuguese, Russian, Spanish, Swedish, Traditional and Simplified Chinese. Download Guitar Pro 7.5.2 for Mac full version program setup free. Guitar Pro 7 for macOS is a powerful score player specially developed to learn how to play, improve your technique, reproduce your favorite songs or accompany yourself. Guitar Pro 7.5.2 for Mac Review. Guitar Pro 7 for Mac OS X is a powerful and versatile score player for. Download guitar pro 5 for mac. Guitar Pro for Mac Free to try Arobas Music Mac OS X 10.4/Intel, Mac OS X 10.5/Intel, Mac OS X 10.6/10.7 Version 6.1.2 Full Specs Download Now Secure Download.
Here are the high level steps and instructions required to get macOS (OS X) up and running on Ubuntu with KVM / QEMU. Free booter download.
- Get Ubuntu running with virtualisation enabled
- Install KVM / QEMU software
- Configure Ubuntu network bridge with NetPlan
- Add Clover for EFI boot support
- Create your Mac VM using the right QEMU configuration and settings for macOS
- Optionally add PCI Pass-Through for network and GPU support on you virtualised macOS machine
I will cover each area of configuration in turn.
I started experimenting with macOS on KVM with Ubuntu 16.04. At the time this required recompiling of QEMU. I then moved to Ubuntu 18.04 (which does not require any compilation) and updated to 19.04 (which has much much better performance) and have tested with 19.10. I am now running 19.10 and have found it completely stable for running virtual macOS on KVM.
Here is summary of various Ubuntu Versions (desktop):
- Ubuntu 16.04 - Requires compile of upstream QEMU (avoid)
- Ubuntu 18.04 - Works out of box, but introduces NetPlan, so you need to learn how to configure your bridge (linux virtual switch) to get your networking working, also it is very very slow to boot macOS
- Ubuntu 19.04 - As per 18.04 and boots macOS much much faster
- Ubuntu 19.10 - having done testing, I am now using 19.10 as main virtualisation host
- Ubuntu 20.04 - have tested and have running number of macOS vm's as part of upgrade process from 19.10
If you want to use PCI Pass-through the you should update your grub boot configuration, here are KVM Kernal Configuration parameters that are relevant:
NOTE: The 'iommu=1 intel_iommu=on' grub settings are required to enable PCI Pass-Through
Reboot the machine to ensure all kernal parameter are set
The packages required for Ubuntu are: qemu, libvirt, virtual machine manager, OVMF:
This installs:
- 64 bit x86 emulation and the libvirt abstraction layer,
- the open virtual machine firmware (ovmf) - First level of EFI support (you need Clover as well)
- virt-manager - virtual machine configuration and management UI
All networking (unless you attach a physical NIC via PCI Passthrough) with KVM / QEMU is handled via Linux Bridge. This is a kernal loaded modue that behaves like a dumb ethernet switch. It does not provide any active network function in macOS context and the only important thing you have to decide is a name for the logical bridge (i.e. br20) and the physical NIC that this will be connected to. In Ubuntu 18.04, 19.04, 19.10 & 20.04 this is managed via the NetPlan configuration.
Here is a example NetPlan configuration for a machine with multiple ethernet NICs installed. You will see that all the network ethernet interfaces bar ens4f0 are IP disabled, Instead all the interfaces have bridges defined: br01, br20, br40 & br50. All the bridges have DHCP4 disabled. If you enable DHCP4 or define a static IP address on a bridge then this IP address will be assigned to the KVM Hosting machines and allow the virtual machines connected to the network bridge to get access to the hosting machine. This is likely to be undesireable for security reasons. It illustrates how virtualisation has signficant impact on how physical network seperation has to be managed. In this example the 192.168.10.4/25 address is used to access the KVM hosting machine.
In my case the logical NICs that the ethernet ports connect to have corresponding seperate ethernet VLAN amd IP subnets. You need to keep in mind what subnet you want your macOS virtual machine to connect to and the bridge this is supported by. The selection of which bridge a NIC is connected to is managed via QEMU configuration.
While ovmf provides the first level of EFI boot for virtual Mac, it does not provide everything you need. The EFI boot process passes control to Clover EFI boot manager which provides support to load the HFS+ and new Apple File System (APFS) file system drivers needed to boot macOS (OS X).
Clover also provides things that make KVM / QEMU look like a real Mac to the macOS software layer.
Qemu Osx Guest
To use Clover you need to create a small seperate qemu qcow2 virtual disk. This contains the various Clover drivers and their configuration data. The Clover virtual disk becames the boot disk which then loads macOS from the HFS+/APFS virtual disk.
Setting up Clover boot disk is a bit of a chicken / egg problem, as the Clover intaller is a macOS app and the disk you want to do the install on is a virtual disk, but you need to have a bootable Mac to do this..
The way to start is to create the Clover disk via VMWare Fusion macOS virtual machine, which has Clover disk attached as virtual image and then once you have installed Clover onto this then convert the vmdk format disk image to native QEMU qcow2 one. Having Clover on a little disk makes it much easer to work with, than using a CD-ROM boot image. The Clover boot disk is a MS FAT32 formated disk, which is setup based on EFI conventions.
Here is summary information on layout of Clover disk:
Qemu Os X
The sizes correspond to: 512 MiB GPT Partitioned Disk with
- 200 MiB MS FAT32 - EFI volume
- 310 MiB MS FAT32 - CLOVER volume
Only the the EFI part is required, but having the extra CLOVER volumes is useful as you can put drivers and other things like 'Clover Configurator' here as it may be that you cannot get access to network on initial boot.
To install clover on the disk you simply download Clover installer, run the installer and select the '/Volumes/EFI' (the mount point that partition will be on after rebooting with Clover disk attached) as the installation location. The installer will populate the Clover directory structure and add the files
Clover configuration example (without SMBIOS details):
On KVM the setup is very sensitive to the SMBIOS configuration and this is quite complex. The recommended approach is to use 'Glover Configurator' to create this. Here is a seperate SMBIOS Clover configuration example:
I have found the MacMini6,2 machine type to be reliable and have left my machine type as this for more than 1 year as testing with other machines types resulted in failure to boot.
You can test with Clover Configurator for more recent machines by loading and saving the configuration and then copying into backup a file on the EFI volume. This means you can readily return to a known configuration, by booting using Ubuntu and mounting the EFI volume. When editing the configuration, the important things is to ensure machine uuid and serial numbers are unique to the machine instance.
The Clover Configuration is with the EFI directory: /Volumes/EFI/EFI/CLOVER/config.plist
In addition to setting the Clover configuration, you also need to select a subset of EFI drivers to load on boot.
With Clover V2.5 Rel 5070 here is the set of drivers I have installed (from macOS terminal, on EFI boot disk mounted at /Volumes/EFI):
To know what Clover system has been used to boot from by convention I also do: touch clover-vX.X_rxxxx and touch i-am-MAC-OS in the /Volume/EFI/EFI/CLOVER directory so it is easy to see the Clover version and virtual Mac that is being used. This is very helpful if you have multiple Clover disks attached to the machine when copying configuration across old / new Clover configurations.
With the exception of: HFSPlus.efi and apfs.efi files all the files within the driver directory are part of Clover, the two exception are taken from an actual Mac. These are the HPFS+ (from physical firmware) and APFS (from disk) drivers which are required to read the Apple formatted disk volumes.
The VBoxHfs.efi is a Clover supplied alternate to Apple HFSPlus.efi driver.
When you install Clover you can select to have all the drivers available installed in the /Volumes/EFI/EFI/Clover/drivers/off directory and then selectively move the ones you need into the UEFI directory.
NOTE 1: With KVM based Macs there is no need to get into the black magic of extra kexts (kernel extensions) or ACPI / DSDT (Advance Configuration & Power Interface / Differentiated System Description Table) tweeking.
NOTE 2: The lastest version of Clover are 64-Bit UEFI, in prior version there where as set of 32-Bit and 64-Bit EFI files. In my Clover:
- V2.4 Rel. 44509 - the EFI driver files are in /Volumes/EFI/EFI/CLOVER/drivers64UEFI while
- V2.5 Rel. 5070 - the EFI driver files are in /Volumes/EFI/EFI/CLOVER/drivers
So it appears that the need to specify 64-Bit version has gone.
To covert VMWare EFI Boot disk to QEMU qcow2 one:
To run macOS machine with QEMU / KVM requires very specific set up, summarised here:
- Q35 - Virtual Machine (v 2.11, 2.12 work) [Also I have tested with v 3.1 post installation boot up , but not with a new install]
- OVMF - Firmware which has associated NVRAM storage blob (OVMF_VARS.fd). Each bootable macOS machines needs to have its own NVRAM storage device
- e1000-82545em - network device, connected to bridge br10 in below example [or vmxnet3 (VMWare virtual NIC driver) testing within 10.12 Sierra onwards]
- SATA - Disk and CDROM only, in this example there are 2 disks attached, the Clover Boot disk and the virtual MacOS one
- USB Keyboard
- EvTouch USB Graphics Tablet
- VGA Graphics
In addition the Mac VM is very sensitive to CPU type and features, for Catalina here are details of CPU configuration:
The macOS machine also needs to get its special applesmc configuration:
NOTE: See 'Mac OS X Internals - A Systems Approach' Bonus chapter to get above programmically on your Mac.
My approach is to use the Virtual Machine Manager to create initial configuration, then start machine to save the configuration and then edit the configuration to set the detailed CPU, Video & OVMF_VARS.fd configuration:
- sudo virsh edit MAC-NAME - to edit final configuration details.
![Qemu for mac os Qemu for mac os](/uploads/1/3/4/7/134747402/217447860.png)
As part of initial boot do an escape at Clover startup and change the Clover resolution value to match the config-plist value (in this example: 1024x768)
Here is example of complete configuration for (Catalina Mac):
Once you have completed editing using virsh, exit the editor and restart machine with all the correct configuration.
Once you have got a running macOS running, then for each new machine just copy the working Clover Boot disk and OVMF_VARS.fd files into new location for this new machine and then on initial bood go into Clover Configurator to edit the configuraton (serial numbers and UUID) so that it has its own unique identify.
If you you have configured you kernel correctly (see above grub configuration), then this is trivial. Simple grab the PCI Resource via Virtual Machine Manager GUI and reboot the machine.
I have successfully attached: SmallTree 10Gbe and Areca RAID controllers to QEMU / KVM Virtual Mac.
It is relatively easy to move physical Mac to Virtual and back again. The tools for this include:
- qemu-img - to convert images
- Carbon Copy Cloner - to copy bootable images
- OS Bless Command - to re-bless a HD volume to make it bootable
References & Links
After much effort and testing based on the following information from: Kraxel's, Kholia, Gordon Turner and Clover sites:
Kraxel - did a lot of ground work to get MacOS running on KVM, most of which has flowed into upstream KVM / QEMU and so this is historical now
Kholia - keeps onging testing and configuration tweeking information as MacOS goes through its release cycles
Gordon Turner - has some useful pointers that where easier to follow than some of Kholia's instructions
Clover - provides the MacOS EFI implementation tweeks required to bt MacOS running on KVM
Clover Configurator - only availeable as a binary executable, so you have to make a trust decision on whether to use it
My earlier notes on Insanely Mac
Mac OS X Internals - A Systems Approach by Amit Singh provides most of what you need to know about EFI and OS X (now macOS) boot process and has bonus chapter on SMC keys needed to boot OS X