Osx-kvm-gpu-passthrough
The most reliable way to build the VM base is using the OSX-KVM project on GitHub .
Success starts with your hardware. macOS has very strict driver support compared to Windows or Linux. This is the most critical factor. AMD (Recommended): osx-kvm-gpu-passthrough
Most modern AMD cards work out of the box because Apple uses them in real Macs. Models like the are top choices. The most reliable way to build the VM
Some AMD cards (like the Vega series) don't reset properly when the VM shuts down. You might need the vendor-reset kernel module to fix this. This is the most critical factor
Edit your GRUB configuration ( /etc/default/grub ) and add intel_iommu=on or amd_iommu=on to the kernel parameters.
While setup is complex, the results are unmatched. You get the stability of Linux as a base OS with the ability to run a "Bare Metal" speed macOS instance. For developers who want to stay in the Linux ecosystem but need to compile iOS apps or use Final Cut Pro, this is the ultimate solution.
Getting native graphics performance on a macOS virtual machine via KVM is the "holy grail" of virtualization. It turns a laggy VNC window into a fully functional workstation capable of video editing, Xcode development, and even light gaming.