GPU Recommendations For VM Passthrough


statecowboy

Recommended Posts

Hi all, it's been a while since I've purchased a video card.  I've been checking out @SpaceInvaderOne's Macinabox and wanted to give it a try.  That said, I'm assuming for optimum performance I should probably grab a GPU for passthrough.  I saw that in order to run Mojave you need an AMD GPU.  I was wondering if any others out there would not mind sharing what GPU you're using to do this, or any other recommendations on picking one up.  I don't need top of the line, I primarily do gaming on an xbox.  But I do some photo editing etc. so I'd want the performance to be as close to an actual MacOS experience as possible.  I've been reading about top GPU ratings etc. but it's all a bit overwhelming with so many models and variants out there.  I also occasionally run windows/linux VMs so I'd want whatever I pick up to be usable there as well.

 

Edit - I should mention I run two QHD monitors for my primary work machine.  

Edited by statecowboy
Link to comment
6 hours ago, 1812 said:

I just put in an rx 590 8gb gigabyte card in a Catalina vm about 2 weeks ago. Was on sale! Doesn't have the reset bug as it is switched between Catalina and win 10 every few days without rebooting the server.

Thank you both for the comments.  I just picked up an RX 590 (Sapphire) at my local microcenter.  It came with a game and xbox game pass so jumped on it.  That said, having some issues passing through my VM.  Would you mind sharing your config for the catalina install?  I managed to get everything going with VNC but when switching to the AMD card I'm hitting some road blocks.

Link to comment
18 hours ago, statecowboy said:

Thank you both for the comments.  I just picked up an RX 590 (Sapphire) at my local microcenter.  It came with a game and xbox game pass so jumped on it.  That said, having some issues passing through my VM.  Would you mind sharing your config for the catalina install?  I managed to get everything going with VNC but when switching to the AMD card I'm hitting some road blocks.

its below. there is some extra lines in it for trim to work

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>8049a941-a0bd-4a55f-a179-35056162d3a21</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>12582912</memory>
  <currentMemory unit='KiB'>12582912</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <iothreads>1</iothreads>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='10'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <emulatorpin cpuset='1'/>
    <iothreadpin iothread='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA55e357V/MacinaboxCatalina/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA4f5157V/MacinaboxCatalina/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA576357V//MacinaboxCatalina/Clover.qcow2'/>
      <target dev='hda' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA889157V/MacinaboxCatalina/macos_disk.img'/>
      <target dev='hdb' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:45:01:4b:ac:f8'/>
      <source bridge='br0'/>
      <model type='e1000-82545em'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/domains/gigabyte590.dump'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-usb'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd,bus=usb-bus.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-applesmc,osk=cashruleseverythingaroundmeCREAM'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='IvyBridge,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,fma,avx,avx2,bmi1,bmi2'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-1.rotation_rate=1'/>
  </qemu:commandline>
</domain>

 

  • Like 1
Link to comment
3 hours ago, 1812 said:

its below. there is some extra lines in it for trim to work

 


<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>8049a941-a0bd-4a55f-a179-35056162d3a21</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>12582912</memory>
  <currentMemory unit='KiB'>12582912</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <iothreads>1</iothreads>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='10'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <emulatorpin cpuset='1'/>
    <iothreadpin iothread='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA55e357V/MacinaboxCatalina/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA4f5157V/MacinaboxCatalina/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA576357V//MacinaboxCatalina/Clover.qcow2'/>
      <target dev='hda' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/disks/Samsung_SSD_840_EVO_250GB_S1DBNSCFA889157V/MacinaboxCatalina/macos_disk.img'/>
      <target dev='hdb' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:45:01:4b:ac:f8'/>
      <source bridge='br0'/>
      <model type='e1000-82545em'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/domains/gigabyte590.dump'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-usb'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd,bus=usb-bus.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-applesmc,osk=cashruleseverythingaroundmeCREAM'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='IvyBridge,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,fma,avx,avx2,bmi1,bmi2'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-1.rotation_rate=1'/>
  </qemu:commandline>
</domain>

 

Hm, I don't see too many differences from our configs.  I'm still getting stuck when trying to use splashtop to connect to my VM.  It just hangs at the connecting screen.  I'll hop over to the support thread and see if someone can help me out.  Thanks again.

Edited by statecowboy
Link to comment
  • 6 months later...
On 1/1/2020 at 1:21 AM, SpaceInvaderOne said:

I use a Sapphire rx470 4gb pulse for my macos vms. I choose the Sapphire because I had heard they dont seem to have the reset problem that some other vendors cards do ( and I found that i dont have reset problems with this card). I choose the rx470 4gb cause it was cheaper than the 8gb version lol 

I couldn't get my hands on an rx470, but went with a Sapphire rx580. Hopeful that this doesn't have the bug and may work out of the box.

 

I passed the GPU through in the XML and it boots into Catalina. I don't think I can declare success though as I don't think the card is being recognized / used.


Any idea how I can best trouble-shoot? Do I need to install any drivers?

Link to comment
7 minutes ago, steve1977 said:

Thanks. How to? It doesn't seem to explained in the YT video?

You might want to look at tonymac or maybe a hackintosh site. Its not hard but you need the basics for dealing with hackintoshing.

 

Edited by david279
Link to comment
16 hours ago, david279 said:

You might want to look at tonymac or maybe a hackintosh site. Its not hard but you need the basics for dealing with hackintoshing.

I updated lilu and whatevergreen. Still no luck.

 

My AMD GPU is in the second mobo slot (an Nvidia GPU is in the first). Below from Unraid info:

 

Group 27     17:00.0            1002:6fdf    VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Polaris 20 XL [Radeon RX 580 2048SP] (rev ef)
 17:00.1            1002:aaf0    Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]

Link to comment
46 minutes ago, steve1977 said:

I updated lilu and whatevergreen. Still no luck.

 

My AMD GPU is in the second mobo slot (an Nvidia GPU is in the first). Below from Unraid info:

 

Group 27     17:00.0            1002:6fdf    VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Polaris 20 XL [Radeon RX 580 2048SP] (rev ef)
 17:00.1            1002:aaf0    Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]

 

https://www.tonymacx86.com/threads/rx-580-2048sp-compatibility-at-mojave.264898/

 

Something about that 2048 version...

Link to comment
  • 3 weeks later...

I bought a new GPU (see below), but still no luck. Using a HDMI dongle. Any idea what else I can do to troubleshoot?

 

Group 27     17:00.0            1002:67df    VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)
 17:00.1            1002:aaf0    Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.