Table of Contents
Pronounce
This README.md
paperwork the path of of setting up a Virtual Hackintosh
system.
Pronounce: All blobs and sources included in this repository are re-derivable (all
instructions are included!).
over e-mail for a chat for industrial enhance choices simplest. Pronounce: Undertaking sponsors earn earn entry to to the Non-public OSX-KVM
repository, and train enhance.
Working with Proxmox
and macOS? Study Gash’s blog for obvious.
Yes, we enhance offline macOS installations now
Contributing Benefit
This project can persistently sing your wait on, time and consideration. I’m having a see
wait on (pull-requests!) with the following work gadgets:
-
Documentation spherical running macOS on in vogue cloud companies (Hetzner, GCP,
AWS). Study theIs This Stunning?
allotment and associated references. -
Document (share) how you sing this project to make + test originate-source
projects / earn your stuff done. -
Document easy the system to make sing of this project for XNU kernel debugging and trend.
-
Document the path of to launch a bunch of headless macOS VMs (make farm).
-
Document utilization of munki to deploy instrument
to such amake farm
. -
Enable VNC + SSH enhance out of the box or extra simply.
-
Robustness improvements are persistently welcome!
-
(No longer so) loopy thought – automate the macOS set up via OpenCV.
Requirements
-
A in vogue Linux distribution. E.g. Ubuntu 20.04 LTS 64-bit or later.
-
QEMU >= 4.2.0
-
A CPU with Intel VT-x / AMD SVM enhance is required (
grep -e vmx -e svm /proc/cpuinfo
) -
A CPU with SSE4.1 enhance is required for >= macOS Sierra
-
A CPU with AVX2 enhance is required for >= macOS Mojave
Pronounce: Older AMD CPU(s) are known to be problematic. AMD FX-8350 works but
Phenom II X3 720 does no longer. Ryzen processors work factual fair.
Installation Preparation
-
KVM can comprise the following tweak on the host machine to work.
echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
To effect that alternate eternal, you might want to sing the following speak.
sudo cp kvm.conf /and plenty others/modprobe.d/kvm.conf # for intel boxes simplest, after cloning the repo under
-
Install QEMU and other applications.
sudo excellent-earn install qemu uml-utilities virt-supervisor git wget libguestfs-tools p7zip-stout effect -y
This step could must smooth be tailored in your Linux distribution.
-
Add user to the
kvm
andlibvirt
groups (would be wished).sudo usermod -aG kvm $(whoami) sudo usermod -aG libvirt $(whoami)
Pronounce: Re-login after executing this speak.
-
Clone this repository in your QEMU system. Files from this repository are
dilapidated in the following steps.cd ~ git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git cd OSX-KVM
Repository updates could even be pulled via the following speak:
This repository makes sing of rebase basically based workflows heavily.
-
Gain macOS installer.
You might want to be ready to determine on your desired macOS version here. After executing this step,
it’s good to to comprise theBaseSystem.dmg
file in the recent folder.ATTENTION: Let
>= Mammoth Sur
setup sit at theCountry Option
masks masks, and
other an identical locations for a whereas if issues are being sluggish. The preliminary macOS
setup wizard will finally be successful.Sample sprint:
$ ./gain-macOS-v2.py 1. Excessive Sierra (10.13) 2. Mojave (10.14) 3. Catalina (10.15) 4. Mammoth Sur (11.6) - RECOMMENDED 5. Monterey (most modern) Resolve a product to download (1-5):
Pronounce: Smartly-liked NVIDIA GPUs are supported on HighSierra but now no longer on later
variations of macOS. -
Convert the downloaded
BaseSystem.dmg
file into theBaseSystem.img
file.qemu-img convert BaseSystem.dmg -O uncooked BaseSystem.img
-
Form a digital HDD image the build macOS could be build apart in. Whenever you alternate the
identify of the disk image frommac_hdd_ng.img
to one thing else, the boot scripts
will should always be up thus a long way to reward the recent image identify.qemu-img create -f qcow2 mac_hdd_ng.img 128G
NOTE: Form this HDD image file on a like a flash SSD/NVMe disk for finest results.
-
Now you might want to very wisely be ready to install macOS
🚀
Installation
-
CLI method (fundamental). Valid sprint the
OpenCore-Boot.sh
script to launch the
set up path of.Pronounce: This same script works for Mammoth Sur, Catalina, Mojave, and Excessive Sierra.
-
You’re all scheme!
🙌 -
TIP: The utilization of a non-APFS filesystem is recommended.
-
(OPTIONAL) Exercise this macOS VM disk with libvirt (virt-supervisor / virsh stuff).
-
Edit
macOS-libvirt-Catalina.xml
file and alternate the hundreds of file paths (search
forCHANGEME
strings in that file). The next speak must smooth attain the
trick incessantly.macOS.xmlvirt-xml-validate macOS.xml
“>sed "s/CHANGEME/$USER/g" macOS-libvirt-Catalina.xml> macOS.xml virt-xml-validate macOS.xml
-
Form a VM by running the following speak.
virsh --join qemu:///system define macOS.xml
-
If wished, grant well-known permissions to libvirt-qemu user,
sudo setfacl -m u:libvirt-qemu:rx /home/$USER sudo setfacl -R -m u:libvirt-qemu:rx /home/$USER/OSX-KVM
-
Initiate
virt-supervisor
and launch themacOS
digital machine.
-
Atmosphere Expectations Lawful
Good job on environment up a Virtual Hackintosh
system! One of these system could even be dilapidated
for a unfold of applications (e.g. instrument builds, checking out, reversing work), and
it must be all you wish, along with some tweaks documented in this repository.
On the more than just a few hand, such a system lacks graphical acceleration, a good sound sub-system,
USB 3 functionality and other an identical issues. To permit these gadgets, exhaust a
glimpse at our notes. We would catch to resume our checking out and
documentation work spherical this situation. Please reach out to us
whenever you might want to very wisely be ready to fund this situation of work.
It’s a long way feasible to comprise ‘beyond-native-apple-hw’ efficiency but it does require
work, persistence, and barely of luck (probably?).
Put up-Installation
-
Study networking notes to setup visitor networking.
I in spite of every thing comprise the following instructions speak in
/and plenty others/rc.local
.#!/usr/bin/env bash sudo ip tuntap add dev tap0 mode faucet sudo ip hyperlink scheme tap0 up promisc on sudo ip hyperlink scheme dev virbr0 up sudo ip hyperlink scheme dev tap0 grasp virbr0
This has been ample for me thus a long way.
Pronounce: It is advisable to permit the
rc.local
functionality manually on in vogue
Ubuntu variations. Study out the notes included in this repository
for details. -
To passthrough GPUs and other gadgets, glance these notes.
-
Want a obvious resolution? Study out the notes included in this repository.
-
Trouble with iMessage? Study out the notes included in this repository.
-
Highly suggested macOS tweaks – https://github.com/sickcodes/osx-optimizer
Is This Stunning?
The “secret” Apple OSK string is broadly on hand on the Files superhighway. It’s a long way furthermore included in a public court docket doc on hand here. I’m now no longer a felony expert but it looks that Apple’s strive(s) to earn the OSK string treated as a alternate secret didn’t determine. As a result of these reasons, the OSK string is freely included in this repository.
Please review the ‘Legality of Hackintoshing’ documentation bits from Dortania’s OpenCore Install Book.
Gabriel Somlo furthermore has some thoughts on the ethical aspects fascinated about running macOS under QEMU/KVM.
You perchance could gain this ‘Asserting Amazon EC2 Mac cases for macOS’ article engaging.
Pronounce: It’s a long way your accountability to luxuriate in, and settle for (or now no longer settle for) the
Apple EULA.
Pronounce: That is now no longer ethical suggestion, so please effect the merely assessments yourself
and search suggestion from your lawyers whenever you comprise gotten any issues (Textual bellow credit: Dortania)
Motivation
My aim is to permit macOS basically based educational projects, builds + checking out, kernel
debugging, reversing, and macOS safety be taught in a easy, reproducible
manner without getting ‘invested’ in Apple’s closed ecosystem (too heavily).
These Virtual Hackintosh
systems are now no longer supposed to interchange the precise
physical macOS systems.
For my fragment talking, this repository has been a technique for me to ‘exit’ the Apple
ecosystem. It has helped me to envision and review the interoperability of Canon CanoScan LiDE 120
scanner, and Brother HL-2250DN
laser printer. And these
gadgets now work decently ample on in vogue variations of Ubuntu (Yay for free
instrument). Also, a protracted time wait on, I had to entirely wipe my (then) mark recent
MacBook Pro (Retina, 15-gallop, Tiresome 2013)
and install Xubuntu on it – as the
OS X
kernel kept crashing on it!
Backstory: I was a (unfortunate) student in Canada in a outdated lifestyles and Apple made my work on cracking Apple Keychains plenty more challenging than it wished to be. That is how I obtained attracted to Hackintosh systems.