11 ms·
I use OpenCore but have switched my Hackintosh system over to running in a VM (using GPU passthrough). It's easier for me to backup / make changes this way, and
by x3sphere 6y ago
I use OpenCore but have switched my Hackintosh system over to running in a VM (using GPU passthrough). It's easier for me to backup / make changes this way, and there is only a minor performance hit. This is a Geekbench run from my VM (Core i9 10940x with 4 cores passed through): https://browser.geekbench.com/v4/cpu/15395105 https://browser.geekbench.com/v4/cpu/15395105
I have a Windows 10 VM running on a same system too. It may not be suitable if you require virtualization inside macOS itself though. Nested virtualization doesn't work too well with the Android emulator, in my experience.
- terhechte 6y agoAs I'm currently thinking about also going this route I do have some questions, if I may. Could you elaborate what your hardware setup is? Do you have two screens, and two powerful GPUs? Or do you use a HDMI Switch for one screen? Basically, how do you cope with the hardware limitations of GPU Passthrough (I briefly looked into using a single GPU for passthrough, which seems possible but involved rewriting the GPU rom and I'm not going to do that :)
- Wowfunhappy 6y agoYou don't need to rewrite the GPU rom! I never set it up fully due to other issues, but I had High Sierra + GPU passthrough working quite well in ESXI last fall. I would still be using ESXI now, except my (unusual) goal was to run 10.9, and I couldn't for the life of me get GPU passthrough working in 10.9. The neat thing about ESXI, though, is that it is officially supported by macOS. Only on Apple hardware, of course, but with ESXI the motherboard is all fake anyway, so it works identically regardless of the host's hardware. All you need to do is patch out the Apple hardware check, which is easy.
- weaksauce 6y agodo you have any resources to look at for setting this up?
- Wowfunhappy 6y agoI don't! For whatever reason, there is precious little information on the internet for running macOS in ESXI. I got the original idea from another Hacker News comment: https://news.ycombinator.com/item?id=17766016 https://news.ycombinator.com/item?id=17766016 And then, this is what you need to enable macOS on non-Apple hardware: https://www.insanelymac.com/forum/files/file/964-macos-unlocker-v30-for-vmware-esxi/ https://www.insanelymac.com/forum/files/file/964-macos-unloc... The rest is the same as setting up any other VM in ESXI with GPU passthrough, so you can read tutorials on that. High Sierra and an nVidia card "just worked" for me on ESXI. (Sadly, Mavericks did not—I could not get the GPU to output anything—and that was the only OS I cared about—but you probably don't care.) There's a lot more information on using KVM, so you may want to go that route instead. But of course, then then you need to use a Hackintosh bootloader like Clover or OpenCore. It was really cool having everything just install natively with ESXI.
- weaksauce 6y agowell that's a start at least! thanks!
- x3sphere 6y agoOne screen, two GPUs. For the screen I've got an LG 38GL950G, and the GPUs are a Radeon WX5100 (macOS) and RTX 2080 Ti (Windows). I run the Linux host (Ubuntu) headless. I have the macOS side connected via HDMI and Windows via DisplayPort. Then I switch inputs when through the monitor's OSD for changing the OS (I think there's a way to do this through DDC/CI commands depending on the monitor, in which case you'd be able to write a script to do this, haven't looked into that yet). I have a USB switch for moving all device connections to the OS of my choice. Also the board I have, an X299 Designare, has several USB controllers on their own IOMMU group so you can pass through each to their own VM.
- Teknoman117 6y agoDoes passing through the "boot" gpu work well these days? I remember it not working very well in the past.
- x3sphere 6y agoIt works fine here on Ubuntu 19.10 (kernel 5.3). I just run the following commands to stop gdm and X after booting: sudo systemctl stop gdm sudo systemctl stop systemd-logind sudo killall gdm-x-session Then start my VM. libvirt automatically unbinds it from the host and binds to the VM. You're right though, in the past this has been problematic. It is working fine though now at least on my Radeon WX 5100.
- Hamuko 6y agoThat sounds pretty nice actually. Really the only pain that I feel with my Hackintosh is the updates (which is why I'm still on Mojave). However, I'm not really sure if I want to trade in performance since updates are a periodic pain but a performance hit is gonna always be there.
- Wowfunhappy 6y agoOP didn't specify, but I assume they're using a type-1 hypervisor, likely either KVM or ESXI. If you're also using GPU passthrough, the performance loss is minimal—nothing like your standard Virtualbox VM. Now, whether its actually easier to set up than a bare-metal Hackintosh, I'm not so sure. I tried it last fall, and it took a lot of fiddling to get working. (It also flat-out didn't work for my very specific use case, but that's another matter.) Maybe it would be better at surviving updates, but it's not obvious to me that it necessarily would, especially when Clover/OpenCore are already pretty decent at it.
- x3sphere 6y agoYeah, KVM. Someone setup a repo here with a starter config: https://github.com/Leoyzen/KVM-Opencore https://github.com/Leoyzen/KVM-Opencore You'll need to build a bootable disk image with the EFI folder there, but that should mostly work out of the box. Only thing I changed was the serial numbers so iMessage, iCloud etc work properly. I think it would be easier to set up a working Windows install with passthrough first just so you know you have that portion setup properly, and then do macOS.
- tdiggity 6y agoI wanted to try this but was worried that the gpu pass through wouldn’t be smooth for basic video playback. How well do YouTube and Netflix play? How smooth does it feel overall? Could someone be fooled into thinking it was a native system?
- hrrsn 6y agoIf you’re passing through an entire GPU, it feels just like a native system
- omnimus 6y agoCan i run 3 screens if the gpu has enough outputs? I mean will it work as it would if it was not vm?
- kdrag0n 6y agoYes, the VM gets the entire GPU to itself as if it were bare-metal.
- wtallis 6y agoYes. The VM guest operating system's GPU drivers are not aware of the fact that they're running in a VM, and have full transparent access to all the hardware resources of the GPU that's assigned to that VM.
- w0utert 6y agoI have another question about this. Can I also use the GPU that is passed-through to the guest from the host, once the guest is shut down? For example, say I build a linux host with IGP + powerful discrete GPU. Can I use KVM to pass the discrete GPU to Windows if I want to play a game (using the IGP for the linux desktop) but also use the discreet GPU for Linux CUDA programming after the Windows guest is shut down?
- wtallis 6y ago
- deleted 6y ago[deleted]
- unixhero 6y agoWhat's your hypervisor os?
- x3sphere 6y agoUbuntu 19.10, using KVM+QEMU
- Ecco 6y agoNice setup! Quick question: would you recommend getting a Core i9 10940x today or waiting for a 10900K?
- rubatuga 6y agoIf you're looking to create a macOS VM (w/ GPU Passthrough), I've made a detailed guide here: https://github.com/yoonsikp/macOS-KVM-PCI-Passthrough https://github.com/yoonsikp/macOS-KVM-PCI-Passthrough I believe my guide is better at avoiding GPU driver initialization problems than others. I'll need to update it to support OpenCore however.
- MegaDeKay 6y agoConsider taking a look at this Opencore setup specifically configured for KVM and GPU passthrough. https://github.com/Leoyzen/KVM-Opencore https://github.com/Leoyzen/KVM-Opencore
- stefanwlb 6y agoDoes nvidia work through GPU pass through as I know hackintosh didn’t support my 1660gti gpu when I tried it a few months ago.
- rubatuga 6y ago@stefanwlb I'm not sure if you know but you have been shadow banned. > Does nvidia work through GPU pass through as I know hackintosh didn’t support my 1660gti gpu when I tried it a few months ago. It most likely does not.
- vbezhenar 6y agoFor Android I would try to run its emulator on a host machine and make it accessible via network (AFAIK adb works with emulator via TCP connection anyway).