All Projects → kholia → Osx Kvm

kholia / Osx Kvm

Licence: agpl-3.0
Run macOS on QEMU/KVM. With OpenCore + Big Sur + Monterey support now! Only commercial (paid) support is available now to avoid spammy issues. No Mac system is required.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Osx Kvm

Dell-E7250-Hackintosh
Fully working Hackintosh on E7250
Stars: ✭ 51 (-99.61%)
Mutual labels:  hackintosh, macos-mojave, catalina, bigsur, bigsur-hackintosh, monterey-hackintosh, monterey
GIGABYTE-B360M AORUS PRO-8700-Hackintosh-OpenCore-EFI
技嘉 B360M AORUS PRO / i7-8700 UHD630 / macOS 12 Monterey / macOS 11 Big Sur / 黑苹果 OpenCore EFI / GIGABYTE B360M AORUS PRO Hackintosh OpenCore EFI
Stars: ✭ 51 (-99.61%)
Mutual labels:  hackintosh, bigsur, bigsur-hackintosh, monterey-hackintosh, monterey
Gigabyte-Z490-Vision-G-Hackintosh-OpenCore
Hackintosh OpenCore and Clover EFI folders for running macOS on the Gigabyte Z490 Visison G Board with an Intel i9 10850K Processor. Supported macOS: Mojava, Catalina, Big Sur and Monterey.
Stars: ✭ 71 (-99.45%)
Mutual labels:  hackintosh, catalina, bigsur, bigsur-hackintosh, monterey-hackintosh
OpenCore-EFI-Lenovo-Y50-70
Lenovo Y50-70, OpenCore 0.8.8 EFI for Big Sur, Monterey and Ventura (FHD and UHD)
Stars: ✭ 63 (-99.51%)
Mutual labels:  hackintosh, bigsur, bigsur-hackintosh, monterey-hackintosh, monterey
asus-n550jk-hackintosh
A collection of all resources needed to run macOS on an Asus N550JK
Stars: ✭ 14 (-99.89%)
Mutual labels:  hackintosh, bigsur, bigsur-hackintosh, monterey-hackintosh, monterey
Dell-Latitude-E7480-Hackintosh
OC 0.8.X EFI for Dell Latitude E7480
Stars: ✭ 33 (-99.74%)
Mutual labels:  hackintosh, bigsur, bigsur-hackintosh, monterey-hackintosh, monterey
Macos Simple Kvm
Tools to set up a quick macOS VM in QEMU, accelerated by KVM.
Stars: ✭ 11,732 (-9.24%)
Mutual labels:  hackintosh, qemu, kvm, catalina, bigsur
Hackintosh
Hackintosh long-term maintenance model EFI and installation tutorial
Stars: ✭ 6,589 (-49.03%)
Mutual labels:  hackintosh, catalina, bigsur, monterey
Razer-Blade-15-Advanced-2018-Hackintosh
Razer Blade 15 Advanced 2018 Hackintosh - OpenCore 👀
Stars: ✭ 28 (-99.78%)
Mutual labels:  hackintosh, bigsur, bigsur-hackintosh, monterey
virtnbdbackup
Backup utiliy for Libvirt / qemu / kvm supporting incremental and differencial backups.
Stars: ✭ 62 (-99.52%)
Mutual labels:  virtualization, kvm, qemu, qemu-kvm
Asus-ROG-Strix-G15-G512LV-OpenCore
OpenCore EFI for Asus ROG Strix G512LI/LV/LW, G712LI/LV/LW. Compatible with Monterey & Big Sur.
Stars: ✭ 17 (-99.87%)
Mutual labels:  hackintosh, bigsur-hackintosh, monterey-hackintosh, monterey
Lenovo-ThinkPad-T450s-Hackintosh-OpenCore
此仓库可以让你在macos中使用ThinkPad T450s T450 X250 X1C3的所有功能(不包括指纹、VGA),且99%接近于白苹果的完美黑苹果。
Stars: ✭ 234 (-98.19%)
Mutual labels:  hackintosh, catalina, bigsur, monterey
KVM-Opencore
OpenCore disk image for running macOS VMs on Proxmox/QEMU
Stars: ✭ 529 (-95.91%)
Mutual labels:  hackintosh, catalina, bigsur, monterey
Kvm Guest Drivers Windows
Windows paravirtualized
Stars: ✭ 892 (-93.1%)
Mutual labels:  qemu, kvm, virtualization
Hack-Z370-HD3P-i5-8400
My main Hackintosh running Monterey with a i5-8400 and a Gigabyte Z370-HD3P.
Stars: ✭ 56 (-99.57%)
Mutual labels:  hackintosh, catalina, monterey
Hackintosh i5-7500 B250 HD630 EFI
Hackintosh i5-7500 B250 RX560 RX570 (OpenCore) Big Sur
Stars: ✭ 44 (-99.66%)
Mutual labels:  hackintosh, catalina, bigsur
MSI-Z390-Gaming-Edge-AC OC
msi z390 gaming edge ac黑苹果OC引导
Stars: ✭ 25 (-99.81%)
Mutual labels:  hackintosh, catalina, catalina-hackinotsh
macOS-EFI-Asus-X570I
🖥 Files needed to run macOS on the Asus ROG Strix X570-I
Stars: ✭ 12 (-99.91%)
Mutual labels:  hackintosh, catalina, bigsur
packer-kvm
Create VM templates with Packer for usage with Libvirt/KVM virtualization : CentOS 7, CentOS 8, CentOS 8 Stream, Alma Linux, Rocky Linux, Bionic (Ubuntu 1804), Focal (Ubuntu 2004), Debian 11 (stable), Kali Linux, Fedora 33 and Fedora 34.
Stars: ✭ 99 (-99.23%)
Mutual labels:  kvm, qemu, qemu-kvm
Kata Containers
Kata Containers version 2.x repository. Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Stars: ✭ 1,053 (-91.85%)
Mutual labels:  qemu, kvm, virtualization

