This `README.md` documents the process of creating a `Virtual Hackintosh`
system.
Note: All blobs and resources included in this repository are re-derivable (all
instructions are included!).
:green_heart: Looking for **commercial** support with this stuff? I am [available
over email](mailto:dhiru.kholia@gmail.com?subject=[GitHub]%20OSX-KVM%20Commercial%20Support%20Request&body=Hi%20-%20We%20are%20interested%20in%20purchasing%20commercial%20support%20options%20for%20your%20project.) for a chat for **commercial support options only**.
Working with `Proxmox` and macOS? See [Nick's blog for sure](https://www.nicksherlock.com/).
Yes, we support offline macOS installations now 🎉
### Contributing Back
This project can always use your help, time and attention. I am looking for
help (pull-requests!) with the following work items:
* Documentation around running macOS on popular cloud providers (Hetzner, GCP,
AWS). See the `Is This Legal?` section and associated references.
* Document (share) how you use this project to build + test open-source
projects / get your stuff done.
* Document how to use this project for XNU kernel debugging and development.
* Document the process to create and reuse VM snapshots. Instantaneous macOS
boots would be nice this way.
* Document the process to launch a bunch of headless macOS VMs (build farm).
* Document usage of [munki](https://github.com/munki/munki) to deploy software
to such a `build farm`.
* Enable VNC + SSH support out of the box or more easily.
* Better support + docs for AMD Ryzen.
* Robustness improvements are always welcome!
* (Not so) crazy idea - automate the macOS installation via OpenCV.
### Requirements
* A modern Linux distribution. E.g. Ubuntu 20.04 LTS 64-bit or later.
* QEMU >= 4.2.0
* A CPU with Intel VT-x / AMD SVM support is required (`egrep '(vmx|svm)' /proc/cpuinfo`)
* A CPU with SSE4.1 support is required for >= macOS Sierra
* A CPU with AVX2 support is required for >= macOS Mojave
Note: Older AMD CPU(s) are known to be problematic. AMD FX-8350 works but
Phenom II X3 720 does not. Ryzen processors work just fine.
### Installation Preparation
* KVM may need the following tweak on the host machine to work.
```
echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
```
To make this change permanent, you may use the following command.
```
sudo cp kvm.conf /etc/modprobe.d/kvm.conf # for intel boxes
The "secret" Apple OSK string is widely available on the Internet. It is also included in a public court document [available here](http://www.rcfp.org/sites/default/files/docs/20120105_202426_apple_sealing.pdf). I am not a lawyer but it seems that Apple's attempt(s) to get the OSK string treated as a trade secret did not work out. Due to these reasons, the OSK string is freely included in this repository.
Please review the ['Legality of Hackintoshing' documentation bits from Dortania's OpenCore Install Guide](https://dortania.github.io/OpenCore-Install-Guide/why-oc.html#legality-of-hackintoshing).
Gabriel Somlo also has [some thoughts](http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/) on the legal aspects involved in running macOS under QEMU/KVM.
You may also find [this 'Announcing Amazon EC2 Mac instances for macOS' article](https://aws.amazon.com/about-aws/whats-new/2020/11/announcing-amazon-ec2-mac-instances-for-macos/
) interesting.
### Motivation
My aim is to enable macOS based educational tasks, builds + testing, kernel
debugging, reversing, and macOS security research in an easy, reproducible
manner without getting 'invested' in Apple's closed ecosystem (too heavily).
These `Virtual Hackintosh` systems are not intended to replace the genuine
physical macOS systems.
Personally speaking, this repository has been a way for me to 'exit' the Apple
ecosystem. It has helped me to test and compare the interoperability of `Canon
CanoScan LiDE 120` scanner, and `Brother HL-2250DN` laser printer. And these
devices now work decently enough on modern versions of Ubuntu (Yay for free
software). Also, a long time back, I had to completely wipe my (then) brand new
`MacBook Pro (Retina, 15-inch, Late 2013)` and install Xubuntu on it - as the
`OS X` kernel kept crashing on it!
Backstory: I was a (poor) student in Canada in a previous life and Apple made [my work on cracking Apple Keychains](https://github.com/openwall/john/blob/bleeding-jumbo/src/keychain_fmt_plug.c) a lot harder than it needed to be. This is how I got interested in Hackintosh systems.