Live data from Hacker News

Osx-kvm: Run macOS on QEMU/KVM

github.com

91–100 of 111 posts

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

#91

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…

Can you please elaborate on your GPU passthrough setup? I was under the impression that NVIDIA have explicit checks to see if you're trying to virtualize a consumer brand GPU and throw an error in that case. I have a PC with a GTX 970 that I wanted to try a similar install on, unfortunately the i5-3570K in there doesn't support VT-d from what I can tell.

From my experience with a GTX 950 and a GTX 1060, the macOS Web Driver from NVIDIA doesn't seem to care about virtualization, and it works fine (assuming the drivers and passthrough are configured correctly).

Windows is a different story, and I had to use a patched vBIOS[1] to get my 1060 working without Windows 10 throwing the dreaded "Code 43" error (when it detects virtualization and refuses to work). In my case, the CPUID workaround mentioned in another comment didn't help.

As for VT-d, I believe the unlocked "K" processors from Intel all have VT-d disabled for some reason.

[1] https://github.com/Matoking/NVIDIA-vBIOS-VFIO-Patcher

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

#93
post #64

Earlier quoted context omitted.

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.

We actually need something like this internally for non mobile app reasons. We build telepresence.io at Datawire and macOS dev and testing is a huge pain. Interested in a job :) ?

uhhh... actually, yes, can you email me (it's on my profile) or tell me your email? please?

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

#94
post #56

Earlier quoted context omitted.

Can you give an example? I compile a lot of stuff in my macOS VM and there basically no performance loss.

I ran geekbench 4, the overall score was only 15-25% lower but the memory score was a lot lower like 80% lower

I really doubt synthetic benchmarks are actually represent much since really I just tested it and some things are just weird. For instance memory bandwidth is only significantly lower in multi-core test which could be caused might be by both specific of Penryn CPU or some quirk in how Geekbench implement the test.

Total score of my host against VM:

Host: 3954 single / 13713 multi core

macOS VM: 3770 single / 11630 multi core

[0] https://browser.geekbench.com/v4/cpu/9430525

[1] https://browser.geekbench.com/v4/cpu/9430512

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

#96
post #94

Earlier quoted context omitted.

I ran geekbench 4, the overall score was only 15-25% lower but the memory score was a lot lower like 80% lower

I really doubt synthetic benchmarks are actually represent much since really I just tested it and some things are just weird. For instance memory bandwidth is only significantly lower in multi-core test which could be caused might be by both specific of Penryn CPU or some quirk in how Geekbench implement the test. Total score of my host against VM: Host: 3954 single / 13713 multi core macOS VM: 3770 single / 11630 mu…

Additionally I just want to point out this is test done on absolutely default Ubuntu 18.04 with no VM optimizations whatsoever. It's totally possible to significantly improve VMs performance:

* By installing / compiling different kernel: low latency preemption option, 1000 HZ timer frequency, etc.

* Use HugePages to decrease memory fragmentation.

* Play around QEMU own options since right CPU options and host / guest balance with CPU pinning are helpful.

I used to improve my CPU-bound games performance on Windows VM a lot by doing some some fine tuning and I suppose macOS not much different.

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

#97
post #95

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

Theoretically you could run Linux headless on a Dell Latitude laptop, configure it to use the Dock's serial output for the main console, and then have it automatically boot the OS X VM with GPU pass through to the main screen. When you close the lid, Linux goes to sleep instead of OS X. You could disconnect it from the dock and just carry it around with you like a normal OS X machine. Open it up and OS X is there waiting for you. Connect it back to the dock and debug with another computer over serial and/or SSH whenever you need to troubleshoot.

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

#98
post #95

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

You'll have much better chances if you can just buy external GPU since there are laptops with working IOMMU and there are people who got external GPU working in VM. Then for macOS it's going to be just normal PCI(e) device.

Unfortunately (almost?) all mobile GPUs won't even initialize within VM. I'm not expert in hardware side of things, but I suppose laptop drivers expect specific topology since mobile GPU almost never have own connection to display and sometimes don't even have own ROM. Even if somebody will find a way to make passed mobile GPU work on Windows VM it's very unlikely same trick will just work for macOS.

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

#100
post #95

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

Theoretically you could run Linux headless on a Dell Latitude laptop, configure it to use the Dock's serial output for the main console, and then have it automatically boot the OS X VM with GPU pass through to the main screen. When you close the lid, Linux goes to sleep instead of OS X. You could disconnect it from the dock and just carry it around with you like a normal OS X machine. Open it up and OS X is there wai…

> and then have it automatically boot the OS X VM with GPU pass through to the main screen

What GPU would that be? If it's integrated Intel there is very good chance it's wouldn't work. Last time I tried to get my Intel HD working in macOS VM attempt failed completely. As guys from Intel explained somewhere on mail list their Mac driver stack is quite different from what is there on Linux and Windows. This is why they for instance don't support their graphics virtualization (GVT-g) for macOS.

And for mobile GPU like Nvidia / AMD there own set of problems why they don't work at all in VM.

Post reply on HN