Note

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!).

💚 Looking for commercial support with this stuff? I am available over email for a chat for commercial support options only. Note: Project sponsors get access to the Private OSX-KVM repository, and direct support.

Working with Proxmox and macOS? See Nick's blog for sure.

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 launch a bunch of headless macOS VMs (build farm).

  • Document usage of munki to deploy software to such a build farm.

  • Enable VNC + SSH support out of the box or more easily.

  • 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 (grep -e vmx -e 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 only, after cloning the repo below
    
  • Install QEMU and other packages.

    sudo apt-get install qemu uml-utilities virt-manager git \
        wget libguestfs-tools p7zip-full make -y
    

    This step may need to be adapted for your Linux distribution.

  • Add user to the kvm and libvirt groups (might be needed).

    sudo usermod -aG kvm $(whoami)
    sudo usermod -aG libvirt $(whoami)
    

    Note: Re-login after executing this command.

  • Clone this repository on your QEMU system. Files from this repository are used in the following steps.

    cd ~
    
    git clone --depth 1 --recursive https://github.com/kholia/OSX-KVM.git
    
    cd OSX-KVM
    

    Repository updates can be pulled via the following command:

    git pull --rebase
    

    This repository uses rebase based workflows heavily.

  • Fetch macOS installer.

    ./fetch-macOS-v2.py
    

    You can choose your desired macOS version here. After executing this step, you should have the BaseSystem.dmg file in the current folder.

    ATTENTION: Let >= Big Sur setup sit at the Country Selection screen, and other similar places for a while if things are being slow. The initial macOS setup wizard will eventually succeed.

    Sample run:

    $ ./fetch-macOS-v2.py
    1. High Sierra (10.13)
    2. Mojave (10.14)
    3. Catalina (10.15)
    4. Big Sur (11.6) - RECOMMENDED
    5. Monterey (latest)
    
    Choose a product to download (1-5):
    

    Note: Modern NVIDIA GPUs are supported on HighSierra but not on later versions of macOS.

  • Convert the downloaded BaseSystem.dmg file into the BaseSystem.img file.

    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 mac_hdd_ng.img to something else, the boot scripts will need to be updated to point to the new image name.

    qemu-img create -f qcow2 mac_hdd_ng.img 128G
    

    NOTE: Create this HDD image file on a fast SSD/NVMe disk for best results.

  • Now you are ready to install macOS 🚀

Installation

  • CLI method (primary). Just run the OpenCore-Boot.sh script to start the installation process.

    ./OpenCore-Boot.sh
    

    Note: This same script works for Big Sur, Catalina, Mojave, and High Sierra.

  • You are all set! 🙌

  • TIP: Using a non-APFS filesystem is recommended.

  • (OPTIONAL) Use this macOS VM disk with libvirt (virt-manager / virsh stuff).

    • Edit macOS-libvirt-Catalina.xml file and change the various file paths (search for CHANGEME strings in that file). The following command should do the trick usually.

      sed "s/CHANGEME/$USER/g" macOS-libvirt-Catalina.xml > macOS.xml
      
      virt-xml-validate macOS.xml
      
    • Create a VM by running the following command.

      virsh --connect qemu:///system define macOS.xml
    • If needed, grant necessary 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
      
    • Launch virt-manager and start the macOS virtual machine.

Setting Expectations Right

Nice job on setting up a Virtual Hackintosh system! Such a system can be used for a variety of purposes (e.g. software builds, testing, reversing work), and it may be all you need, along with some tweaks documented in this repository.

However, such a system lacks graphical acceleration, a reliable sound sub-system, USB 3 functionality and other similar things. To enable these things, take a look at our notes. We would like to resume our testing and documentation work around this area. Please reach out to us if you are able to fund this area of work.

It is possible to have 'beyond-native-apple-hw' performance but it does require work, patience, and a bit of luck (perhaps?).

Post-Installation

  • See networking notes to setup guest networking.

    I have the following commands present in /etc/rc.local.

    #!/usr/bin/env bash
    
    sudo ip tuntap add dev tap0 mode tap
    sudo ip link set tap0 up promisc on
    sudo ip link set dev virbr0 up
    sudo ip link set dev tap0 master virbr0
    

    This has been enough for me so far.

    Note: You may need to enable the rc.local functionality manually on modern Ubuntu versions. Check out the notes included in this repository for details.

  • To passthrough GPUs and other devices, see these notes.

  • Need a different resolution? Check out the notes included in this repository.

  • Trouble with iMessage? Check out the notes included in this repository.

  • Highly recommended macOS tweaks - https://github.com/sickcodes/osx-optimizer

Is This Legal?

The "secret" Apple OSK string is widely available on the Internet. It is also included in a public court document available here. 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.

Gabriel Somlo also has some thoughts on the legal aspects involved in running macOS under QEMU/KVM.

You may also find this 'Announcing Amazon EC2 Mac instances for macOS' article interesting.

Note: It is your responsibility to understand, and accept (or not accept) the Apple EULA.

Note: This is not legal advice, so please make the proper assessments yourself and discuss with your lawyers if you have any concerns (Text credit: Dortania)

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 a lot harder than it needed to be. This is how I got interested in Hackintosh systems.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].