Jump to content

Proxmox VE OSX Guide discussion


Recommended Posts

Here's the Catalina EFI (this one is OC 0.6.3 I believe). Again, missing just the "Resources" subfolder due to size. Needs serials and I have commented PCI DeviceProperties specific to me.

 

My VM config in /etc/pve/qemu-server/100.conf:

 

args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -cpu host,+invtsc,vendor=GenuineIntel
balloon: 0
bios: ovmf
boot: cdn
bootdisk: virtio0
cores: 64
cpu: Penryn
efidisk0: aorus:vm-100-disk-1,size=1M
hookscript: local:snippets/vmhook.sh
hostpci0: 85:00,pcie=1
hostpci1: 84:00,pcie=1
hostpci2: 88:00,pcie=1
hostpci3: 43:00,pcie=1,romfile=vbios.bin,x-vga=1
hostpci4: 02:00,pcie=1
hugepages: 1024
ide2: local:iso/OpenCore.iso,size=150M
machine: q35
memory: 196608
name: catalina
numa: 1
ostype: other
scsihw: virtio-scsi-pci
smbios1: uuid=2dc4e309-f3cc-4b49-b09f-ca3e89f7a697
sockets: 1
vga: none
virtio0: aorus:vm-100-disk-0,cache=unsafe,discard=on,size=250G
vmgenid: 0c7cc702-74ba-4d8e-ba4b-d52d5fe53847

 

 

EFI.zip

Link to post
Share on other sites
On 11/30/2020 at 12:49 AM, meina222 said:

I re-enabled the re-binding of the framebuffer and vtconsole - the highlighted commands were previously commented out - this is needed since otherwise you can't unbind in the pre-start phase when you restart.

 

When you shutdown your VM, you'd need an external device to restart it as main display won't come back to host (still not sure how to achieve that) but you can re-start VM from web console on a different device and display should come back. Similarly, rebooting a VM should just work and GPU should reset properly (for me DisplayPort sound stops working but this is WIP by developer).

 

#!/bin/bash

vmid="$1"
phase="$2"

if [[ "$phase" == "pre-start" ]]; then
    clear
    echo "Starting VM $vmid - please wait..."
    IFILE=/var/lib/vz/snippets/interfaces.$vmid
    if [[ -f "$IFILE" ]]; then
        cp /var/lib/vz/snippets/interfaces.$vmid /etc/network/interfaces
        systemctl restart networking
    fi          
    echo 0 > /sys/class/vtconsole/vtcon0/bind
    echo 0 > /sys/class/vtconsole/vtcon1/bind
    echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
elif [[ "$phase" == "post-start" ]]; then
    main_pid="$(< /run/qemu-server/$vmid.pid)"

    cpuset="0-63"
    #cpuset="$(< /etc/pve/qemu-server/$vmid.cpuset)"

    taskset --cpu-list  --all-tasks --pid "$cpuset" "$main_pid"
elif [[ "$phase" == "post-stop" ]]; then
    echo "Post-stop VM $vmid"
    #reboot
    #shutdown -h now

    sleep 1 
    echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind
    echo 1 > /sys/class/vtconsole/vtcon0/bind
    echo 1 > /sys/class/vtconsole/vtcon1/bind

fi
vmhook.sh (END)

 

 

 

Alternatively, you can get a cheap GPU for the host and not worry about the framebuffer unbind/rebind in the hook and manipulate the display output selector.

@meina222

Should I use this script for 2 separate VMs (Big Sur and Win10) and 2 GPUs (6800xt and 3060ti) passthrough?  Are there any modifications that is needed?

Link to post
Share on other sites

For the GPU that will be used by Proxmox as primary display, you need to unbind the efi framebuffer but the other should be w/out the part referring to the framebuffer. So no, the hookscript won't be shared as identical copy. In your BIOS you should be able to select which PCIE slot is primary display. The other GPU should pass without any tweaking of the framebuffer.

 

If you want to run both VMs at the same time, it may get tricky. Make sure you are stable with 1 VM at a time.

  • Like 1
Link to post
Share on other sites

My 3090 ended up on backorder btw (so I withdraw my TigerDirect recommendation, it doesn't seem honest), but I got a non-XT 6800 from Newegg that was charged and will ship tomorrow. So I may try to dual GPU VMs (6800 for Win 10 as BigSur doesn't seem to have the driver enabled yet and the 5700XT for MacOS).

  • Cross Finger 1
  • +1 1
Link to post
Share on other sites
19 hours ago, meina222 said:

My 3090 ended up on backorder btw (so I withdraw my TigerDirect recommendation, it doesn't seem honest), but I got a non-XT 6800 from Newegg that was charged and will ship tomorrow. So I may try to dual GPU VMs (6800 for Win 10 as BigSur doesn't seem to have the driver enabled yet and the 5700XT for MacOS).

I did a passthrough with dual GPU VMs(5700xt for Big Sur and  6800xt for Windows 10) and they're are both stable if only one VM is running at a time.  As soon as both VMS are started,  the machine froze up and rebooted on it's own.  I'm thinking it could be the 5700xt reset bug that might be causing the reboot so I got a Nvidia 3060 ti for further testing.  I didn't get a chance to install the 3060ti yet,  I'll keep you posted.  Please update me on your progress with the dual GPU VMs.

Link to post
Share on other sites

I think the issue may be with AMD's PCIE management or board IOMMU groups. I recall that to run many VM's with many GPUs, one ideally goes with an Intel platform. Will try and let you know, my 6800 shipped today so I should get it by early next week.

Link to post
Share on other sites
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.