Live data from Hacker News

Osx-kvm: Run macOS on QEMU/KVM

github.com

61–70 of 111 posts

Re: Osx-kvm: Run macOS on QEMU/KVM

#61

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?

Someone posted a few months ago a story where they were using something similar to this (couldn't find the actual comment, sorry) where they had a HD with a very bare linux install on it that had enough drivers on it to boot on most any modern machine, load up qemu and boot a OSX image.

It was basically a "portable" hackintosh that could be moved between most any desktop machine.

I thought it was a cool idea, and tried to get it working with this repo, but didn't have much luck even with a full load distro (Ubuntu) on a Dell i5 with a nVidia GPU I had sitting around.

Re: Osx-kvm: Run macOS on QEMU/KVM

#62
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.

Re: Osx-kvm: Run macOS on QEMU/KVM

#63

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?

Someone posted a few months ago a story where they were using something similar to this (couldn't find the actual comment, sorry) where they had a HD with a very bare linux install on it that had enough drivers on it to boot on most any modern machine, load up qemu and boot a OSX image. It was basically a "portable" hackintosh that could be moved between most any desktop machine. I thought it was a cool idea, and tri…

Sounds like a good place to use QubesOS.

Re: Osx-kvm: Run macOS on QEMU/KVM

#64

Le sigh, continuous integration of osx and iOS apps is near impossible using standard cloud providers. I would gladly take an osx geared towards the data center.

In theory this should be possible on Google Cloud using nested virtualization or EC2 bare metal...

If you find me funding, I could give you CI for mobile app development, a decent MVP, in 3 months (which is me taking how long i think it takes and multiplying by 3) :P

But, like a previous poster said, it _WOULD_ be in violation of Apple's ToS. So a legal budget would be required.

Re: Osx-kvm: Run macOS on QEMU/KVM

#65

Le sigh, continuous integration of osx and iOS apps is near impossible using standard cloud providers. I would gladly take an osx geared towards the data center.

In theory this should be possible on Google Cloud using nested virtualization or EC2 bare metal...

Heck, if it's just iOS development, it might be possible to do a cloud CI that doesn't violate the ToS. When I was building all my iOS apps from Linux, I wasn't using osx.... I was using cross compiled clang....

Re: Osx-kvm: Run macOS on QEMU/KVM

#66

Le sigh, continuous integration of osx and iOS apps is near impossible using standard cloud providers. I would gladly take an osx geared towards the data center.

We have a pretty good CI setup for our iOS apps using (shockingly) Microsoft's TFS. Not sure about any other cloud providers, but I was surprised by how easy it was to get working on a MS product.

I had a friend a few months back looking for a CI setup for iOS and they found the same thing. For anyone wanting to kick the tires, it is called "App Center": https://azure.microsoft.com/en-us/services/app-center/.

Re: Osx-kvm: Run macOS on QEMU/KVM

#68

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?

I've set up several Hackintosh machines in the past (bare metal / no hypervisor), but lately I've been using QEMU/KVM almost exclusively - specifically through Proxmox (I tried ESXi for a while, but I prefer the flexibility of QEMU/KVM). Most of the details from the linked guide can be adapted for Proxmox fairly easily.

For me, the killer advantage of using a hypervisor is the ability to easily create and restore snapshots. This eliminates the worry of macOS updates making your system unbootable, and allows you to test Kexts and other configuration changes (with any Hackintosh system, you're likely to need some trial and error to get things working after major updates) without fully committing and possibly getting stuck with changes that are difficult to reverse.

It only takes a few (dozen) times booting into single-user mode and trying to revert configuration changes to realize that snapshots are incredibly awesome :)

Hardware compatibility is still important, though it mostly boils down to needing a CPU with VT-x or AMD-V enabled, along with a compatible GPU for pass-through. I've had good luck with NVIDIA GeForce GTX and some older AMD Radeon cards (AMD cards needed a DSDT tweak). Audio over HDMI can be a little tricky, but I've gotten it working with every GPU I've tried. Those challenges are mostly the same whether you use a hypervisor or not.

Performance-wise, it's been pretty comparable to native performance, at least for general every-day use as a home computer for the family (streaming video services, casual gaming, some web/app development, etc).

Re: Osx-kvm: Run macOS on QEMU/KVM

#69

Since everyone seems to be able to run macOS virtualized how come there aren't any cheap VPS that run macOS available?

Legal issues, I bet. AFAIK there's no way to run macos without Apple hardware and comply with the license. You could run a VPS provider on Mac Pros I guess, but I doubt it would be cheap.

Re: Osx-kvm: Run macOS on QEMU/KVM

#70

Since everyone seems to be able to run macOS virtualized how come there aren't any cheap VPS that run macOS available?

Pretty sure it's the license, specifically:

(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software within virtual operating system environments on each Mac Computer you own or control that is already running the Apple Software, for purposes of: (a) software development; (b) testing during software development; (c) using macOS Server; or (d) personal, non-commercial use.

The grant set forth in Section 2B(iii) above does not permit you to use the virtualized copies or instances of the Apple Software in connection with service bureau, time-sharing, terminal sharing or other similar types of services.

Post reply on HN