Is my virtual "Mac Pro" better than your real MP?

Discussion in 'Mac Pro' started by DearthnVader, Jun 5, 2018.

  1. DearthnVader macrumors 6502a

    DearthnVader

    Joined:
    Dec 17, 2015
    Location:
    Red Springs, NC
    #1
    I've been using High Sierra in Qemu for a few months, and it runs really well, there are a few drawbacks.

    1. I haven't figured out how to pass a PCI Firewire or XHCI USB card to my virtual MP, yet, in a way that they work correct.

    2. I only have a 8 core 16 thread "Penryn" cpu, as I can't get my EFI firmware to boot when I select a CPU that would be "supported" by about this Mac.

    3. Can't figure how to pass my Apple bluetooth.

    Now the befits:

    1. Boot screens for my RX580.
    2. "native" support for M.2 NVME booting.
    3. unmodified version of the macOS.
    4. I can run Windows, Linux, and the macOS all at the same time, passing each on 8 cores and 16 threads, and the Linux host will load level CPU use with no real performance hit.
    5. I can upgrade my system.
    6. My system is open source, and I'm only really limited to how good of a coder I am, as to what I can make it do.

    I passthrough a OEM Apple 802.11AC wifi card, an M.2 960 EVO, and an RX580, as well as any AHCI drives and USB( sans Apple bluetooth ).

    I'd love to take the "Pepsi challenge" with folks with real Apple hardware, as far as what works and benchmarks, tho if you have a 12 core 24 thread machine you will likely beat me out, as well if you have a 1070/1080/Titan XP, I'm sure you can put up better numbers than me. However my system costs around $1200 to build, and I can upgrade my CPU, video card, and ram.
     
  2. eksu macrumors regular

    Joined:
    Aug 3, 2017
    #2
    I've thought about multi-heading my 2009 4,1-5,1 Mac Pro. I work in MacOS but like to play Windows Games.

    Here's what I was thinking:
    • Host OS, Windows Server 2016 (with Desktop)
    • Run MacOS in Hyper-V
    • Passthrough Apple Raid Card
    • Passthrough Wifi/Bluetooth Adapter (Handoff)
    • Passthrough RX GPU

    Ultimately I decided that I don't want MacOS to be the guest, I would much rather it be a host and my video games run in the guest. Maybe device passthrough with MacOS as the host is possible with some work on QEMU. We need a) fast cpu access and b) some way to disconnect a PCIE device from the host so we can attach it to the guest.

    Recent eGPU support makes me think macOS now has a way to disconnect GPU/PCIE devices from the Host. I'm not sure if vtd.c get's loaded on anything pre ivy bridge, so I need to explore that a bit.

    QEMU's hvf (hypervisor.framework acceleration) also isn't currently working on my machine, but I don't think it's stable yet.
     
  3. bookemdano macrumors 65816

    Joined:
    Jul 29, 2011
    #3
    I don't think Hyper-V supports true passthrough (VT-D) does it? I know it didn't when I was looking at Hypervisors a few years ago.

    VMWare ESXi does (even on non-Apple hardware if you use the unlocker tool), and I had some degree of success passing through a Radeon card and a USB 3.0 card. In general it worked OK (this was ESXi 5.5) but it was still not as seamless as running natively. Was pretty fun to see it working though!
     
  4. eksu macrumors regular

    Joined:
    Aug 3, 2017
    #4
    Hyper-V calls it 'Discrete Device Assignment', they support it on Server 2016.

    I would go the ESXi route but would I need a third GPU at that point? If Windows & MacOS both supported dynamic CPU / Memory (adding AND removing) ESXi would work well enough for my workflow. The goal is to basically always have macOS running and sometimes spin up windows.
     
  5. h9826790 macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #5
    If this work, it may be the perfect solution for me. I mainly gaming in Windows, so, really need the GPU power. Also, I use the hardware encoding in Windows now. This also require to access the real GPU but not virtual device.
     
  6. DearthnVader thread starter macrumors 6502a

    DearthnVader

    Joined:
    Dec 17, 2015
    Location:
    Red Springs, NC
    #6
    Sadly the macOS has fallen behind on VT-x and VT-d as far as not public API.

    I'd rather run a macOS host.

    Of course it wouldn't hurt if Apple gave us some real hardware to do this on, the cMP doesn't really have a proper power supply and is also long in the tooth, and the nMP lacks PCI-E. Even if we could passthrough Thunderbolt devices it only supports TB2.
     
  7. bookemdano macrumors 65816

    Joined:
    Jul 29, 2011
    #7
    Ah, nice to know MS added that functionality to Hyper-V. I'll have to check it out at some point.

    Passing through a card in any hypervisor makes it completely unavailable for the host. You can easily-enough assign it to different VMs, but you can't do that while either of them are running, and they can't share it, naturally.

    Also, with ESXi, a GFX card isn't strictly needed for the host, because there's not a whole lot you can do from the console. Don't get me wrong it's nice to be able to have the ability to display the host console directly, but you can get by just fine without it.
     
  8. eksu macrumors regular

    Joined:
    Aug 3, 2017
    #8
    If I may ask, do you have full iCloud / iMessage support in your QEMU setup? Are you basically off in Hackintosh land at that point?

    As long as the OS will run, Hyper-V on a 5,1 makes a lot of sense because Windows gets to be on bare metal and also you're still on Licensed Hardware.

    Not sure what I will do when 5,1 support is dropped if the nMP isn't adequate / extendable / upgradeable.
     
  9. bookemdano macrumors 65816

    Joined:
    Jul 29, 2011
    #9
    Can't speak for QEMU but I think as of ESXi 6 full iMessage and iCloud support is working in MacOS guests.

    I'm not sure it's even possible to run MacOS in Hyper-V (maybe with Hackintosh stuff?). I know it is natively and officially supported (and licensed) to do so in ESXI on a Mac Pro.
     
  10. toru173 macrumors regular

    Joined:
    Apr 5, 2007
    #10
    I've been planning to run KVM on my 1,1's for a while. How is the performance? Did you have much trouble getting it up and running? What guides (if any) did you follow?
     
  11. DearthnVader thread starter macrumors 6502a

    DearthnVader

    Joined:
    Dec 17, 2015
    Location:
    Red Springs, NC
    #11
    It's kind of a pain to get everything working correct.

    https://github.com/kholia/OSX-KVM/tree/master/HighSierra

    That covers the basics, but qemu's command line is like an OS all to it self.

    Here is my qemu launch command:

    Code:
    #!/bin/bash
    
    # See https://www.mail-archive.com/qemu-devel@nongnu.org/msg471657.html thread.
    #
    # The "pc-q35-2.4" machine type was changed to "pc-q35-2.9" on 06-August-2017.
    #
    # The "media=cdrom" part is needed to make Clover recognize the bootable ISO
    # image.
    
    ##################################################################################
    # NOTE: Comment out the "MY_OPTIONS" line in case you are having booting problems!
    ##################################################################################
    
    MY_OPTIONS="+aes,+xsave,+avx,+xsaveopt,avx2,+smep"
    
    /home/jam/QEMU/bin/qemu-system-x86_64 -enable-kvm -m 8192 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,$MY_OPTIONS\
              -machine pc-q35-2.9 \
              -smp 16,cores=8 \
          -usb -usbdevice host:046d:c534 \
              -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
              -device vfio-pci,host=27:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=./RX580.rom \
              -device vfio-pci,host=27:00.1,bus=root.1,addr=00.1 \
              -device vfio-pci,host=01:00.0,multifunction=on \
              -device ioh3420,id=root_port1,multifunction=on,chassis=1,addr=03.0,slot=3,bus=pcie.0 \
              -device vfio-pci,host=1f:00.0,bus=root.1,addr=01.0,multifunction=on  \
              -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" \
          -drive if=pflash,format=raw,readonly,file=OVMF_CODE-pure-efi.fd \
          -drive if=pflash,format=raw,file=OVMF_VARS-pure-efi-1024x768.fd \
          -smbios type=2 \
          -device ich9-intel-hda -device hda-duplex \
               -device ide-drive,bus=ide.0,drive=MacHDD \
          -drive id=MacHDD,if=none,file=./mac_hdd2.img \
              -netdev bridge,id=hn0 -device e1000-82545em,netdev=hn0 \
              -usb -usbdevice host:05ac:828d \
              -usb -usbdevice host:0a5c:4500 \
              -usb -usbdevice host:046d:0825 \
              -device nec-usb-xhci,id=xhci \
               -usb -usbdevice host:04e8:6860 \
              -vga none 
    --- Post Merged, Jun 6, 2018 ---
    Yes, I have full support for iCould, Messages, FaceTime and the App Store.
     

Share This Page