This is a simple guide for installing Snow Leopard in virsh/virt-manager/QEMU/KVM. Specifically, I'll be using virt-manager in this guide, however virt-manager is just a wrapper for virsh, which in this situation is just a wrapper for QEMU/KVM, so all of the information should be fairly interchangeable.
Note that this does not include GPU passthrough yet. While this is obviously the primary advantage to using QEMU/KVM here (over other VM solutions), as stated in the header, I'm still ironing out the kinks with that, but will update when I have more information. This does mean that, for now, you'll only have software rendering at your disposal, so gaming ability will be limited, but the OS will still work for most things.
There are two bootloaders I've managed to get this to work with: Chameleon and OpenCore. Clover I couldn't get working at all in QEMU/KVM, it threw an "X64 Exception" every single time, but the other two I found perfectly viable and there are pros and cons to each.
Installing with Chameleon
Chameleon is considered old and hacky by today's standards, however it is effectively tailor-made for the Snow Leopard era of Mac OS X, and as such it's generally easier to set up. If you want Snow Leopard with the least amount of effort, I recommend using this method.
- Acquire a bootable Chameleon ISO. This is available from this link, but in case it goes down, I've also mirrored it here:
- Acquire Mac OS X 10.6. This is available from the Apple Developer website on the "More Downloads" page, though you will need an Apple account to access it. They've made the "More Downloads" page difficult to navigate to, so here's a direct link. Type in "10.6" into the "filter" and scroll down until you find "Mac OS X version 10.6 Snow Leopard build 10A432" and click the "User DVD" to download it. This is essentially a complete image of the retail CD. Ignore the other 10.6.x "builds" listed, these are only updates, not the actual OS installer.
- Convert the DVD to a disk. For some reason, Chameleon has trouble reading Snow Leopard as a CD. I'm not sure if this is a limitation of Chameleon, QEMU, or a combination of the two, but for whatever reason, we'll need to convert this to a disk instead.
- To be fleshed out...
- If you have a copy of Mac OS available, mount the Snow Leopard DVD, create a DMG, format it as GPT/JHFS+, label it "USB", mount it, and use ASR to "restore" the image to the DMG you just made with the following command:
This will produce an image that can be used in QEMU/KVM, though I'm hoping to find a way that works independently of Mac OS in case you don't have an readily available install.
Code: Select all
sudo asr --source "/Volumes/Mac OS X Install DVD" --target /Volumes/USB --erase --noverify
- Create a new VM in virt-manager. There will be no existing Snow Leopard definition, so leave it as "Generic OS". Set up the HDD, RAM, and CPU however you wish. Ensure "Customize install" is checked before finishing because we'll need to make a few more changes.
- Set the chipset to "Q35" and leave the firmware set to "BIOS".
- Add the Chameleon ISO as a SATA CD-ROM and set it to the VM's only boot device.
- Add the Snow Leopard disk we created earlier as a SATA disk.
- Add a USB keyboard. QEMU defaults to PS/2 peripherals and Mac OS X has no native support for them. While support can be added with a kext, it's easier to just add a USB keyboard. virt-manager will have already added a USB "tablet" (to translate screen mouse events to "real" mouse events) so you don't need to worry about the mouse.
- From here onwards, everything should work normally. Start the VM, it should boot into Chameleon, which you can use to boot into "Mac OS X Install DVD", and then after a few minutes, the GUI installer will appear. Don't worry if the boot looks like it's stopped doing anything for a minute or two, it will load eventually.
Installation should be straightforward. As usual, use Disk Utility to partition your hard drive, and then start installing to it. Feel free to install Rosetta (under Customize just before starting the installation) so you can play around with some older PowerPC apps too.
Installing with OpenCore
Coming soon...
Post-Install
All of this stuff is optional, but are highly recommended quality-of-life improvements.
- Update to 10.6.8. If you're gonna be using 10.6, may as well be the most recent version of 10.6. However you'll need to put some care and attention in here: Apple changed a handful of PCI-related kexts that ended up breaking Hackintosh booting, which means if you install this, you'll need to rollback some of the kexts to their 10.6.7 versions (provided here).
- In order to update, download the 10.6.8 "combo update" (i.e. including everything from 10.6.1 onwards so you don't have to install each update individually) from the Apple website.
- Install it as normal onto your Snow Leopard install, but don't reboot. The next boot will fail until you rollback those PCI kexts.
- If you did already reboot by accident, it's not the end of the world. You'll just have to boot into the installer DVD again to do the rollback.
- Download these 10.6.7 kexts (source):
- Replace the IOPCIFamily.kext and AppleACPIPlatform.kext in /System/Library/Extensions with the ones from the ZIP. The ZIP also contains Apple80211Monitor, but that doesn't appear to be necessary.
- Ensure kext permissions are set correctly. If you don't have a tool to automate that, these Terminal commands will do it:
Code: Select all
sudo chmod -Rf 755 /System/Library/Extensions sudo chown -Rf 0:0 /System/Library/Extensions
- You should now be safe to reboot and use your install as normal.
- Install Xcode. You may not be a developer or programmer, but considering how old Snow Leopard is nowadays, there's a good chance you may need compilers around so you can get stuff running. Additionally, Xcode contains useful tools that may come in handy for debugging your Hackintosh.
- Download Xcode 4.1. Much like the 10.6 retail DVD, this is available from the "More Downloads" section of the Apple website.
- Install Apple Software Installer Update 1.0. For some reason, Xcode will fail to install due to being "untrusted" (yes, despite being Apple's own software). Apparently this is a Snow Leopard bug, and can be fixed by installing this update from the Apple website.
- Now Xcode should install correctly.