Well now that I have my hardware picked out (mostly), and I have Proxmox installed as my host OS, the next step in this project is installing an OS X guest.
This involves the following:
1. Getting an Opencore EFI, as well as an OS X install image
2. Creating the Virtual Machine
3. Configuring the VM
4. Installing OS X
5. Configuring GPU passthrough
In order to set this up, I had used the following resources:
I. Downloading the Files
For our VM, we will need a few files
An OpenCore EFI image [ kvm OpenCore ]
OS X installer (usually BaseImage.dmg)
II. Creating a Virtual Machine
In Proxmox, this is a relatively simple task, though there are some settings that you will need to change.
Settings
III. Configuring the VM
Once you have the VM created, you must control your enthusiasm to just press ‘start’… it is not yet time. Time for some command line magic.
You need to add some additional settings in the configuration file. In your terminal you will need to navigate to the config directory, and then open the config file corresponding to your VM. I use Vi, but feel free to use nano if desired.
root@pve:~# cd /etc/pve/qemu-server root@pve:/etc/pve/qemu-server# ls 100.conf 101.conf 102.conf 104.conf 110.conf 120.conf root@pve:/etc/pve/qemu-server# vi 101.conf
Now there are additional steps to making the install media believe you are using a Mac. Most notably, it is the “args” field. You will need to obtain the OSK for your machine.
For an AMD processor, you should use the below, replacing the OSK with yours, or you may find it here. I can only gather that it is some great secret of Apple’s and their lawyers.
args: -device isa-applesmc,osk="YOUR-OSK-GOES-HERE" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,check
And for Intel processors, might as well let the VM know you have some features available
args: -device isa-applesmc,osk="YOUR-OSK-GOES-HERE" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
So in this file you should also see two cdrom devices, ide0 and ide2. We will need to change these to hard drives. Change the media=cdrom to cache=unsafe
Once you have added those changes, you may exit your text editor. One final step is to avoid a possible boot loop when loading OSX. In order to do this, we will need to change a setting.
echo "options kvm ignore_msrs=Y" >> /etc/modprobe.d/kvm.conf && update-initramfs -k all -u
And once you have done that, time to move onto the next step.
IV. Installing OS X
Now for the next part… Installing OS X. For this particular machine, I decided to go with OS X Catalina, as at the time of implementing this, Big Sur as in Beta. Now though, you can likely get Big Sur running if desired. You should now be able to run this like a normal install, just be sure to format the correct drive.
This is the part I struggled… I tried installing it numerous times, changing small settings in the UEFI BIOS, trying different KEXTS, etc. I spent hours, over a span of a week perhaps, and then I finally decide to re-download OpenCore again. Surprise! The current version was now version 9, and in the change logs, fixes for the Catalina installer compatibility! So morale of the story here is to use the latest version of the EFI file.