GPU passthrough of physical Mac Mini node to macOS VM

itsthejb

New Member
Jul 26, 2024
18
2
3
Hi everyone,

I recently added a Mac Mini 2018 machine as a node to my cluster. I had a previous macOS VM running on a non-Mac node, and now that I've moved it, I would ideally like to take maximum benefit of passing through its natively supported hardware. However, I haven't been very successful, mostly due to this unusual use case. Posting here in the hope that someone else has done the same and can point me in the right direction.

I have gone through full steps wrt. ensuring kernel support for the T2-based machine. It is, for example, running a T2-compliant kernel from https://github.com/AdityaGarg8/pve-edge-kernel-t2 and I also exported and installed firmwares from the previous macOS bare metal install

As a first step, I'd like to passthrough the GPU, in order to get best-possible performance when working on the machine through VNC. Config:

Code:
agent: 1
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -device usb-mouse,bus=ehci.0,port=3 -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
autostart: 0
balloon: 0
bios: ovmf
boot: order=virtio0
cores: 4
cpu: host
cpuunits: 100
efidisk0: local-lvm:vm-101-disk-0,size=128K
hostpci0: 0000:00:02,pcie=1,x-vga=1
hotplug: disk,network,usb
machine: q35
memory: 6144
meta: creation-qemu=9.0.2,ctime=1725038254
name: macOS
net0: virtio=BC:24:11:6F:B0:E6,bridge=vmbr0
numa: 1
onboot: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=fdeb9a02-59fd-410f-846a-44d75d378272
sockets: 1
startup: order=10
tablet: 1
tags: desktop;macos
vcpus: 4
vga: none
virtio0: local-lvm:vm-101-disk-1,cache=none,discard=on,size=64G
vmgenid: eeb527c2-5f08-414a-aff8-393b4d808163

I've also had various tries to patching OpenCore's config to enable detection of the card. For example:

Code:
<key>DeviceProperties</key>
<dict>
        <key>Add</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>device-id</key>
                <data>kj4AAA==</data>
                <key>AAPL,ig-platform-id</key>
                <data>BwCbPg==</data>
                <key>framebuffer-patch-enable</key>
                <data>AQAAAA==</data>
                <key>framebuffer-stolenmem</key>
                <data>AAAwAQ==</data>
            </dict>
        </dict>
</dict>

... However despite various tries I didn't get close to having the iGPU detected in the macOS VM.

It would also be nice to enable Bluetooth, in the hope that perhaps even Airdrop might be functional (seems a bit ambitious!). However, passing through any of the network adapters removes Ethernet as well.

In any case, this is a general call for help!

Thanks in advance!
 
Why are you running Proxmox on a Mac mini instead of MacOS? You can run mac-on-mac VMs (probably) easier, but not sure about passthru. I say this as someone who is typing from a 2018 Mini running Sonoma 14 btw.

You might have better results with a different desktop sharing software (other than VNC) - try Nomachine NX
 
@Kingneutron yeah I know that this seems like adding unnecessary abstraction; the idea was that I want the extra node not just for running some very trivial macOS things

VNC performance is actually quite good... Hence why I disabled the display for the vm; it's sluggish otherwise. I'm just trying to maximise the use of what I've got.
 
  • Like
Reactions: Kingneutron

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!