What does HackerNews think of OSX-KVM?
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.
Dropping the links below:
You can also run macOS in docker, but it’s ultimately running through qemu/kvm as well[2]
I set up OSX-KVM (https://github.com/kholia/OSX-KVM) and it worked really well. Having archlinux is a huge plus for this (it's why the docker image uses it), as qemu is super simple to setup and get running. Was surprised how easy it was, but given how much effort the bootloaders have had over the recent years for Hackintosh, qemu users can just yoink that bootloader and use it.
https://github.com/kholia/OSX-KVM
The repo works well. Tweak the CPU cores and type for emulation. If you're running an Intel CPU you're pretty set as you wont be required to emulate as if you were one (aka running a Ryzen perhaps).
On my Ryzen 16cores, I get about 90%+ performance inside the OSX vs my native machine.
If not going with dual boot, while you can run QEMU with windows, you won't have the KVM accelerator which is how I got high performance. You might want to try nesting a Linux inside Hyper-V and then running Qemu inside of that.
I did get some warnings from QEMU along the lines of "X register doesnt exist" or something but the machine runs fine and geekbench runs fine as well. Play with the cores/threads settings as well. If you go too high (for me was around 8), it doesn't boot up and just hangs.
This hasn't been my experience. macOS still incessantly bothers you about OS updates even if you decline signing into an Apple account during first-boot, and you can download major release updaters independently from the Mac Store (e.g. using the script from OSX-KVM).
Looks like it's successor also defaults to a Core 2 Duo, though with 2 cores and SMT.
https://github.com/foxlet/macOS-Simple-KVM https://github.com/kholia/OSX-KVM
That being said, just browsing through that site, it doesn't immediately seem like it's this family of Hackingtosh VMs adding significantly to the list or at all.
You can also run OSX in qemu too.
Not that I'd ever do or recommend it in a commercial setting, but hobbyists should probably just fire up something like https://github.com/kholia/OSX-KVM to do builds.
[1] https://blogs.vmware.com/workstation/2020/05/vmware-workstat...
It works quite well for me. Simulator works fine (though graphics are slow) and so does connecting a physical phone (by passing through the USB controller).
You can run Linux as a host, macOS as a guest[1] under QEMU, buy a second GPU that is supported by Apple (e.g., Sapphire Radeon RX 580 Pulse 4GB) and pass that GPU in its entirety to the guest macOS. The same for one of the USB controllers on your motherboard. Effectively, you get native macOS performance under Linux. A bonus: you can use the iptables firewall with the FORWARD ruleset to control guest macOS network access. The overall setup process is involving, but nothing that an intermediate Linux user would not be able to handle. Please note that it might be actually illegal (?) in some (?) countries to run macOS software on non-Apple hardware.
Have a look here for a guide on Archlinux : https://wiki.archlinux.org/title/Intel_GVT-g. And here for a script to deploy macOS on KVM : https://github.com/kholia/OSX-KVM.
Side-note : vfio-mdev can now be unlocked on consumer-grades Nvidia cards too : https://github.com/DualCoder/vgpu_unlock. Sadly, it is not possible for AMD-cards.
By the way, I am working on Phyllome OS (https://phyllo.me/), which is an attempt to make it easier to do such things. But please don't tell anyone :)
[1] showed how to boot macOS in KVM without the usual Clover / Opencore setup but is not maintained for newer versions anymore. [2] shows how to run current macOS versions without Clover or Opencore in VirtualBox by changing the VM's ACPI(?) entries and loading variables into the NVRAM. [3] uses KVM but also uses Opencore.
I tried to translate [2] to QEMU but was never successful.
Does anybody know some resources how to have a pure KVM macOS VM without any hackintoshing?
[1] https://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/
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.
That repo has been around for many years.
Never bothered with GPU passthrough however.
https://github.com/kholia/OSX-KVM if you need an easy way to fire up a fresh install.
https://github.com/kholia/OSX-KVM
I don't know if Apple has documentation somewhere.
It only works on Macs, it needs the toolchain and ROM I guess? Docker is just one step closer to porting it on the Windows and Linux platforms.
Personally, if I wanted to run MacOSX that badly, I'd buy a Mac Mini or the lowest-priced Mac they have. Much easier and worth it for the AppleCare and Warranty.
Edit: grammar and spelling.
https://www.reddit.com/r/jailbreak/comments/gwg3e4/free_rele...
The developer mentions[0] that, like macOS-Simple-KVM[1], this leverages kholia's OSX-KVM[2].
[0] https://www.reddit.com/r/jailbreak/comments/gwg3e4/free_rele...
I’ve used this guide: https://github.com/kholia/OSX-KVM
The only real hurdle hardware wise is your IOMMU groups and your CPU compatibility, if you have a moderately modern system it should be a problem.
I also have a couple of inexpensive PCIe USB cards that I pass through to the guests for direct USB access, highly recommended.
The guides will use qcow2 images or pass through a block device, as I mentioned I have a giant LVM pool, I just create lvs for each vm and pass the volume through to the vm as a disk , and let the vm handle it. In the host you can use kpartx to bind and mount the partitions if you ever need to open them up.
[1] https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM...
https://github.com/kholia/OSX-KVM
https://collaboradev.com/2018/10/19/arch-linux-running-osx-h...
- Good starting point for setting up macOS under QEMU/KVM: https://github.com/kholia/OSX-KVM
- DSDT/SSDT patching: https://www.tonymacx86.com/threads/ssdt-gpu-graphics-card-in...
- AMD reset bug: https://www.reddit.com/r/VFIO/comments/5h351m/gpu_stuck_in_d...
- Kernel extension that can help with some GPU issues: https://github.com/acidanthera/WhateverGreen
The DSDT/SSDT patch was probably the trickiest thing. I've posted my particular patch here if you're interested: https://pastebin.com/ngvkVZYN
Also, a few of my other scripts/config: https://pastebin.com/9Nh5rheZ
- https://github.com/geerlingguy/macos-virtualbox-vm
- https://github.com/kholia/OSX-KVM
Personally I ended up just buying a Mac Mini and upgrading it's RAM. It's unfortunate, but I was under a deadline and didn't want to risk having a technically-illegal version of MacOS prevent me from building/publishing client apps suddenly.
In the future, I'm going to just take writing iOS apps off the list of services I offer.
A coworker recently got the single GPU Serval, and I could see using that daily. Ubuntu 18.04 is a great desktop OS. I have tentative plans to take apart my Bonobo, remove the batteries, put power supplies inside with a standard power plug out the back and cut out the trackpad and fit in an Apple trackpad.
LXD+QEMU makes it a pretty nice machine. I almost don't miss OSX and this [0] project has solved a lot of those issues.
I tried setting up MacOS through Qemu/KVM (using these instructions [0]) and it installed pretty much fine. I don't have a spare graphics card or monitor for VFIO, so I tried running it in a window, but the mouse and keyboard capturing was really finicky, so it was completely unusable.