Osx-kvm: Run macOS on QEMU/KVM

By axiomdata316 - a day ago

Showing first level comment(s)

I've been running my macOS desktop in an ESXi VM for over a year now. I came from a hackintosh, but got tired of the fragility of some upgrades. Some notes on this setup:

- Apple supports macOS running inside of ESXi. Officially, only on Apple host hardware (i.e. a Mac Pro, which is on the ESXi compatibility list). Apple even ships a VMXNet3 network driver in macOS.

- For ESXi specifically, you have to patch the host to boot macOS on non-Apple hardware. There's an explicit "am I running on Apple hardware?" check in there. DrDonk's unlocker on GitHub is what you need.

- You can specify board-id, ROM/MLB, etc values via your .vmx file. iMessage and everything work for me, but I'm also using identifiers from a real Mac Mini I retired a few years ago. I expect this will still work okay with generated data if you follow hackintosh guides.

- I pass through a GPU and a USB controller card for input/output. For USB, find an FL1100 chipset card, like the Inateck models, which works out of box on macOS, Windows, etc. Recently I moved my boot drive to a passed-through NVMe for extra speed. My other drives are ESXi virtual drives backed by storage elsewhere on my network.

- Most NVIDIA GPUs will need the NVIDIA Web Drivers to work. Kepler generation cards are the last to work out of box, and the only to currently work out of box on Mojave. If you don't need hefty performance, a GeForce GT 730 is a cheap card. Apple and NVIDIA are still not getting along, so I expect this will only get worse.

- However, I've never been able to get an AMD card to initialize via passthrough. The PCI device is seen, but the EFI strings or whatever else Apple is using to determine initialization paths are wrong. I recently spent awhile trying to figure this out, going so far as to write my own SSDT tables for the device, but finally gave up.

- This particular guide is using Chameleon, which is considered an outdated bootloader. Clover is far more flexible, and will work in VM setups that don't natively implement SMC like ESXi. (For the longest time Clover would crash an ESXi VM, but this now works as of a month or two ago).

And finally, on the context of this whole thing--I switched from a real Mac Pro to a hackintosh years and years ago, when it became clear Apple didn't care about upgrading the hardware. They still don't. The last Mac Pro release was 2013 (the 2013 iPhone was a 5S!). They've been promising things will improve "soon". They're the world's most valuable company; if they actually cared, at the organizational DNA level, it would have happened by now.

matthew-wegner - a day ago

More discussion on Hackintosh VMs at https://www.reddit.com/r/hackintosh/, just search for KVM, ESX, or Proxmox.

For any one interested in using the Ryzen Threadripper for a Hackintosh VM, see https://www.reddit.com/r/hackintosh/comments/8knz91/threadri...

bodhibyte - 20 hours ago

I've been running a macOS VM on my Threadripper 1950X for awhile now. Passing through 8 cores with a GTX 1060 attached and it runs great. In the latest Ubuntu 18.04 LTS, no need to compile qemu from source either, the version from apt get works just fine.

x3sphere - 19 hours ago

OSX-KVM has been super helpful for recovering old sparseimage-backups I've created back when I was still using a mac. This is because sparsebundlefs-fuse Linux driver doesn't work with this file-format (yet) and I don't have any access to a Mac. (Especially since recovering takes at least a dozen hours).

https://github.com/torarnv/sparsebundlefs/issues/7#issuecomm...

miduil - a day ago

whyagaindavid - a day ago

Previous post from 2016 with 89 comments:

https://news.ycombinator.com/item?id=12556609

arendtio - a day ago

How does it compare to running a Hackintosh? Is it much easier to set up? Do you still need to have compatible hardware and to mess with drivers and system configuration? How easy are OS upgrades? How is the performance, including graphics? Any issues?

the_grue - a day ago

So is there any compatible laptop that will allow QEMU/KVM particulary witwith gpu passthrough? Is someone running something like that?

omnimus - 16 hours ago

I had various success with this repository, unfortunately the various XMLs for libvirt and the "sh" boot scripts all reference different paths and capitalizations of files (e.g. even for the firmware committed to the repository etc).

However I did get it to work successfully with High Sierra at one point.

lathiat - a day ago

The last time I virtualized macOS, I had to find and use some arcane compiler flags to get homebrew or any builds to work.

busterarm - 16 hours ago